X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=contrib%2Fbrushexport%2Fsupport.cpp;h=768f213a6f77add162ccd54da793e1cfae97ebfe;hb=c52a4bd4da209e657018e8d799dcb488cd848e4c;hp=79c5e145b6939eb4ef6aa1f0a32b1fecc11e5679;hpb=d347e813d359c2c4c9fc72aaa25aec2e078a8390;p=xonotic%2Fnetradiant.git diff --git a/contrib/brushexport/support.cpp b/contrib/brushexport/support.cpp index 79c5e145..768f213a 100644 --- a/contrib/brushexport/support.cpp +++ b/contrib/brushexport/support.cpp @@ -1,8 +1,9 @@ #include +#include #include "support.h" -GtkWidget* +ui::Widget lookup_widget( GtkWidget *widget, const gchar *widget_name ){ GtkWidget *parent, *found_widget; @@ -13,7 +14,7 @@ lookup_widget( GtkWidget *widget, parent = gtk_menu_get_attach_widget( GTK_MENU( widget ) ); } else{ - parent = widget->parent; + parent = gtk_widget_get_parent(widget); } if ( !parent ) { parent = (GtkWidget*) g_object_get_data( G_OBJECT( widget ), "GladeParentKey" ); @@ -29,5 +30,5 @@ lookup_widget( GtkWidget *widget, if ( !found_widget ) { g_warning( "Widget not found: %s", widget_name ); } - return found_widget; + return ui::Widget(found_widget); }