[gimp] libgimpwidgets: a bit of s/GtkObject/GtkAdjustment/



commit c61500066c7678bb9162d5c6ed9c2cc1bae21dba
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 22 22:39:28 2017 +0200

    libgimpwidgets: a bit of s/GtkObject/GtkAdjustment/
    
    only the GtkObjects in the public API left now, can't change these until 3.x

 libgimpwidgets/gimpcolorscales.c |   11 +++++------
 libgimpwidgets/gimppropwidgets.c |   17 +++++++++--------
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorscales.c b/libgimpwidgets/gimpcolorscales.c
index 04f8423..5e16e3e 100644
--- a/libgimpwidgets/gimpcolorscales.c
+++ b/libgimpwidgets/gimpcolorscales.c
@@ -74,7 +74,7 @@ struct _GimpColorScales
 
   GtkWidget         *toggles[10];
   GtkWidget         *sliders[10];
-  GtkObject         *slider_data[10];
+  GtkAdjustment     *slider_data[10];
 };
 
 struct _GimpColorScalesClass
@@ -204,7 +204,7 @@ gimp_color_scales_init (GimpColorScales *scales)
                             scales);
         }
 
-      scales->slider_data[i] =
+      scales->slider_data[i] = (GtkAdjustment *)
         gimp_color_scale_entry_new (GTK_TABLE (table), 1, i,
                                     gettext (enum_desc->value_desc),
                                     -1, -1,
@@ -216,7 +216,7 @@ gimp_color_scales_init (GimpColorScales *scales)
                                     gettext (enum_desc->value_help),
                                     NULL);
 
-      gtk_adjustment_configure (GTK_ADJUSTMENT (scales->slider_data[i]),
+      gtk_adjustment_configure (scales->slider_data[i],
                                 slider_initial_vals[i],
                                 spin_min_vals[i],
                                 spin_max_vals[i],
@@ -366,8 +366,7 @@ gimp_color_scales_update_scales (GimpColorScales *scales,
                                            gimp_color_scales_scale_changed,
                                            scales);
 
-          gtk_adjustment_set_value (GTK_ADJUSTMENT (scales->slider_data[i]),
-                                    values[i]);
+          gtk_adjustment_set_value (scales->slider_data[i], values[i]);
 
           g_signal_handlers_unblock_by_func (scales->slider_data[i],
                                              gimp_color_scales_scale_changed,
@@ -410,7 +409,7 @@ gimp_color_scales_scale_changed (GtkAdjustment   *adjustment,
   gint               i;
 
   for (i = 0; i < 10; i++)
-    if (scales->slider_data[i] == GTK_OBJECT (adjustment))
+    if (scales->slider_data[i] == adjustment)
       break;
 
   switch (i)
diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c
index f5e79fa..71c946c 100644
--- a/libgimpwidgets/gimppropwidgets.c
+++ b/libgimpwidgets/gimppropwidgets.c
@@ -1296,12 +1296,12 @@ gimp_prop_hscale_new (GObject     *config,
                       gdouble      page_increment,
                       gint         digits)
 {
-  GParamSpec *param_spec;
-  GtkWidget  *scale;
-  GtkObject  *adjustment;
-  gdouble     value;
-  gdouble     lower;
-  gdouble     upper;
+  GParamSpec    *param_spec;
+  GtkWidget     *scale;
+  GtkAdjustment *adjustment;
+  gdouble        value;
+  gdouble        lower;
+  gdouble        upper;
 
   param_spec = find_param_spec (config, property_name, G_STRFUNC);
   if (! param_spec)
@@ -1314,8 +1314,9 @@ gimp_prop_hscale_new (GObject     *config,
   if (! G_IS_PARAM_SPEC_DOUBLE (param_spec))
     digits = 0;
 
-  adjustment = gtk_adjustment_new (value, lower, upper,
-                                   step_increment, page_increment, 0.0);
+  adjustment = (GtkAdjustment *)
+    gtk_adjustment_new (value, lower, upper,
+                        step_increment, page_increment, 0.0);
 
   scale = g_object_new (GTK_TYPE_SCALE,
                         "orientation", GTK_ORIENTATION_HORIZONTAL,


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