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