X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dee28fdd4dda8fc428aec093b9633f52d5144540..bcbb02480bb50512bf1606d7b5616a9e1935877e:/src/gtk/utilsgtk.cpp diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index faf8184ba8..445a5f3bb7 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -21,10 +21,12 @@ #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" @@ -362,6 +364,12 @@ static wxString GetSM() // wxGUIAppTraits //----------------------------------------------------------------------------- +wxEventLoopBase *wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop(); +} + + #if wxUSE_INTL void wxGUIAppTraits::SetLocale() { @@ -474,17 +482,20 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg) wxString wxGUIAppTraits::GetDesktopEnvironment() const { + wxString de = wxSystemOptions::GetOption(_T("gtk.desktop")); + if ( de.empty() ) + { #if wxUSE_DETECT_SM - static const wxString SM = GetSM(); - - if (SM == wxT("GnomeSM")) - return wxT("GNOME"); + static const wxString s_SM = GetSM(); - 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__