diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-11-01 19:53:51 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-12-19 12:45:50 -0500 |
commit | 1ddaf01aed98462dfdd13370ec3d62d468cf343f (patch) | |
tree | 28c7ccc55371a7d255df3351b15cf4b00b2f4606 /gtk/gtkbuilder.c | |
parent | fd9df1864b2ad52363e62bd54ea6a3dbb8e9ebfd (diff) | |
download | gtk+-1ddaf01aed98462dfdd13370ec3d62d468cf343f.tar.gz |
Quick-and-dirty GtkBuilder integration
This makes GtkBuilder accept a GMenuMarkup tree at the toplevel
(ie with <menu id='foo'> being a child of <interface>) and the resulting
GMenu object can be obtained via gtk_builder_get_object (builder, "foo").
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r-- | gtk/gtkbuilder.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 10373f6c27..de24427bb5 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -731,6 +731,13 @@ _gtk_builder_construct (GtkBuilder *builder, return obj; } +void +_gtk_builder_add_object (GtkBuilder *builder, + const gchar *id, + GObject *object) +{ + g_hash_table_insert (builder->priv->objects, g_strdup (id), g_object_ref (object)); +} void _gtk_builder_add (GtkBuilder *builder, |