From 85b1dc6e3cc461746ed41828052f86040b0b2dfb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Jun 2012 21:34:54 +0000 Subject: [PATCH] Don't use Unix-specific wxGTK utility functions under non-Unix. Unix-specific functions shouldn't be used under Windows, add "#ifdef __UNIX__" guards around them. Closes #14410. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/utilsgtk.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 275e2c9f10..30ce5c732e 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -21,7 +21,9 @@ #include "wx/apptrait.h" #include "wx/process.h" #include "wx/sysopt.h" +#ifdef __UNIX__ #include "wx/unix/execute.h" +#endif #include "wx/gtk/private/timer.h" #include "wx/evtloop.h" @@ -191,6 +193,8 @@ const gchar *wx_pango_version_check (int major, int minor, int micro) // subprocess routines // ---------------------------------------------------------------------------- +#ifdef __UNIX__ + extern "C" { static gboolean EndProcessDetector(GIOChannel* source, GIOCondition, void* data) { @@ -216,7 +220,7 @@ int wxGUIAppTraits::AddProcessCallback(wxEndProcessData *proc_data, int fd) return int(id); } - +#endif // __UNIX__ // ---------------------------------------------------------------------------- // wxPlatformInfo-related @@ -284,7 +288,7 @@ wxEventLoopBase *wxGUIAppTraits::CreateEventLoop() } -#if wxUSE_INTL +#if wxUSE_INTL && defined(__UNIX__) void wxGUIAppTraits::SetLocale() { gtk_set_locale(); @@ -292,6 +296,8 @@ void wxGUIAppTraits::SetLocale() } #endif +#ifdef __UNIX__ + #if wxDEBUG_LEVEL && wxUSE_STACKWALKER // private helper class @@ -380,6 +386,10 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg) return wxAppTraitsBase::ShowAssertDialog(msg); } +#endif // __UNIX__ + +#if defined(__UNIX__) || defined(__OS2__) + wxString wxGUIAppTraits::GetDesktopEnvironment() const { wxString de = wxSystemOptions::GetOption(wxT("gtk.desktop")); @@ -398,6 +408,8 @@ wxString wxGUIAppTraits::GetDesktopEnvironment() const return de; } +#endif // __UNIX__ || __OS2__ + #ifdef __WXGTK26__ // see the hack below in wxCmdLineParser::GetUsageString(). @@ -447,6 +459,8 @@ wxString wxGetNameFromGtkOptionEntry(const GOptionEntry *opt) #endif // __WXGTK26__ +#ifdef __UNIX__ + wxString wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names, wxArrayString& desc) const @@ -497,3 +511,4 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names, return usage; } +#endif // __UNIX__ -- 2.45.2