[gimp/gtk3-port: 25/226] app: s/GtkObject/GtkAdjustment/



commit 2d4c6874f630cea5cbfb13cc929cdf69f070f126
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 15 14:28:56 2010 +0200

    app: s/GtkObject/GtkAdjustment/

 app/widgets/gimphistogrambox.c   |   17 ++++++-----------
 app/widgets/gimppaletteeditor.c  |    5 ++---
 app/widgets/gimppropwidgets.c    |    6 +++---
 app/widgets/gimpscalebutton.c    |    4 ++--
 app/widgets/gimptemplateeditor.c |    2 +-
 5 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/app/widgets/gimphistogrambox.c b/app/widgets/gimphistogrambox.c
index f6a7f11..7257b51 100644
--- a/app/widgets/gimphistogrambox.c
+++ b/app/widgets/gimphistogrambox.c
@@ -75,7 +75,6 @@ gimp_histogram_box_init (GimpHistogramBox *box)
   GtkWidget *vbox;
   GtkWidget *vbox2;
   GtkWidget *spinbutton;
-  GtkObject *adjustment;
   GtkWidget *frame;
   GtkWidget *view;
   GtkWidget *bar;
@@ -149,34 +148,30 @@ gimp_histogram_box_init (GimpHistogramBox *box)
   gtk_widget_show (hbox);
 
   /*  low spinbutton  */
-  spinbutton = gimp_spin_button_new (&adjustment,
+  spinbutton = gimp_spin_button_new (&box->low_adj,
                                      0.0, 0.0, 255.0, 1.0, 16.0, 0.0,
                                      1.0, 0);
-  box->low_adj = GTK_ADJUSTMENT (adjustment);
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
-  g_signal_connect (adjustment, "value-changed",
+  g_signal_connect (box->low_adj, "value-changed",
                     G_CALLBACK (gimp_histogram_box_low_adj_update),
                     box);
 
-  gimp_handle_bar_set_adjustment (GIMP_HANDLE_BAR (bar), 0,
-                                  GTK_ADJUSTMENT (adjustment));
+  gimp_handle_bar_set_adjustment (GIMP_HANDLE_BAR (bar), 0, box->low_adj);
 
   /*  high spinbutton  */
-  spinbutton = gimp_spin_button_new (&adjustment,
+  spinbutton = gimp_spin_button_new (&box->high_adj,
                                      255.0, 0.0, 255.0, 1.0, 16.0, 0.0,
                                      1.0, 0);
-  box->high_adj = GTK_ADJUSTMENT (adjustment);
   gtk_box_pack_end (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
-  g_signal_connect (adjustment, "value-changed",
+  g_signal_connect (box->high_adj, "value-changed",
                     G_CALLBACK (gimp_histogram_box_high_adj_update),
                     box);
 
-  gimp_handle_bar_set_adjustment (GIMP_HANDLE_BAR (bar), 2,
-                                  GTK_ADJUSTMENT (adjustment));
+  gimp_handle_bar_set_adjustment (GIMP_HANDLE_BAR (bar), 2, box->high_adj);
 
 #ifdef DEBUG_VIEW
   spinbutton = gimp_prop_spin_button_new (G_OBJECT (box->view), "border-width",
diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c
index 04914f4..9bf3ffd 100644
--- a/app/widgets/gimppaletteeditor.c
+++ b/app/widgets/gimppaletteeditor.c
@@ -163,7 +163,6 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   GtkWidget      *hbox;
   GtkWidget      *label;
   GtkWidget      *spinbutton;
-  GtkObject      *adj;
 
   editor->zoom_factor = 1.0;
   editor->col_width   = 0;
@@ -235,8 +234,8 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
-  spinbutton = gimp_spin_button_new (&adj, 0, 0, 64, 1, 4, 0, 1, 0);
-  editor->columns_data = GTK_ADJUSTMENT (adj);
+  spinbutton = gimp_spin_button_new (&editor->columns_data,
+                                     0, 0, 64, 1, 4, 0, 1, 0);
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c
index 416797d..993e5b0 100644
--- a/app/widgets/gimppropwidgets.c
+++ b/app/widgets/gimppropwidgets.c
@@ -1479,9 +1479,9 @@ gimp_prop_table_new (GObject     *config,
                G_IS_PARAM_SPEC_FLOAT (pspec) ||
                G_IS_PARAM_SPEC_DOUBLE (pspec))
         {
-          GtkObject *adj;
-          gint       digits = (G_IS_PARAM_SPEC_FLOAT (pspec) ||
-                               G_IS_PARAM_SPEC_DOUBLE (pspec)) ? 2 : 0;
+          GtkAdjustment *adj;
+          gint           digits = (G_IS_PARAM_SPEC_FLOAT (pspec) ||
+                                   G_IS_PARAM_SPEC_DOUBLE (pspec)) ? 2 : 0;
 
           adj = gimp_prop_scale_entry_new (config, pspec->name,
                                            GTK_TABLE (table), 0, row++,
diff --git a/app/widgets/gimpscalebutton.c b/app/widgets/gimpscalebutton.c
index 75438c5..87dbd53 100644
--- a/app/widgets/gimpscalebutton.c
+++ b/app/widgets/gimpscalebutton.c
@@ -186,8 +186,8 @@ gimp_scale_button_new (gdouble value,
                        gdouble min,
                        gdouble max)
 {
-  GtkObject *adj;
-  gdouble    step;
+  GtkAdjustment *adj;
+  gdouble        step;
 
   g_return_val_if_fail (value >= min && value <= max, NULL);
 
diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c
index 6c6dfbd..ac3abe7 100644
--- a/app/widgets/gimptemplateeditor.c
+++ b/app/widgets/gimptemplateeditor.c
@@ -134,7 +134,7 @@ gimp_template_editor_constructed (GObject *object)
   GtkWidget                 *vbox;
   GtkWidget                 *table;
   GtkWidget                 *label;
-  GtkObject                 *adjustment;
+  GtkAdjustment             *adjustment;
   GtkWidget                 *width;
   GtkWidget                 *height;
   GtkWidget                 *xres;



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