with WXWIN_COMPATIBILITY_2_2)
2. moved wxInternalErrorStr and wxFatalErrorStr to a common file
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: include/wx/app.h include/wx/chkconf.h include/wx/utils.h
CVS: src/common/appcmn.cpp src/common/fontmap.cpp
CVS: src/common/utilscmn.cpp src/gtk/data.cpp src/mac/data.cpp
CVS: src/mac/utils.cpp src/msw/data.cpp src/msw/utils.cpp
CVS: src/os2/DATA.CPP src/os2/UTILS.CPP src/unix/utilsunx.cpp
CVS: ----------------------------------------------------------------------
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14351
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// (such as wxMGL). This method should be called from wxApp:OnInitGui
virtual bool SetDisplayMode(const wxDisplayModeInfo& WXUNUSED(info)) { return TRUE; }
- // VZ: what does this do exactly?
- void SetWantDebugOutput( bool flag ) { m_wantDebugOutput = flag; }
- bool GetWantDebugOutput() const { return m_wantDebugOutput; }
-
// set use of best visual flag (see below)
void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; }
bool GetUseBestVisual() const { return m_useBestVisual; }
virtual void OnAssert(const wxChar *file, int line, const wxChar *msg);
#endif // __WXDEBUG__
+ // deprecated functions, please updae your code to not use them!
+ // -------------------------------------------------------------
+
+#if WXWIN_COMPATIBILITY_2_2
+ // used by obsolete wxDebugMsg only
+ void SetWantDebugOutput( bool flag ) { m_wantDebugOutput = flag; }
+ bool GetWantDebugOutput() const { return m_wantDebugOutput; }
+
+ // TRUE if the application wants to get debug output
+ bool m_wantDebugOutput;
+#endif // WXWIN_COMPATIBILITY_2_2
+
// implementation only from now on
// -------------------------------
m_appName, // app name
m_className; // class name
- // TRUE if the application wants to get debug output
- bool m_wantDebugOutput;
-
#if wxUSE_GUI
// the main top level window - may be NULL
wxWindow *m_topWindow;
// Error message functions used by wxWindows (deprecated, use wxLog)
// ----------------------------------------------------------------------------
+#if WXWIN_COMPATIBILITY_2_2
+
// Format a message on the standard error (UNIX) or the debugging
// stream (Windows)
WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...);
WXDLLEXPORT_DATA(extern const wxChar*) wxFatalErrorStr;
WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr);
+#endif // WXWIN_COMPATIBILITY_2_2
#endif
// _WX_UTILSH__
{
wxTheApp = (wxApp *)this;
- // VZ: what's this? is it obsolete?
+#if WXWIN_COMPATIBILITY_2_2
m_wantDebugOutput = FALSE;
+#endif // WXWIN_COMPATIBILITY_2_2
#if wxUSE_GUI
m_topWindow = (wxWindow *)NULL;
// message
if ( encoding == wxFONTENCODING_SYSTEM )
{
- wxFatalError(_("can't load any font, aborting"));
+ wxLogFatalError(_("can't load any font, aborting"));
- // wxFatalError doesn't return
+ // wxLogFatalError doesn't return
}
wxString configEntry,
#include "wx/msw/private.h"
#endif
+// ----------------------------------------------------------------------------
+// common data
+// ----------------------------------------------------------------------------
+
+#if WXWIN_COMPATIBILITY_2_2
+ const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
+ const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
+#endif // WXWIN_COMPATIBILITY_2_2
+
// ----------------------------------------------------------------------------
// function protoypes
// ----------------------------------------------------------------------------
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*");
-const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*");
-const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*.*");
-const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
{
}
+#if WXWIN_COMPATIBILITY_2_2
+
// Output a debug message, in a system dependent fashion.
void wxDebugMsg(const char *fmt ...)
{
wxMessageBox(wxBuffer);
wxExit();
}
+
+#endif // WXWIN_COMPATIBILITY_2_2
+
#endif // !__DARWIN__
// Emit a beeeeeep
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*.*");
-const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
{
}
+#if WXWIN_COMPATIBILITY_2_2
+
// Output a debug message, in a system dependent fashion.
void wxDebugMsg(const char *fmt ...)
{
wxMessageBox(wxBuffer);
wxExit();
}
+
+#endif // WXWIN_COMPATIBILITY_2_2
+
#endif // !__DARWIN__
// Emit a beeeeeep
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*.*");
-const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
// deprecated (in favour of wxLog) log functions
// ----------------------------------------------------------------------------
-#if wxUSE_GUI
+#if WXWIN_COMPATIBILITY_2_2
// Output a debug mess., in a system dependent fashion.
#ifndef __WXMICROWIN__
}
#endif // __WXMICROWIN__
+#endif // WXWIN_COMPATIBILITY_2_2
+
+#if wxUSE_GUI
+
// ----------------------------------------------------------------------------
// functions to work with .INI files
// ----------------------------------------------------------------------------
#endif // Win16/32
}
-#endif // wxUSE_GUI
-
-#if wxUSE_GUI
-
// ----------------------------------------------------------------------------
// Metafile helpers
// ----------------------------------------------------------------------------
const wxChar* wxMessageBoxCaptionStr = wxT("Message");
const wxChar* wxFileSelectorPromptStr = wxT("Select a file");
const wxChar* wxFileSelectorDefaultWildcardStr = wxT("*.*");
-const wxChar* wxInternalErrorStr = wxT("wxWindows Internal Error");
-const wxChar* wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar* wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar* wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar* wxDirDialogDefaultFolderStr = wxT("/");
// wxYield();
}
+#if WXWIN_COMPATIBILITY_2_2
+
// Output a debug mess., in a system dependent fashion.
void wxDebugMsg(
const wxChar* zFmt ...
DosExit(EXIT_PROCESS, ulRc);
}
+#endif // WXWIN_COMPATIBILITY_2_2
+
// Emit a beeeeeep
void wxBell()
{
// error and debug output routines (deprecated, use wxLog)
// ----------------------------------------------------------------------------
+#if WXWIN_COMPATIBILITY_2_2
+
void wxDebugMsg( const char *format, ... )
{
va_list ap;
exit(3); // the same exit code as for abort()
}
+#endif // WXWIN_COMPATIBILITY_2_2
+