summaryrefslogtreecommitdiff
path: root/gtk/gtkstack.h
diff options
context:
space:
mode:
authorSteve Frécinaux <code@istique.net>2014-01-20 09:32:37 +0100
committerSteve Frécinaux <code@istique.net>2014-01-21 09:35:22 +0100
commit49bf3cdba8b779d36ad776379921204b2387a02e (patch)
treed67a36195acc23c171f4b189e7fea72639f35e61 /gtk/gtkstack.h
parente658bfa2de81d427b74a827a35b81c1ec717c0d0 (diff)
downloadgtk+-49bf3cdba8b779d36ad776379921204b2387a02e.tar.gz
GtkStack: add gtk_stack_get_child_by_name()
This new method allows getting a widget from a GtkStack when we know its name, and will also return NULL if there is no widget going by that name. Usage example would be to check if a child with a given name exists before calling gtk_stack_set_visible_child_name(). https://bugzilla.gnome.org/show_bug.cgi?id=722588
Diffstat (limited to 'gtk/gtkstack.h')
-rw-r--r--gtk/gtkstack.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkstack.h b/gtk/gtkstack.h
index d0bb47188a..edecf7f5a3 100644
--- a/gtk/gtkstack.h
+++ b/gtk/gtkstack.h
@@ -79,6 +79,9 @@ void gtk_stack_add_titled (GtkStack
GtkWidget *child,
const gchar *name,
const gchar *title);
+GDK_AVAILABLE_IN_3_12
+GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack,
+ const gchar *name);
GDK_AVAILABLE_IN_3_10
void gtk_stack_set_visible_child (GtkStack *stack,
GtkWidget *child);