summaryrefslogtreecommitdiff
path: root/gtk/gtkstack.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-02-13 14:14:54 -0500
committerMatthias Clasen <mclasen@redhat.com>2019-02-13 14:14:54 -0500
commit6ef775dbcb42b4c3dc466ae11228c8dca2a3785f (patch)
tree880ae6a8d5548b1d702789fc9513becf98901c59 /gtk/gtkstack.c
parent927e983ff8b18af7d46dc6b5b92c00114d08baae (diff)
downloadgtk+-6ef775dbcb42b4c3dc466ae11228c8dca2a3785f.tar.gz
stack: Add a pages property
This makes the list model available in the inspector.
Diffstat (limited to 'gtk/gtkstack.c')
-rw-r--r--gtk/gtkstack.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 7a23d471f3..eb9504f6ef 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -161,6 +161,7 @@ enum {
PROP_TRANSITION_TYPE,
PROP_TRANSITION_RUNNING,
PROP_INTERPOLATE_SIZE,
+ PROP_PAGES,
LAST_PROP
};
@@ -654,6 +655,9 @@ gtk_stack_get_property (GObject *object,
case PROP_INTERPOLATE_SIZE:
g_value_set_boolean (value, gtk_stack_get_interpolate_size (stack));
break;
+ case PROP_PAGES:
+ g_value_set_object (value, gtk_stack_get_pages (stack));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -770,6 +774,10 @@ gtk_stack_class_init (GtkStackClass *klass)
FALSE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ stack_props[PROP_PAGES] =
+ g_param_spec_object ("pages", P_("Pages"), P_("A selection model with the stacks pages"),
+ GTK_TYPE_SELECTION_MODEL,
+ GTK_PARAM_READABLE);
g_object_class_install_properties (object_class, LAST_PROP, stack_props);