[glade/searchbar: 3/3] Add a get_children function for GtkSearchBar
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/searchbar: 3/3] Add a get_children function for GtkSearchBar
- Date: Sat, 25 Oct 2014 22:37:20 +0000 (UTC)
commit 2d6ae4d29f071a4aa93d5cdc77e504fb38f4af4d
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 25 18:34:01 2014 -0400
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.
plugins/gtk+/glade-gtk-searchbar.c | 11 +++++++++++
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 9f222e8..30c25b5 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 e9ada68..4e9ee37 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]