[ 1587059 ] wxLaunchDefaultBrowser fix for KDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -855,11 +855,19 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags)
|
||||
// (non-Mac, non-MSW)
|
||||
|
||||
#ifdef __UNIX__
|
||||
if (wxTheApp->GetTraits()->GetDesktopEnvironment() == wxT("GNOME"))
|
||||
|
||||
wxString desktop = wxTheApp->GetTraits()->GetDesktopEnvironment();
|
||||
|
||||
// GNOME and KDE desktops have some applications which should be always installed
|
||||
// together with their main parts, which give us the
|
||||
if (desktop == wxT("GNOME"))
|
||||
{
|
||||
wxArrayString errors;
|
||||
wxArrayString output;
|
||||
long res = wxExecute( wxT("gconftool-2 --get /desktop/gnome/applications/browser/exec"), output, errors, wxEXEC_NODISABLE );
|
||||
|
||||
// gconf will tell us the path of the application to use as browser
|
||||
long res = wxExecute( wxT("gconftool-2 --get /desktop/gnome/applications/browser/exec"),
|
||||
output, errors, wxEXEC_NODISABLE );
|
||||
if (res >= 0 && errors.GetCount() == 0)
|
||||
{
|
||||
wxString cmd = output[0];
|
||||
@@ -868,6 +876,12 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (desktop == wxT("KDE"))
|
||||
{
|
||||
// kfmclient directly opens the given URL
|
||||
if (wxExecute(wxT("kfmclient openURL ") + url))
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ok = false;
|
||||
|
Reference in New Issue
Block a user