[gimp/gtk3-port: 73/236] modules: s/GtkObject/GtkAdjustment/



commit 712145971e9d5e9ea6a254baac5a2e0067bf90d2
Author: Michael Natterer <mitch gimp org>
Date:   Wed Oct 20 12:17:06 2010 +0200

    modules: s/GtkObject/GtkAdjustment/

 modules/color-selector-cmyk-lcms.c |   27 ++++++++++++---------------
 modules/color-selector-cmyk.c      |   10 +++++-----
 modules/color-selector-water.c     |   12 ++++++------
 3 files changed, 23 insertions(+), 26 deletions(-)
---
diff --git a/modules/color-selector-cmyk-lcms.c b/modules/color-selector-cmyk-lcms.c
index 0d5d20f..a748960 100644
--- a/modules/color-selector-cmyk-lcms.c
+++ b/modules/color-selector-cmyk-lcms.c
@@ -159,7 +159,6 @@ static void
 colorsel_cmyk_init (ColorselCmyk *module)
 {
   GtkWidget *table;
-  GtkObject *adj;
   gint       i;
 
   static const gchar * const cmyk_labels[] =
@@ -198,22 +197,20 @@ colorsel_cmyk_init (ColorselCmyk *module)
 
   for (i = 0; i < 4; i++)
     {
-      adj = gimp_scale_entry_new (GTK_TABLE (table), 1, i,
-                                  gettext (cmyk_labels[i]),
-                                  -1, -1,
-                                  0.0,
-                                  0.0, 100.0,
-                                  1.0, 10.0,
-                                  0,
-                                  TRUE, 0.0, 0.0,
-                                  gettext (cmyk_tips[i]),
-                                  NULL);
-
-      g_signal_connect (adj, "value-changed",
+      module->adj[i] = gimp_scale_entry_new (GTK_TABLE (table), 1, i,
+                                             gettext (cmyk_labels[i]),
+                                             -1, -1,
+                                             0.0,
+                                             0.0, 100.0,
+                                             1.0, 10.0,
+                                             0,
+                                             TRUE, 0.0, 0.0,
+                                             gettext (cmyk_tips[i]),
+                                             NULL);
+
+      g_signal_connect (module->adj[i], "value-changed",
                         G_CALLBACK (colorsel_cmyk_adj_update),
                         module);
-
-      module->adj[i] = GTK_ADJUSTMENT (adj);
     }
 
   module->name_label = gtk_label_new (NULL);
diff --git a/modules/color-selector-cmyk.c b/modules/color-selector-cmyk.c
index 0baddad..b49d4ec 100644
--- a/modules/color-selector-cmyk.c
+++ b/modules/color-selector-cmyk.c
@@ -112,11 +112,11 @@ colorsel_cmyk_class_finalize (ColorselCmykClass *klass)
 static void
 colorsel_cmyk_init (ColorselCmyk *module)
 {
-  GtkWidget *table;
-  GtkWidget *label;
-  GtkWidget *spinbutton;
-  GtkObject *adj;
-  gint       i;
+  GtkWidget     *table;
+  GtkWidget     *label;
+  GtkWidget     *spinbutton;
+  GtkAdjustment *adj;
+  gint           i;
 
   static const gchar * const cmyk_labels[] =
   {
diff --git a/modules/color-selector-water.c b/modules/color-selector-water.c
index b794673..becdcf7 100644
--- a/modules/color-selector-water.c
+++ b/modules/color-selector-water.c
@@ -127,11 +127,11 @@ colorsel_water_class_finalize (ColorselWaterClass *klass)
 static void
 colorsel_water_init (ColorselWater *water)
 {
-  GtkWidget *hbox;
-  GtkWidget *area;
-  GtkWidget *frame;
-  GtkObject *adj;
-  GtkWidget *scale;
+  GtkWidget     *hbox;
+  GtkWidget     *area;
+  GtkWidget     *frame;
+  GtkAdjustment *adj;
+  GtkWidget     *scale;
 
   water->pressure_adjust = 1.0;
 
@@ -179,7 +179,7 @@ colorsel_water_init (ColorselWater *water)
                     G_CALLBACK (pressure_adjust_update),
                     water);
 
-  scale = gtk_vscale_new (GTK_ADJUSTMENT (adj));
+  scale = gtk_vscale_new (adj);
   gtk_scale_set_digits (GTK_SCALE (scale), 0);
   gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
   gimp_help_set_help_data (scale, _("Pressure"), NULL);



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