// (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];
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;
wxString cmd;
+#if wxUSE_MIMETYPE
wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
if ( ft )
{
ok = ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(url));
delete ft;
}
+#endif // wxUSE_MIMETYPE
if ( !ok || cmd.empty() )
{