From 731dd422ea491e7de32209895c88bc9897574726 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 18 Jan 2000 21:21:33 +0000 Subject: [PATCH] 1. fixed compilation of wxExecute() for !wxUSE_IPC 2. wxLogStatus() will not assert if there is no statusbar to set text for git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/logg.cpp | 2 +- src/msw/utilsexc.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index c38a09de27..51bbdd6f43 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -198,7 +198,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t) } } - if ( pFrame != NULL ) + if ( pFrame && pFrame->GetStatusBar() ) pFrame->SetStatusText(szString); } #endif // wxUSE_STATUSBAR diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 6f2ee55757..9429ecb4f7 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -74,7 +74,9 @@ #endif #include -#include "wx/dde.h" // for WX_DDE hack in wxExecute +#if wxUSE_IPC + #include "wx/dde.h" // for WX_DDE hack in wxExecute +#endif // wxUSE_IPC // ---------------------------------------------------------------------------- // constants @@ -177,12 +179,13 @@ LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message, return DefWindowProc(hWnd, message, wParam, lParam); } } -#endif +#endif // Win32 long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) { wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") ); +#if wxUSE_IPC // DDE hack: this is really not pretty, but we need to allow this for // transparent handling of DDE servers in wxMimeTypesManager. Usually it // returns the command which should be run to view/open/... a file of the @@ -247,6 +250,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) } } else +#endif // wxUSE_IPC { // no DDE command = cmd; @@ -410,6 +414,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) return pi.dwProcessId; } +#if wxUSE_IPC // second part of DDE hack: now establish the DDE conversation with the // just launched process if ( !!ddeServer ) @@ -423,6 +428,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) wxLogError(_("Couldn't launch DDE server '%s'."), command.c_str()); } } +#endif // wxUSE_IPC if ( !sync ) { -- 2.45.2