[gimp] app: turn "context" into a CONSTRUCT_ONLY property and assert it being set



commit 0f47beff78b268d0a0a3b2f0a7ee10b46cc72a86
Author: Michael Natterer <mitch gimp org>
Date:   Sun Apr 11 16:17:27 2010 +0200

    app: turn "context" into a CONSTRUCT_ONLY property and assert it being set

 app/widgets/gimpdataeditor.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdataeditor.c b/app/widgets/gimpdataeditor.c
index 1bec49d..0ef818a 100644
--- a/app/widgets/gimpdataeditor.c
+++ b/app/widgets/gimpdataeditor.c
@@ -141,7 +141,8 @@ gimp_data_editor_class_init (GimpDataEditorClass *klass)
                                    g_param_spec_object ("context",
                                                         NULL, NULL,
                                                         GIMP_TYPE_CONTEXT,
-                                                        GIMP_PARAM_READWRITE));
+                                                        GIMP_PARAM_READWRITE |
+                                                        G_PARAM_CONSTRUCT_ONLY));
 
   g_object_class_install_property (object_class, PROP_DATA,
                                    g_param_spec_object ("data",
@@ -210,6 +211,7 @@ gimp_data_editor_constructor (GType                  type,
   editor = GIMP_DATA_EDITOR (object);
 
   g_assert (GIMP_IS_DATA_FACTORY (editor->data_factory));
+  g_assert (GIMP_IS_CONTEXT (editor->context));
 
   gimp_data_editor_set_edit_active (editor, TRUE);
 



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