]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use deprecated gtk_object_sink(), replace it with g_object_ref_sink()
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 15 Oct 2008 19:14:46 +0000 (19:14 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 15 Oct 2008 19:14:46 +0000 (19:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/artgtk.cpp
src/gtk/dataview.cpp
src/gtk/menu.cpp
src/gtk/tbargtk.cpp

index 6153868e5c0834e93917839e1933b3cbaafdb07a..fe7d402c9d00ffd65a614e73b7cb056f6ed11de4 100644 (file)
     #include "wx/module.h"
 #endif
 
-#include <gtk/gtkversion.h>
-#if GTK_CHECK_VERSION(2, 9, 0)
-    // gtk_object_sink
-    #undef GTK_DISABLE_DEPRECATED
-#endif
+
 #include <gtk/gtk.h>
 
 // compatibility with older GTK+ versions:
@@ -210,7 +206,7 @@ static GdkPixbuf *CreateStockIcon(const char *stockid, GtkIconSize size)
         gs_gtkStyle = gtk_rc_get_style(widget);
         wxASSERT( gs_gtkStyle != NULL );
         g_object_ref(gs_gtkStyle);
-        gtk_object_sink((GtkObject*)widget);
+        g_object_ref_sink(widget);
     }
 
     GtkIconSet *iconset = gtk_style_lookup_icon_set(gs_gtkStyle, stockid);
index 4610c07b01323fde08ed195bf99d005f2b1595ba..138bcd5bcc220ce4df90c452ba03dbe4090e6ef7 100644 (file)
@@ -1914,7 +1914,7 @@ wxDataViewCustomRenderer::~wxDataViewCustomRenderer()
         delete m_dc;
 
     if (m_text_renderer)
-        gtk_object_sink( GTK_OBJECT(m_text_renderer) );
+        g_object_ref_sink(m_text_renderer);
 }
 
 wxDC *wxDataViewCustomRenderer::GetDC()
index bbbd626e99e3d7987206b5f2ea1723fa2f2f51d7..e1be8ff88acf4626a545fbfed5f4b0d98c66a594 100644 (file)
@@ -706,7 +706,7 @@ void wxMenu::Init()
     // NB: keep reference to the menu so that it is not destroyed behind
     //     our back by GTK+ e.g. when it is removed from menubar:
     g_object_ref(m_menu);
-    gtk_object_sink(GTK_OBJECT(m_menu));
+    g_object_ref_sink(m_menu);
 
     m_owner = (GtkWidget*) NULL;
 
index 7deab1ffa54a348cc79ab1faf4a150184c0b8cf3..9eb43e3fc3d4e5726c71738203b7cc8bc4499f03 100644 (file)
@@ -378,7 +378,7 @@ bool wxToolBar::Create( wxWindow *parent,
     m_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
     m_tooltips = gtk_tooltips_new();
     g_object_ref(m_tooltips);
-    gtk_object_sink(GTK_OBJECT(m_tooltips));
+    g_object_ref_sink(m_tooltips);
     GtkSetStyle();
 
     if (style & wxTB_DOCKABLE)