[gtk+/gtkobject-removal: 3/5] Make GtkAdjustment a GObject



commit 6e833bc0c6c10e9e41e03d5793f021489806b4ac
Author: Javier Jardón <jjardon gnome org>
Date:   Sat Sep 18 19:56:13 2010 -0400

    Make GtkAdjustment a GObject

 gtk/gtkadjustment.c   |    2 +-
 gtk/gtkadjustment.h   |    5 ++---
 gtk/gtkhscale.c       |    2 +-
 gtk/gtkscale.c        |    2 +-
 gtk/gtkscalebutton.c  |    2 +-
 gtk/gtkspinbutton.c   |   17 +++++++----------
 gtk/gtkvolumebutton.c |    2 +-
 gtk/gtkvscale.c       |    2 +-
 tests/flicker.c       |   42 +++++++++++++++++++++---------------------
 tests/testgtk.c       |    2 +-
 tests/testtreeview.c  |    4 ++--
 11 files changed, 39 insertions(+), 43 deletions(-)
---
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index d8d344e..8b0c377 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -318,7 +318,7 @@ gtk_adjustment_dispatch_properties_changed (GObject     *object,
     }
 }
 
-GtkObject *
+GObject *
 gtk_adjustment_new (gdouble value,
 		    gdouble lower,
 		    gdouble upper,
diff --git a/gtk/gtkadjustment.h b/gtk/gtkadjustment.h
index 949c45f..1435ba5 100644
--- a/gtk/gtkadjustment.h
+++ b/gtk/gtkadjustment.h
@@ -31,9 +31,8 @@
 #ifndef __GTK_ADJUSTMENT_H__
 #define __GTK_ADJUSTMENT_H__
 
-
-#include <gdk/gdk.h>
 #include <gtk/gtkobject.h>
+#include <gdk/gdk.h>
 
 G_BEGIN_DECLS
 
@@ -76,7 +75,7 @@ struct _GtkAdjustmentClass
 
 
 GType	   gtk_adjustment_get_type		(void) G_GNUC_CONST;
-GtkObject* gtk_adjustment_new			(gdouble	  value,
+GObject*   gtk_adjustment_new			(gdouble	  value,
 						 gdouble	  lower,
 						 gdouble	  upper,
 						 gdouble	  step_increment,
diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c
index 5d4c54e..577493c 100644
--- a/gtk/gtkhscale.c
+++ b/gtk/gtkhscale.c
@@ -83,7 +83,7 @@ gtk_hscale_new_with_range (gdouble min,
                            gdouble max,
                            gdouble step)
 {
-  GtkObject *adj;
+  GObject *adj;
   GtkScale *scale;
   gint digits;
 
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 6babe29..e1351e4 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -546,7 +546,7 @@ gtk_scale_new_with_range (GtkOrientation orientation,
                           gdouble        max,
                           gdouble        step)
 {
-  GtkObject *adj;
+  GObject *adj;
   gint digits;
 
   g_return_val_if_fail (min < max, NULL);
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 7548cfd..95dbc63 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -580,7 +580,7 @@ gtk_scale_button_new (GtkIconSize   size,
 		      const gchar **icons)
 {
   GtkScaleButton *button;
-  GtkObject *adj;
+  GObject *adj;
 
   adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
 
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index bf51597..b90d90d 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -99,7 +99,6 @@ enum
 
 static void gtk_spin_button_editable_init  (GtkEditableInterface *iface);
 static void gtk_spin_button_finalize       (GObject            *object);
-static void gtk_spin_button_destroy        (GtkObject          *object);
 static void gtk_spin_button_set_property   (GObject         *object,
 					    guint            prop_id,
 					    const GValue    *value,
@@ -108,6 +107,7 @@ static void gtk_spin_button_get_property   (GObject         *object,
 					    guint            prop_id,
 					    GValue          *value,
 					    GParamSpec      *pspec);
+static void gtk_spin_button_destroy        (GtkWidget          *widget);
 static void gtk_spin_button_map            (GtkWidget          *widget);
 static void gtk_spin_button_unmap          (GtkWidget          *widget);
 static void gtk_spin_button_realize        (GtkWidget          *widget);
@@ -188,18 +188,15 @@ static void
 gtk_spin_button_class_init (GtkSpinButtonClass *class)
 {
   GObjectClass     *gobject_class = G_OBJECT_CLASS (class);
-  GtkObjectClass   *object_class = GTK_OBJECT_CLASS (class);
   GtkWidgetClass   *widget_class = GTK_WIDGET_CLASS (class);
   GtkEntryClass    *entry_class = GTK_ENTRY_CLASS (class);
   GtkBindingSet    *binding_set;
 
   gobject_class->finalize = gtk_spin_button_finalize;
-
   gobject_class->set_property = gtk_spin_button_set_property;
   gobject_class->get_property = gtk_spin_button_get_property;
 
-  object_class->destroy = gtk_spin_button_destroy;
-
+  widget_class->destroy = gtk_spin_button_destroy;
   widget_class->map = gtk_spin_button_map;
   widget_class->unmap = gtk_spin_button_unmap;
   widget_class->realize = gtk_spin_button_realize;
@@ -542,11 +539,11 @@ gtk_spin_button_finalize (GObject *object)
 }
 
 static void
-gtk_spin_button_destroy (GtkObject *object)
+gtk_spin_button_destroy (GtkWidget *widget)
 {
-  gtk_spin_button_stop_spinning (GTK_SPIN_BUTTON (object));
-  
-  GTK_OBJECT_CLASS (gtk_spin_button_parent_class)->destroy (object);
+  gtk_spin_button_stop_spinning (GTK_SPIN_BUTTON (widget));
+
+  GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->destroy (widget);
 }
 
 static void
@@ -1793,7 +1790,7 @@ gtk_spin_button_new_with_range (gdouble min,
 				gdouble max,
 				gdouble step)
 {
-  GtkObject *adj;
+  GObject *adj;
   GtkSpinButton *spin;
   gint digits;
 
diff --git a/gtk/gtkvolumebutton.c b/gtk/gtkvolumebutton.c
index bcf2a8e..d84358d 100644
--- a/gtk/gtkvolumebutton.c
+++ b/gtk/gtkvolumebutton.c
@@ -69,7 +69,7 @@ static void
 gtk_volume_button_init (GtkVolumeButton *button)
 {
   GtkScaleButton *sbutton = GTK_SCALE_BUTTON (button);
-  GtkObject *adj;
+  GObject *adj;
   GtkWidget *minus_button, *plus_button;
   const char *icons[] = {
 	"audio-volume-muted",
diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c
index d4570f8..5cb2856 100644
--- a/gtk/gtkvscale.c
+++ b/gtk/gtkvscale.c
@@ -102,7 +102,7 @@ gtk_vscale_new_with_range (gdouble min,
                            gdouble max,
                            gdouble step)
 {
-  GtkObject *adj;
+  GObject *adj;
   GtkScale *scale;
   gint digits;
 
diff --git a/tests/flicker.c b/tests/flicker.c
index 39c9601..117e3e3 100644
--- a/tests/flicker.c
+++ b/tests/flicker.c
@@ -7,51 +7,51 @@ create_flicker (void)
   GtkWidget *hpaned1;
   GtkWidget *vpaned2;
   GtkWidget *hbox2;
-  GtkObject *spinbutton7_adj;
+  GObject   *spinbutton7_adj;
   GtkWidget *spinbutton7;
-  GtkObject *spinbutton8_adj;
+  GObject   *spinbutton8_adj;
   GtkWidget *spinbutton8;
   GtkWidget *vbox1;
-  GtkObject *spinbutton9_adj;
+  GObject   *spinbutton9_adj;
   GtkWidget *spinbutton9;
-  GtkObject *spinbutton10_adj;
+  GObject   *spinbutton10_adj;
   GtkWidget *spinbutton10;
-  GtkObject *spinbutton11_adj;
+  GObject   *spinbutton11_adj;
   GtkWidget *spinbutton11;
-  GtkObject *spinbutton12_adj;
+  GObject   *spinbutton12_adj;
   GtkWidget *spinbutton12;
-  GtkObject *spinbutton13_adj;
+  GObject   *spinbutton13_adj;
   GtkWidget *spinbutton13;
-  GtkObject *spinbutton14_adj;
+  GObject   *spinbutton14_adj;
   GtkWidget *spinbutton14;
-  GtkObject *spinbutton15_adj;
+  GObject   *spinbutton15_adj;
   GtkWidget *spinbutton15;
-  GtkObject *spinbutton16_adj;
+  GObject   *spinbutton16_adj;
   GtkWidget *spinbutton16;
   GtkWidget *vpaned1;
   GtkWidget *hbox1;
-  GtkObject *spinbutton17_adj;
+  GObject   *spinbutton17_adj;
   GtkWidget *spinbutton17;
-  GtkObject *spinbutton18_adj;
+  GObject   *spinbutton18_adj;
   GtkWidget *spinbutton18;
-  GtkObject *spinbutton19_adj;
+  GObject   *spinbutton19_adj;
   GtkWidget *spinbutton19;
   GtkWidget *vbox2;
-  GtkObject *spinbutton20_adj;
+  GObject   *spinbutton20_adj;
   GtkWidget *spinbutton20;
-  GtkObject *spinbutton21_adj;
+  GObject   *spinbutton21_adj;
   GtkWidget *spinbutton21;
-  GtkObject *spinbutton22_adj;
+  GObject   *spinbutton22_adj;
   GtkWidget *spinbutton22;
-  GtkObject *spinbutton23_adj;
+  GObject   *spinbutton23_adj;
   GtkWidget *spinbutton23;
-  GtkObject *spinbutton24_adj;
+  GObject   *spinbutton24_adj;
   GtkWidget *spinbutton24;
-  GtkObject *spinbutton25_adj;
+  GObject   *spinbutton25_adj;
   GtkWidget *spinbutton25;
-  GtkObject *spinbutton26_adj;
+  GObject   *spinbutton26_adj;
   GtkWidget *spinbutton26;
-  GtkObject *spinbutton27_adj;
+  GObject   *spinbutton27_adj;
   GtkWidget *spinbutton27;
 
   window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 6e40600..39ac343 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -6052,7 +6052,7 @@ create_range_controls (GtkWidget *widget)
   GtkWidget *scrollbar;
   GtkWidget *scale;
   GtkWidget *separator;
-  GtkObject *adjustment;
+  GObject *adjustment;
   GtkWidget *hbox;
 
   if (!window)
diff --git a/tests/testtreeview.c b/tests/testtreeview.c
index 9fbba7d..0b0c5bf 100644
--- a/tests/testtreeview.c
+++ b/tests/testtreeview.c
@@ -327,8 +327,8 @@ set_columns_type (GtkTreeView *tree_view, ColumnsType type)
   GtkCellRenderer *rend;
   GdkPixbuf *pixbuf;
   GtkWidget *image;
-  GtkObject *adjustment;
-    
+  GObject *adjustment;
+
   current_column_type = type;
   
   col = gtk_tree_view_get_column (tree_view, 0);



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