[gimp/gtk3-port: 26/228] app: s/GtkObject/GtkAdjustment/



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

    app: s/GtkObject/GtkAdjustment/

 app/widgets/gimphistogrambox.c   |   26 ++++++++++++--------------
 app/widgets/gimppaletteeditor.c  |    5 ++---
 app/widgets/gimpscalebutton.c    |    4 ++--
 app/widgets/gimptemplateeditor.c |    2 +-
 4 files changed, 17 insertions(+), 20 deletions(-)
---
diff --git a/app/widgets/gimphistogrambox.c b/app/widgets/gimphistogrambox.c
index 75c2d4c..5656c0a 100644
--- a/app/widgets/gimphistogrambox.c
+++ b/app/widgets/gimphistogrambox.c
@@ -72,13 +72,13 @@ gimp_histogram_box_class_init (GimpHistogramBoxClass *klass)
 static void
 gimp_histogram_box_init (GimpHistogramBox *box)
 {
-  GtkWidget *hbox;
-  GtkWidget *vbox;
-  GtkWidget *vbox2;
-  GtkObject *adjustment;
-  GtkWidget *frame;
-  GtkWidget *view;
-  GtkWidget *bar;
+  GtkWidget     *hbox;
+  GtkWidget     *vbox;
+  GtkWidget     *vbox2;
+  GtkAdjustment *adjustment;
+  GtkWidget     *frame;
+  GtkWidget     *view;
+  GtkWidget     *bar;
 
   box->n_bins = 256;
 
@@ -145,16 +145,15 @@ gimp_histogram_box_init (GimpHistogramBox *box)
   box->low_spinbutton = gimp_spin_button_new (&adjustment,
                                               0.0, 0.0, 255.0, 1.0, 16.0, 0.0,
                                               1.0, 0);
-  box->low_adj = GTK_ADJUSTMENT (adjustment);
+  box->low_adj = adjustment;
   gtk_box_pack_start (GTK_BOX (hbox), box->low_spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (box->low_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  */
   box->high_spinbutton = gimp_spin_button_new (&adjustment,
@@ -164,12 +163,11 @@ gimp_histogram_box_init (GimpHistogramBox *box)
   gtk_box_pack_end (GTK_BOX (hbox), box->high_spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (box->high_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 0bf8087..3618b29 100644
--- a/app/widgets/gimppaletteeditor.c
+++ b/app/widgets/gimppaletteeditor.c
@@ -169,7 +169,6 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   GtkWidget      *hbox;
   GtkWidget      *label;
   GtkWidget      *spinbutton;
-  GtkObject      *adj;
 
   editor->zoom_factor = 1.0;
   editor->col_width   = 0;
@@ -250,8 +249,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/gimpscalebutton.c b/app/widgets/gimpscalebutton.c
index 5c68fb7..e19f6c9 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 83880e6..c7ba889 100644
--- a/app/widgets/gimptemplateeditor.c
+++ b/app/widgets/gimptemplateeditor.c
@@ -136,7 +136,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]