diff --git a/src/ui_utils.c b/src/ui_utils.c index df48519a..da004a7e 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2444,6 +2444,15 @@ GtkWidget *ui_lookup_widget(GtkWidget *widget, const gchar *widget_name) } +/* wraps gtk_builder_get_object() + * unlike ui_lookup_widget(), it does only support getting object created from the main + * UI file, but it can fetch any object, not only widgets */ +gpointer ui_builder_get_object (const gchar *name) +{ + return gtk_builder_get_object (builder, name); +} + + /* Progress Bar */ static guint progress_bar_timer_id = 0; diff --git a/src/ui_utils.h b/src/ui_utils.h index 6305bd8a..57a17241 100644 --- a/src/ui_utils.h +++ b/src/ui_utils.h @@ -209,6 +209,8 @@ void ui_widget_set_tooltip_text(GtkWidget *widget, const gchar *text); GtkWidget *ui_lookup_widget(GtkWidget *widget, const gchar *widget_name); +gpointer ui_builder_get_object (const gchar *name); + /* Compatibility functions */ GtkWidget *create_edit_menu1(void); GtkWidget *create_prefs_dialog(void);