summaryrefslogtreecommitdiff
path: root/shell/cc-notebook.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-06-12 13:57:19 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2012-06-12 13:58:17 -0400
commitf8da96e4259ac331c69587aec26f8c777ed4111b (patch)
tree3a54c843da0be764e4b1e4ef88bf54ccf4949baf /shell/cc-notebook.c
parent54d24f0574c1ada8eb3ec6d48cb2b9990cb12950 (diff)
downloadgnome-control-center-f8da96e4259ac331c69587aec26f8c777ed4111b.tar.gz
shell: Make CcNotebook buildable
Diffstat (limited to 'shell/cc-notebook.c')
-rw-r--r--shell/cc-notebook.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/shell/cc-notebook.c b/shell/cc-notebook.c
index 77e23de71..ac7ffd821 100644
--- a/shell/cc-notebook.c
+++ b/shell/cc-notebook.c
@@ -68,7 +68,18 @@ enum
static GParamSpec *obj_props[LAST_PROP] = { NULL, };
-G_DEFINE_TYPE (CcNotebook, cc_notebook, GTK_TYPE_BOX)
+static void
+cc_notebook_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type);
+
+static void
+cc_notebook_buildable_init (GtkBuildableIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (CcNotebook, cc_notebook, GTK_TYPE_BOX,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
+ cc_notebook_buildable_init))
static void
cc_notebook_get_property (GObject *gobject,
@@ -536,3 +547,19 @@ cc_notebook_get_selected_page (CcNotebook *self)
return self->priv->selected_page;
}
+
+static void
+cc_notebook_buildable_add_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *type)
+{
+ CcNotebook *notebook = CC_NOTEBOOK (buildable);
+ cc_notebook_add_page (notebook, GTK_WIDGET (child));
+}
+
+static void
+cc_notebook_buildable_init (GtkBuildableIface *iface)
+{
+ iface->add_child = cc_notebook_buildable_add_child;
+}