From 14e880dd967afafc19b67519bbf3222f4516d679 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Wed, 21 Sep 2011 21:31:51 -0700 Subject: [PATCH] Update stash widget lookup code. --- src/stash.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/stash.c b/src/stash.c index 50d3315f..afc3f840 100644 --- a/src/stash.c +++ b/src/stash.c @@ -525,26 +525,14 @@ static void handle_combo_box_entry(GtkWidget *widget, StashPref *entry, } +/* FIXME */ /* taken from Glade 2.x generated support.c */ static GtkWidget* lookup_widget(GtkWidget *widget, const gchar *widget_name) { - GtkWidget *parent, *found_widget; + GtkWidget *found_widget; - for (;;) - { - if (GTK_IS_MENU (widget)) - parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); - else - parent = widget->parent; - if (!parent) - parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); - if (parent == NULL) - break; - widget = parent; - } - - found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); + found_widget = GTK_WIDGET(interface_get_object(widget_name)); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget;