diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index d49e549ca3..b61ca8bac3 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -89,7 +89,9 @@ public: #if defined(__WXMSW__) #include "wx/msw/apptbase.h" -#else +#elif defined(__UNIX__) + #include "wx/unix/apptbase.h" +#else // no platform-specific methods to add to wxAppTraits typedef // wxAppTraits must be a class because it was forward declared as class class WXDLLEXPORT wxAppTraits : public wxAppTraitsBase diff --git a/include/wx/unix/apptrait.h b/include/wx/unix/apptrait.h index 30b96497c1..13b25fcbc6 100644 --- a/include/wx/unix/apptrait.h +++ b/include/wx/unix/apptrait.h @@ -19,7 +19,7 @@ class WXDLLEXPORT wxConsoleAppTraits : public wxConsoleAppTraitsBase { public: - virtual bool CreateEndProcessPipe(); + virtual bool CreateEndProcessPipe(wxExecuteData& execData); virtual bool IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd); virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData); virtual int WaitForChild(wxExecuteData& execData); diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 2652222813..b179284223 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -32,6 +32,7 @@ #include "wx/app.h" #include "wx/intl.h" #include "wx/list.h" + #include "wx/log.h" #include "wx/msgdlg.h" #endif diff --git a/src/common/msgout.cpp b/src/common/msgout.cpp index 2baffdcf32..aa06d2208b 100755 --- a/src/common/msgout.cpp +++ b/src/common/msgout.cpp @@ -121,7 +121,8 @@ void wxMessageOutputDebug::Printf(const wxChar* format, ...) #endif } #else // !MSW, !Mac - wxFputs(out, stderr); + // FIXME: why is wxFputs() not defined under Linux? + fputs(out.mb_str(), stderr); fflush(stderr); #endif // platform } diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index 7371b1ffbf..fc89d353ac 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -32,6 +32,7 @@ #if wxUSE_TIMER #ifndef WX_PRECOMP + #include "wx/timer.h" #endif // ---------------------------------------------------------------------------- diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 006a066446..a7b0428703 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -76,9 +76,6 @@ // global data //----------------------------------------------------------------------------- -wxApp *wxTheApp = (wxApp *) NULL; -wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL; - bool g_mainThreadLocked = FALSE; gint g_pendingTag = 0; diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 4ed43ea7fc..75972bb8b6 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -10,6 +10,7 @@ #include "wx/utils.h" #include "wx/string.h" +#include "wx/apptrait.h" #include "wx/intl.h" #include "wx/log.h" @@ -121,12 +122,14 @@ int wxDisplayDepth() return gdk_window_get_visual( wxGetRootWindow()->window )->depth; } -int wxGetOsVersion(int *majorVsn, int *minorVsn) +int wxGUIAppTraits::GetOSVersion(int *majorVsn, int *minorVsn) { - if (majorVsn) *majorVsn = GTK_MAJOR_VERSION; - if (minorVsn) *minorVsn = GTK_MINOR_VERSION; + if (majorVsn) + *majorVsn = GTK_MAJOR_VERSION; + if (minorVsn) + *minorVsn = GTK_MINOR_VERSION; - return wxGTK; + return wxGTK; } wxWindow* wxFindWindowAtPoint(const wxPoint& pt) diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 006a066446..a7b0428703 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -76,9 +76,6 @@ // global data //----------------------------------------------------------------------------- -wxApp *wxTheApp = (wxApp *) NULL; -wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL; - bool g_mainThreadLocked = FALSE; gint g_pendingTag = 0; diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 4ed43ea7fc..75972bb8b6 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -10,6 +10,7 @@ #include "wx/utils.h" #include "wx/string.h" +#include "wx/apptrait.h" #include "wx/intl.h" #include "wx/log.h" @@ -121,12 +122,14 @@ int wxDisplayDepth() return gdk_window_get_visual( wxGetRootWindow()->window )->depth; } -int wxGetOsVersion(int *majorVsn, int *minorVsn) +int wxGUIAppTraits::GetOSVersion(int *majorVsn, int *minorVsn) { - if (majorVsn) *majorVsn = GTK_MAJOR_VERSION; - if (minorVsn) *minorVsn = GTK_MINOR_VERSION; + if (majorVsn) + *majorVsn = GTK_MAJOR_VERSION; + if (minorVsn) + *minorVsn = GTK_MINOR_VERSION; - return wxGTK; + return wxGTK; } wxWindow* wxFindWindowAtPoint(const wxPoint& pt) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index f6d60dcf32..2f15a8cb26 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -21,6 +21,7 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/app.h" +#include "wx/apptrait.h" #include "wx/utils.h" #include "wx/process.h" @@ -1079,7 +1080,7 @@ bool wxGUIAppTraits::CreateEndProcessPipe(wxExecuteData& execData) bool wxGUIAppTraits::IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd) { - return fd == execData.pipeEndProcDetect[wxPipe::Write] + return fd == (execData.pipeEndProcDetect)[wxPipe::Write]; } void wxGUIAppTraits::DetachWriteFDOfEndProcessPipe(wxExecuteData& execData)