[gimp] modules: turn GimpColorWheel into a proper dynamically loaded type



commit 2cd25ec863dd47f8dd00776031abad1d9a455ff8
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jul 14 13:41:29 2013 +0200

    modules: turn GimpColorWheel into a proper dynamically loaded type
    
    So it works with all GObject versions, until we determine how useful
    it is generally, and what API it should get for possible
    libgimpwidgets inclusion.

 modules/color-selector-wheel.c |    1 +
 modules/gimpcolorwheel.c       |   13 ++++++++++++-
 modules/gimpcolorwheel.h       |    2 ++
 3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/modules/color-selector-wheel.c b/modules/color-selector-wheel.c
index e0e2635..eecdf9b 100644
--- a/modules/color-selector-wheel.c
+++ b/modules/color-selector-wheel.c
@@ -88,6 +88,7 @@ gimp_module_query (GTypeModule *module)
 G_MODULE_EXPORT gboolean
 gimp_module_register (GTypeModule *module)
 {
+  color_wheel_register_type (module);
   colorsel_wheel_register_type (module);
 
   return TRUE;
diff --git a/modules/gimpcolorwheel.c b/modules/gimpcolorwheel.c
index 216cb57..8de1085 100644
--- a/modules/gimpcolorwheel.c
+++ b/modules/gimpcolorwheel.c
@@ -115,11 +115,17 @@ static void     gimp_color_wheel_move           (GimpColorWheel     *wheel,
 
 static guint wheel_signals[LAST_SIGNAL];
 
-G_DEFINE_TYPE (GimpColorWheel, gimp_color_wheel, GTK_TYPE_WIDGET)
+G_DEFINE_DYNAMIC_TYPE (GimpColorWheel, gimp_color_wheel, GTK_TYPE_WIDGET)
 
 #define parent_class gimp_color_wheel_parent_class
 
 
+void
+color_wheel_register_type (GTypeModule *module)
+{
+  gimp_color_wheel_register_type (module);
+}
+
 static void
 gimp_color_wheel_class_init (GimpColorWheelClass *class)
 {
@@ -197,6 +203,11 @@ gimp_color_wheel_class_init (GimpColorWheelClass *class)
 }
 
 static void
+gimp_color_wheel_class_finalize (GimpColorWheelClass *klass)
+{
+}
+
+static void
 gimp_color_wheel_init (GimpColorWheel *wheel)
 {
   GimpColorWheelPrivate *priv;
diff --git a/modules/gimpcolorwheel.h b/modules/gimpcolorwheel.h
index 016fb59..7209357 100644
--- a/modules/gimpcolorwheel.h
+++ b/modules/gimpcolorwheel.h
@@ -72,6 +72,8 @@ struct _GimpColorWheelClass
 };
 
 
+void        color_wheel_register_type          (GTypeModule *module);
+
 GType       gimp_color_wheel_get_type          (void) G_GNUC_CONST;
 GtkWidget * gimp_color_wheel_new               (void);
 


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