// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
-static const wxChar *TRACE_CLIPBOARD = _T("clipboard");
+#define TRACE_CLIPBOARD "clipboard"
//-----------------------------------------------------------------------------
// reminder
if ( strcmp(atom_name, "TARGETS") )
{
wxLogTrace( TRACE_CLIPBOARD,
- _T("got unsupported clipboard target") );
+ wxT("got unsupported clipboard target") );
clipboard->m_waiting = false;
g_free(atom_name);
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;
{
wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" ));
- delete wxTheClipboard->m_data;
- wxTheClipboard->m_data = NULL;
+ wxDELETE(wxTheClipboard->m_data);
}
}
(guchar*)&(timestamp),
sizeof(timestamp));
wxLogTrace(TRACE_CLIPBOARD,
- _T("Clipboard TIMESTAMP requested, returning timestamp=%u"),
+ wxT("Clipboard TIMESTAMP requested, returning timestamp=%u"),
timestamp);
return;
}
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"),
+ wxT("clipboard data in format %s, GtkSelectionData is target=%s type=%s selection=%s timestamp=%u"),
format.GetId().c_str(),
wxString::FromAscii(gdk_atom_name(selection_data->target)).c_str(),
wxString::FromAscii(gdk_atom_name(selection_data->type)).c_str(),
wxString::FromAscii(gdk_atom_name(selection_data->selection)).c_str(),
GPOINTER_TO_UINT( signal_data )
);
-#endif
if (!data->IsSupportedFormat( format )) return;
while (m_waiting) gtk_main_iteration();
}
- if (m_data)
- {
- delete m_data;
- m_data = NULL;
- }
+ wxDELETE(m_data);
#if wxUSE_THREADS
/* re-enable GUI threads */