[gnome-builder/wip/libide] documents: make back-forward-list a gproperty of GbDocumentView
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] documents: make back-forward-list a gproperty of GbDocumentView
- Date: Wed, 11 Feb 2015 19:13:13 +0000 (UTC)
commit 8ae44c45b1ad41c947897486d6cd2b78c2f8c4e9
Author: Christian Hergert <christian hergert me>
Date: Wed Feb 11 11:12:29 2015 -0800
documents: make back-forward-list a gproperty of GbDocumentView
src/documents/gb-document-view.c | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/src/documents/gb-document-view.c b/src/documents/gb-document-view.c
index f08f79c..3976748 100644
--- a/src/documents/gb-document-view.c
+++ b/src/documents/gb-document-view.c
@@ -184,6 +184,10 @@ gb_document_view_get_property (GObject *object,
switch (prop_id)
{
+ case PROP_BACK_FORWARD_LIST:
+ g_value_set_object (value, gb_document_view_get_back_forward_list (self));
+ break;
+
case PROP_CAN_PREVIEW:
g_value_set_boolean (value, gb_document_view_get_can_preview (self));
break;
@@ -202,15 +206,45 @@ gb_document_view_get_property (GObject *object,
}
static void
+gb_document_view_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GbDocumentView *self = GB_DOCUMENT_VIEW (object);
+
+ switch (prop_id)
+ {
+ case PROP_BACK_FORWARD_LIST:
+ gb_document_view_set_back_forward_list (self, g_value_get_object (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+
+static void
gb_document_view_class_init (GbDocumentViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->get_property = gb_document_view_get_property;
+ object_class->set_property = gb_document_view_set_property;
widget_class->destroy = gb_document_view_destroy;
+ gParamSpecs [PROP_BACK_FORWARD_LIST] =
+ g_param_spec_object ("back-forward-list",
+ _("Back Forward List"),
+ _("The back/forward history for the stack."),
+ IDE_TYPE_BACK_FORWARD_LIST,
+ (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (object_class, PROP_BACK_FORWARD_LIST,
+ gParamSpecs [PROP_BACK_FORWARD_LIST]);
+
gParamSpecs [PROP_CAN_PREVIEW] =
g_param_spec_boolean ("can-preview",
_("Can Preview"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]