diff --git a/src/gtk/artgtk.cpp b/src/gtk/artgtk.cpp index 6153868e5c..fe7d402c9d 100644 --- a/src/gtk/artgtk.cpp +++ b/src/gtk/artgtk.cpp @@ -28,11 +28,7 @@ #include "wx/module.h" #endif -#include -#if GTK_CHECK_VERSION(2, 9, 0) - // gtk_object_sink - #undef GTK_DISABLE_DEPRECATED -#endif + #include // 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); diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 4610c07b01..138bcd5bcc 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -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() diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index bbbd626e99..e1be8ff88a 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -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; diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 7deab1ffa5..9eb43e3fc3 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -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)