]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/artgtk.cpp
don't use GetThemeMetric(HP_HEADERITEM, TMT_HEIGHT) as it doesn't seem to work; imple...
[wxWidgets.git] / src / gtk / artgtk.cpp
index e5fc5a45e9a7f9743a18691a8132be242507c693..07d8f4cf4cc1db938811253583085bf2e3437803 100644 (file)
     #include "wx/module.h"
 #endif
 
-#include "wx/gtk/private.h"
-
+#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:
@@ -211,7 +214,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_widget_destroy(widget);
+        gtk_object_sink((GtkObject*)widget);
     }
 
     GtkIconSet *iconset = gtk_style_lookup_icon_set(gs_gtkStyle, stockid);