]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/clipbrd.cpp
overriding to allocate an outer autorelease pool
[wxWidgets.git] / src / x11 / clipbrd.cpp
index c5abc23ce88e6af356b4a22c2de1085594c321ba..13af47b6e84ad8f2b421cfa3f651000be1ea9078 100644 (file)
@@ -32,11 +32,15 @@ Atom  g_clipboardAtom   = 0;
 Atom  g_targetsAtom     = 0;
 #endif
 
-#ifdef __WXDEBUG__
+// avoid warnings about unused static variable (notice that we still use it
+// even in release build if the compiler doesn't support variadic macros)
+#if defined(__WXDEBUG__) || !defined(HAVE_VARIADIC_MACROS)
+
 // 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");
+static const wxChar *TRACE_CLIPBOARD = wxT("clipboard");
+
 #endif // __WXDEBUG__
 
 //-----------------------------------------------------------------------------
@@ -87,7 +91,7 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
             if ( strcmp(gdk_atom_name(type), "TARGETS") )
             {
                 wxLogTrace( TRACE_CLIPBOARD,
-                            _T("got unsupported clipboard target") );
+                            wxT("got unsupported clipboard target") );
 
                 clipboard->m_waiting = false;
                 return;
@@ -212,7 +216,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
             wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" ));
 
             delete wxTheClipboard->m_data;
-            wxTheClipboard->m_data = (wxDataObject*) NULL;
+            wxTheClipboard->m_data = NULL;
         }
     }
 
@@ -289,8 +293,8 @@ wxClipboard::wxClipboard()
     m_ownsClipboard = false;
     m_ownsPrimarySelection = false;
 
-    m_data = (wxDataObject*) NULL;
-    m_receivedData = (wxDataObject*) NULL;
+    m_data = NULL;
+    m_receivedData = NULL;
 
     /* we use m_targetsWidget to query what formats are available */
 
@@ -302,8 +306,6 @@ wxClipboard::wxClipboard()
 
     m_formatSupported = false;
     m_targetRequested = 0;
-
-    m_usePrimary = false;
 }
 
 wxClipboard::~wxClipboard()
@@ -329,7 +331,7 @@ void wxClipboard::Clear()
         {
             m_waiting = true;
 
-            gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
+            gtk_selection_owner_set( NULL, g_clipboardAtom,
                                      (guint32) GDK_CURRENT_TIME );
 
             while (m_waiting) gtk_main_iteration();
@@ -339,7 +341,7 @@ void wxClipboard::Clear()
         {
             m_waiting = true;
 
-            gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
+            gtk_selection_owner_set( NULL, GDK_SELECTION_PRIMARY,
                                      (guint32) GDK_CURRENT_TIME );
 
             while (m_waiting) gtk_main_iteration();
@@ -349,7 +351,7 @@ void wxClipboard::Clear()
         if (m_data)
         {
             delete m_data;
-            m_data = (wxDataObject*) NULL;
+            m_data = NULL;
         }
 
 #if wxUSE_THREADS