[gimp/gtk3-port: 61/224] modules: s/GtkObject/GtkAdjustment/



commit 9da2204293912473dd59190062ecc9f50f600717
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     |    4 ++--
 3 files changed, 19 insertions(+), 22 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 1d8f024..7f414c0 100644
--- a/modules/color-selector-water.c
+++ b/modules/color-selector-water.c
@@ -173,8 +173,8 @@ colorsel_water_init (ColorselWater *water)
   gtk_widget_set_extension_events (area, GDK_EXTENSION_EVENTS_ALL);
   gtk_widget_grab_focus (area);
 
-  adj = GTK_ADJUSTMENT (gtk_adjustment_new (200.0 - water->pressure_adjust * 100.0,
-                                            0.0, 200.0, 1.0, 1.0, 0.0));
+  adj = gtk_adjustment_new (200.0 - water->pressure_adjust * 100.0,
+                            0.0, 200.0, 1.0, 1.0, 0.0);
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (pressure_adjust_update),
                     water);



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