From 67756da424d237365bd310a0a8ba98398f261076 Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Wed, 15 Mar 2006 09:12:52 +0000 Subject: [PATCH] Use wxGtkString here to clean up code, and not leak in debug builds git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/clipbrd.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 35ddcd3d16..3dabd926b4 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -18,9 +18,7 @@ #include "wx/utils.h" #include "wx/log.h" -#include -#include -#include +#include "wx/gtk/private.h" //----------------------------------------------------------------------------- // thread system @@ -88,17 +86,14 @@ targets_selection_received( GtkWidget *WXUNUSED(widget), GdkAtom type = selection_data->type; if ( type != GDK_SELECTION_TYPE_ATOM ) { - gchar* atom_name = gdk_atom_name(type); - if ( strcmp(atom_name, "TARGETS") ) + if ( strcmp(wxGtkString(gdk_atom_name(type)), "TARGETS") ) { wxLogTrace( TRACE_CLIPBOARD, _T("got unsupported clipboard target") ); clipboard->m_waiting = FALSE; - g_free(atom_name); return; } - g_free(atom_name); } #ifdef __WXDEBUG__ @@ -279,9 +274,9 @@ selection_handler( GtkWidget *WXUNUSED(widget), wxLogTrace(TRACE_CLIPBOARD, _T("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(), + wxString::FromAscii(wxGtkString(gdk_atom_name(selection_data->target))).c_str(), + wxString::FromAscii(wxGtkString(gdk_atom_name(selection_data->type))).c_str(), + wxString::FromAscii(wxGtkString(gdk_atom_name(selection_data->selection))).c_str(), GPOINTER_TO_UINT( signal_data ) ); #endif