[gnome-builder] devhelp: add read-only property to GbDevhelpDocument.



commit 0d3d37eb2ed3f5a283342e88b66bc8f6e8ab0065
Author: Christian Hergert <christian hergert me>
Date:   Sat Jan 10 23:52:07 2015 -0800

    devhelp: add read-only property to GbDevhelpDocument.

 src/devhelp/gb-devhelp-document.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/devhelp/gb-devhelp-document.c b/src/devhelp/gb-devhelp-document.c
index 8d75bb2..34316f1 100644
--- a/src/devhelp/gb-devhelp-document.c
+++ b/src/devhelp/gb-devhelp-document.c
@@ -45,6 +45,7 @@ G_DEFINE_TYPE_EXTENDED (GbDevhelpDocument,
 enum {
   PROP_0,
   PROP_MODIFIED,
+  PROP_READ_ONLY,
   PROP_TITLE,
   PROP_URI,
   LAST_PROP
@@ -206,6 +207,10 @@ gb_devhelp_document_get_property (GObject    *object,
                            gb_devhelp_document_get_modified (GB_DOCUMENT (self)));
       break;
 
+    case PROP_READ_ONLY:
+      g_value_set_boolean (value, TRUE);
+      break;
+
     case PROP_TITLE:
       g_value_set_string (value,
                           gb_devhelp_document_get_title (GB_DOCUMENT (self)));
@@ -243,8 +248,9 @@ gb_devhelp_document_class_init (GbDevhelpDocumentClass *klass)
   object_class->get_property = gb_devhelp_document_get_property;
   object_class->set_property = gb_devhelp_document_set_property;
 
-  g_object_class_override_property (object_class, PROP_TITLE, "title");
   g_object_class_override_property (object_class, PROP_MODIFIED, "modified");
+  g_object_class_override_property (object_class, PROP_READ_ONLY, "read-only");
+  g_object_class_override_property (object_class, PROP_TITLE, "title");
 
   gParamSpecs [PROP_URI] =
     g_param_spec_string ("uri",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]