[gimp] Add "display-factory" construct-only property of type GimpDialogFactory



commit e9c7b47284fbf6a0a6fc2dc796affc2e85aa1068
Author: Michael Natterer <mitch gimp org>
Date:   Fri Sep 25 01:31:08 2009 +0200

    Add "display-factory" construct-only property of type GimpDialogFactory

 app/display/gimpimagewindow.c |   18 +++++++++++++++++-
 app/display/gimpimagewindow.h |   15 ++++++++-------
 2 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 903242c..a50a4da 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -43,7 +43,8 @@
 enum
 {
   PROP_0,
-  PROP_MENU_FACTORY
+  PROP_MENU_FACTORY,
+  PROP_DISPLAY_FACTORY
 };
 
 
@@ -128,6 +129,13 @@ gimp_image_window_class_init (GimpImageWindowClass *klass)
                                                         GIMP_PARAM_WRITABLE |
                                                         G_PARAM_CONSTRUCT_ONLY));
 
+  g_object_class_install_property (object_class, PROP_DISPLAY_FACTORY,
+                                   g_param_spec_object ("display-factory",
+                                                        NULL, NULL,
+                                                        GIMP_TYPE_DIALOG_FACTORY,
+                                                        GIMP_PARAM_READWRITE |
+                                                        G_PARAM_CONSTRUCT_ONLY));
+
   gtk_rc_parse_string (image_window_rc_style);
 }
 
@@ -222,6 +230,9 @@ gimp_image_window_set_property (GObject      *object,
                                                                  FALSE);
       }
       break;
+    case PROP_DISPLAY_FACTORY:
+      window->display_factory = g_value_get_object (value);
+      break;
 
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -239,6 +250,11 @@ gimp_image_window_get_property (GObject    *object,
 
   switch (property_id)
     {
+    case PROP_DISPLAY_FACTORY:
+      g_value_set_object (value, window->display_factory);
+      break;
+
+    case PROP_MENU_FACTORY:
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
diff --git a/app/display/gimpimagewindow.h b/app/display/gimpimagewindow.h
index f5dfb41..8575bb4 100644
--- a/app/display/gimpimagewindow.h
+++ b/app/display/gimpimagewindow.h
@@ -34,17 +34,18 @@ typedef struct _GimpImageWindowClass  GimpImageWindowClass;
 
 struct _GimpImageWindow
 {
-  GimpWindow       parent_instance;
+  GimpWindow         parent_instance;
 
-  GimpDisplay     *active_display;
+  GimpDisplay       *active_display;
 
-  GimpUIManager   *menubar_manager;
+  GimpUIManager     *menubar_manager;
+  GimpDialogFactory *display_factory;
 
-  GtkWidget       *main_vbox;
-  GtkWidget       *menubar;
-  GtkWidget       *statusbar;
+  GtkWidget         *main_vbox;
+  GtkWidget         *menubar;
+  GtkWidget         *statusbar;
 
-  GdkWindowState   window_state;
+  GdkWindowState     window_state;
 };
 
 struct _GimpImageWindowClass



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