2 #include <uilib/uilib.h>
7 lookup_widget( GtkWidget *widget,
8 const gchar *widget_name ){
9 GtkWidget *parent, *found_widget;
13 if ( GTK_IS_MENU( widget ) ) {
14 parent = gtk_menu_get_attach_widget( GTK_MENU( widget ) );
17 parent = gtk_widget_get_parent(widget);
20 parent = (GtkWidget*) g_object_get_data( G_OBJECT( widget ), "GladeParentKey" );
22 if ( parent == NULL ) {
28 found_widget = (GtkWidget*) g_object_get_data( G_OBJECT( widget ),
30 if ( !found_widget ) {
31 g_warning( "Widget not found: %s", widget_name );
33 return ui::Widget(found_widget);