#include "wx/statusbr.h"
#endif // wxUSE_GUI
+#ifndef __WXPALMOS5__
#ifndef __WXWINCE__
#include <time.h>
#else
#include "wx/msw/wince/time.h"
#endif
+#endif // ! __WXPALMOS5__
#ifdef __WXMAC__
#include "wx/mac/private.h"
#endif
#endif
+#ifndef __WXPALMOS5__
#if !defined(__MWERKS__) && !defined(__WXWINCE__)
#include <sys/types.h>
#include <sys/stat.h>
#endif
+#endif // ! __WXPALMOS5__
#if defined(__WXMSW__)
#include "wx/msw/private.h"
::ShellExecuteEx(&sei);
- const int nResult = (int) sei.hInstApp;
+ const INT_PTR nResult = (INT_PTR)sei.hInstApp;
// Firefox returns file not found for some reason, so make an exception
// for it
#ifdef __UNIX__
+ // Our best best is to use xdg-open from freedesktop.org cross-desktop
+ // compatibility suite xdg-utils
+ // (see http://portland.freedesktop.org/wiki/) -- this is installed on
+ // most modern distributions and may be tweaked by them to handle
+ // distribution specifics. Only if that fails, try to find the right
+ // browser ourselves.
+ wxString path, xdg_open;
+ if ( wxGetEnv("PATH", &path) &&
+ wxFindFileInPath(&xdg_open, path, "xdg-open") )
+ {
+ if ( wxExecute(xdg_open + " " + url) )
+ return true;
+ }
+
wxString desktop = wxTheApp->GetTraits()->GetDesktopEnvironment();
// GNOME and KDE desktops have some applications which should be always installed