diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-10-25 18:34:01 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-10-25 18:34:01 -0400 |
commit | 2d6ae4d29f071a4aa93d5cdc77e504fb38f4af4d (patch) | |
tree | 0777c83d191b16085c7203e604811828c25c742f | |
parent | 05e36c30d8a913eb9627aa723068d334021a6bd0 (diff) | |
download | glade-2d6ae4d29f071a4aa93d5cdc77e504fb38f4af4d.tar.gz |
Add a get_children function for GtkSearchBar
This is needed to make saving children of GtkSearchBar work.
gtk_container_forall is sdaly broken for many containers.
-rw-r--r-- | plugins/gtk+/glade-gtk-searchbar.c | 11 | ||||
-rw-r--r-- | plugins/gtk+/gtk+.xml.in | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/plugins/gtk+/glade-gtk-searchbar.c b/plugins/gtk+/glade-gtk-searchbar.c index 9f222e81..30c25b52 100644 --- a/plugins/gtk+/glade-gtk-searchbar.c +++ b/plugins/gtk+/glade-gtk-searchbar.c @@ -44,6 +44,17 @@ glade_gtk_search_bar_post_create (GladeWidgetAdaptor *adaptor, gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (widget), FALSE); } +GList * +glade_gtk_search_bar_get_children (GladeWidgetAdaptor * adaptor, + GtkSearchBar * searchbar) +{ + GObject *current; + + current = g_object_get_data (G_OBJECT (searchbar), "child"); + + return g_list_append (NULL, current); +} + gboolean glade_gtk_search_bar_add_verify (GladeWidgetAdaptor *adaptor, GtkWidget *container, diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in index e9ada68b..4e9ee37f 100644 --- a/plugins/gtk+/gtk+.xml.in +++ b/plugins/gtk+/gtk+.xml.in @@ -1608,6 +1608,7 @@ <glade-widget-class name="GtkSearchBar" generic-name="searchbar" _title="Search Bar" since="3.10"> <post-create-function>glade_gtk_search_bar_post_create</post-create-function> + <get-children-function>glade_gtk_search_bar_get_children</get-children-function> <add-child-verify-function>glade_gtk_search_bar_add_verify</add-child-verify-function> <add-child-function>glade_gtk_search_bar_add_child</add-child-function> <remove-child-function>glade_gtk_search_bar_remove_child</remove-child-function> |