replace more __WXDEBUG__ occurrences with wxDEBUG_LEVEL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,12 +92,10 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
|
||||
g_free(atom_name);
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
wxDataFormat clip( selection_data->selection );
|
||||
wxLogTrace( TRACE_CLIPBOARD,
|
||||
wxT("selection received for targets, clipboard %s"),
|
||||
clip.GetId().c_str() );
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
// the atoms we received, holding a list of targets (= formats)
|
||||
GdkAtom *atoms = (GdkAtom *)selection_data->data;
|
||||
@@ -266,7 +264,6 @@ selection_handler( GtkWidget *WXUNUSED(widget),
|
||||
|
||||
wxDataFormat format( selection_data->target );
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
wxLogTrace(TRACE_CLIPBOARD,
|
||||
_T("clipboard data in format %s, GtkSelectionData is target=%s type=%s selection=%s timestamp=%u"),
|
||||
format.GetId().c_str(),
|
||||
@@ -275,7 +272,6 @@ selection_handler( GtkWidget *WXUNUSED(widget),
|
||||
wxString::FromAscii(gdk_atom_name(selection_data->selection)).c_str(),
|
||||
GPOINTER_TO_UINT( signal_data )
|
||||
);
|
||||
#endif
|
||||
|
||||
if (!data->IsSupportedFormat( format )) return;
|
||||
|
||||
|
@@ -97,26 +97,6 @@ public:
|
||||
// and this one also modifies all the other font data fields
|
||||
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
||||
|
||||
// debugger helper: shows what the font really is
|
||||
//
|
||||
// VZ: I need this as my gdb either shows wildly wrong values or crashes
|
||||
// when I ask it to "p fontRefData" :-(
|
||||
#if defined(__WXDEBUG__)
|
||||
void Dump() const
|
||||
{
|
||||
wxPrintf(_T("%s-%s-%s-%d-%d\n"),
|
||||
m_faceName.c_str(),
|
||||
m_weight == wxFONTWEIGHT_NORMAL
|
||||
? _T("normal")
|
||||
: m_weight == wxFONTWEIGHT_BOLD
|
||||
? _T("bold")
|
||||
: _T("light"),
|
||||
m_style == wxFONTSTYLE_NORMAL ? _T("regular") : _T("italic"),
|
||||
m_pointSize,
|
||||
m_encoding);
|
||||
}
|
||||
#endif // Debug
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init(int pointSize,
|
||||
|
@@ -430,15 +430,13 @@ int wxNotebook::DoSetSelection( size_t page, int flags )
|
||||
m_selection = page;
|
||||
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
if ( !(flags & SetSelection_SendEvent) )
|
||||
{
|
||||
// gtk_notebook_set_current_page will emit the switch-page signal which will be
|
||||
// caught by our gtk_notebook_page_change_callback which should have reset the
|
||||
// flag to false:
|
||||
wxASSERT(!m_skipNextPageChangeEvent);
|
||||
}
|
||||
#endif // __WXDEBUG__
|
||||
// gtk_notebook_set_current_page is supposed to emit the switch-page signal
|
||||
// which should be caught by our gtk_notebook_page_change_callback which
|
||||
// should have reset the flag to false, check it:
|
||||
wxASSERT_LEVEL_2(
|
||||
(flags & SetSelection_SendEvent) || !m_skipNextPageChangeEvent,
|
||||
"internal error in selection events generation"
|
||||
);
|
||||
|
||||
wxNotebookPage *client = GetPage(page);
|
||||
if ( client )
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
||||
#include "wx/fontutil.h"
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#if wxDEBUG_LEVEL
|
||||
#include "wx/thread.h"
|
||||
#endif
|
||||
|
||||
@@ -236,16 +236,13 @@ extern bool g_mainThreadLocked;
|
||||
// debug
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
#if wxUSE_THREADS
|
||||
# define DEBUG_MAIN_THREAD if (wxThread::IsMain() && g_mainThreadLocked) printf("gui reentrance");
|
||||
# define DEBUG_MAIN_THREAD \
|
||||
wxASSERT_MSG( !g_mainThreadLocked || !wxThread::IsMain(), \
|
||||
"GUI reentrancy detected" )
|
||||
#else
|
||||
# define DEBUG_MAIN_THREAD
|
||||
#endif
|
||||
#else
|
||||
#define DEBUG_MAIN_THREAD
|
||||
#endif // Debug
|
||||
|
||||
// the trace mask used for the focus debugging messages
|
||||
#define TRACE_FOCUS _T("focus")
|
||||
|
Reference in New Issue
Block a user