#include "wx/apptrait.h"
#include "wx/process.h"
+#include "wx/sysopt.h"
#include "wx/unix/execute.h"
#include "wx/gtk/private/timer.h"
+#include "wx/evtloop.h"
#ifdef __WXDEBUG__
#include "wx/gtk/assertdlg_gtk.h"
if ( !dpy )
return wxEmptyString;
+ char smerr[256];
char *client_id;
SmcConn smc_conn = SmcOpenConnection(NULL, NULL,
999, 999,
0 /* mask */, NULL /* callbacks */,
NULL, &client_id,
- 0, NULL);
+ WXSIZEOF(smerr), smerr);
if ( !smc_conn )
+ {
+ wxLogWarning(_("Failed to connect to session manager: %s"), smerr);
return wxEmptyString;
+ }
char *vendor = SmcVendor(smc_conn);
wxString ret = wxString::FromAscii( vendor );
// wxGUIAppTraits
//-----------------------------------------------------------------------------
+wxEventLoopBase *wxGUIAppTraits::CreateEventLoop()
+{
+ return new wxEventLoop();
+}
+
+
#if wxUSE_INTL
void wxGUIAppTraits::SetLocale()
{
gtk_set_locale();
+ wxUpdateLocaleIsUtf8();
}
#endif
wxString wxGUIAppTraits::GetDesktopEnvironment() const
{
+ wxString de = wxSystemOptions::GetOption(_T("gtk.desktop"));
+ if ( de.empty() )
+ {
#if wxUSE_DETECT_SM
- const wxString SM = GetSM();
+ static const wxString s_SM = GetSM();
- if (SM == wxT("GnomeSM"))
- return wxT("GNOME");
-
- if (SM == wxT("KDE"))
- return wxT("KDE");
+ if (s_SM == wxT("GnomeSM"))
+ de = wxT("GNOME");
+ else if (s_SM == wxT("KDE"))
+ de = wxT("KDE");
+ }
#endif // wxUSE_DETECT_SM
- return wxEmptyString;
+ return de;
}
#ifdef __WXGTK26__