Add ui_builder_get_object()

This is used to get any object built from the UI file, not widgets only.
This commit is contained in:
Colomban Wendling 2012-01-20 19:14:31 +01:00
parent 21cd7bb213
commit 9130b84d86
2 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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);