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
This commit is contained in:
Vadim Zeitlin
2012-06-17 21:34:54 +00:00
parent a7130edbab
commit 85b1dc6e3c

View File

@@ -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__