fixed i18n warning.
[gjacktransport.git] / src / support.c
blobb553c9d64063922e83c027ab204ec4ff6d0944fc
1 /*
2 * DO NOT EDIT THIS FILE - it is generated by Glade.
3 */
5 #ifdef HAVE_CONFIG_H
6 # include <config.h>
7 #endif
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <unistd.h>
12 #include <string.h>
13 #include <stdio.h>
15 #include <gtk/gtk.h>
17 #include "support.h"
19 GtkWidget*
20 lookup_widget (GtkWidget *widget,
21 const gchar *widget_name)
23 GtkWidget *parent, *found_widget;
25 for (;;)
27 if (GTK_IS_MENU (widget))
28 parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
29 else
30 parent = widget->parent;
31 if (!parent)
32 parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
33 if (parent == NULL)
34 break;
35 widget = parent;
38 found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
39 widget_name);
40 if (!found_widget)
41 g_warning ("Widget not found: %s", widget_name);
42 return found_widget;