[gimp/gtk3-port: 209/226] plug-ins: s/GtkObject/GtkAdjustment/



commit 484c44861d9ed887835eb9930fb68774aeae156b
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 15 03:28:34 2011 +0200

    plug-ins: s/GtkObject/GtkAdjustment/

 plug-ins/common/file-mng.c            |   20 ++++++++------------
 plug-ins/gfig/gfig-dialog.c           |   30 +++++++++++++++---------------
 plug-ins/gimpressionist/color.c       |    4 ++--
 plug-ins/gimpressionist/general.c     |   20 ++++++++++----------
 plug-ins/gimpressionist/orientation.c |    8 ++++----
 plug-ins/gimpressionist/paper.c       |   12 ++++++------
 plug-ins/gimpressionist/placement.c   |    6 +++---
 plug-ins/gimpressionist/size.c        |    8 ++++----
 plug-ins/gimpressionist/sizemap.c     |   14 +++++++-------
 plug-ins/ifs-compose/ifs-compose.c    |    4 ++--
 plug-ins/imagemap/imap_table.c        |    2 +-
 11 files changed, 62 insertions(+), 66 deletions(-)
---
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index 5387427..0a65a63 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -1447,9 +1447,8 @@ mng_save_dialog (gint32 image_id)
                              _("Default frame disposal:"), 0.0, 0.5,
                              combo, 1, FALSE);
 
-  scale_adj = (GtkAdjustment *)
-    gtk_adjustment_new (mng_data.compression_level,
-                        0.0, 9.0, 1.0, 1.0, 0.0);
+  scale_adj = gtk_adjustment_new (mng_data.compression_level,
+                                  0.0, 9.0, 1.0, 1.0, 0.0);
 
   scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_adj);
   gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
@@ -1468,9 +1467,8 @@ mng_save_dialog (gint32 image_id)
                              "for small file size"),
                            NULL);
 
-  scale_adj = (GtkAdjustment *)
-    gtk_adjustment_new (mng_data.quality,
-                        0.0, 1.0, 0.01, 0.01, 0.0);
+  scale_adj = gtk_adjustment_new (mng_data.quality,
+                                  0.0, 1.0, 0.01, 0.01, 0.0);
 
   scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_adj);
   gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
@@ -1485,9 +1483,8 @@ mng_save_dialog (gint32 image_id)
                     G_CALLBACK (gimp_int_adjustment_update),
                     &mng_data.quality);
 
-  scale_adj = (GtkAdjustment *)
-    gtk_adjustment_new (mng_data.smoothing,
-                        0.0, 1.0, 0.01, 0.01, 0.0);
+  scale_adj = gtk_adjustment_new (mng_data.smoothing,
+                                  0.0, 1.0, 0.01, 0.01, 0.0);
 
   scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_adj);
   gtk_widget_set_size_request (scale, SCALE_WIDTH, -1);
@@ -1529,9 +1526,8 @@ mng_save_dialog (gint32 image_id)
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
-  spinbutton_adj = (GtkAdjustment *)
-    gtk_adjustment_new (mng_data.default_delay,
-                        0, 65000, 10, 100, 0);
+  spinbutton_adj = gtk_adjustment_new (mng_data.default_delay,
+                                       0, 65000, 10, 100, 0);
   spinbutton = gtk_spin_button_new (spinbutton_adj, 1.0, 0);
   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
 
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index 81df70e..21037e0 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -1234,7 +1234,7 @@ gfig_prefs_action_callback (GtkAction *widget,
       GtkWidget     *main_vbox;
       GtkWidget     *table;
       GtkWidget     *toggle;
-      GtkObject     *size_data;
+      GtkAdjustment *size_data;
       GtkWidget     *scale;
       GtkAdjustment *scale_data;
 
@@ -1348,7 +1348,7 @@ gfig_prefs_action_callback (GtkAction *widget,
                         NULL);
       gtk_widget_show (toggle);
 
-      scale_data = (GtkAdjustment *)
+      scale_data =
         gtk_adjustment_new (selopt.feather_radius, 0.0, 100.0, 1.0, 1.0, 0.0);
       scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_data);
       gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
@@ -1378,13 +1378,13 @@ gfig_grid_action_callback (GtkAction *action,
 
   if (!dialog)
     {
-      GtkWidget *main_vbox;
-      GtkWidget *hbox;
-      GtkWidget *table;
-      GtkWidget *combo;
-      GtkObject *size_data;
-      GtkObject *sectors_data;
-      GtkObject *radius_data;
+      GtkWidget     *main_vbox;
+      GtkWidget     *hbox;
+      GtkWidget     *table;
+      GtkWidget     *combo;
+      GtkAdjustment *size_data;
+      GtkAdjustment *sectors_data;
+      GtkAdjustment *radius_data;
 
       dialog = gimp_dialog_new (_("Grid"), "gimp-gfig-grid",
                                 GTK_WIDGET (data), 0, NULL, NULL,
@@ -1430,7 +1430,7 @@ gfig_grid_action_callback (GtkAction *action,
                         G_CALLBACK (draw_grid_clear),
                         NULL);
 
-      gfig_opt_widget.gridspacing = GTK_ADJUSTMENT (size_data);
+      gfig_opt_widget.gridspacing = size_data;
       g_object_add_weak_pointer (G_OBJECT (gfig_opt_widget.gridspacing),
                                  (gpointer) &gfig_opt_widget.gridspacing);
 
@@ -1447,12 +1447,12 @@ gfig_grid_action_callback (GtkAction *action,
                         G_CALLBACK (draw_grid_clear),
                         NULL);
 
-      gfig_opt_widget.grid_sectors_desired = GTK_ADJUSTMENT (sectors_data);
+      gfig_opt_widget.grid_sectors_desired = sectors_data;
       g_object_add_weak_pointer (G_OBJECT (gfig_opt_widget.grid_sectors_desired),
                                  (gpointer) &gfig_opt_widget.grid_sectors_desired);
 
 
-      gfig_opt_widget.gridspacing = GTK_ADJUSTMENT (size_data);
+      gfig_opt_widget.gridspacing = size_data;
       g_object_add_weak_pointer (G_OBJECT (gfig_opt_widget.gridspacing),
                                  (gpointer) &gfig_opt_widget.gridspacing);
 
@@ -1469,7 +1469,7 @@ gfig_grid_action_callback (GtkAction *action,
                         G_CALLBACK (draw_grid_clear),
                         NULL);
 
-      gfig_opt_widget.grid_radius_interval = GTK_ADJUSTMENT (radius_data);
+      gfig_opt_widget.grid_radius_interval = radius_data;
       g_object_add_weak_pointer (G_OBJECT (gfig_opt_widget.grid_radius_interval),
                                  (gpointer) &gfig_opt_widget.grid_radius_interval);
 
@@ -1716,8 +1716,8 @@ num_sides_widget (const gchar *d_title,
                   gint         adj_min,
                   gint         adj_max)
 {
-  GtkWidget *table;
-  GtkObject *size_data;
+  GtkWidget     *table;
+  GtkAdjustment *size_data;
 
   table = gtk_table_new (which_way ? 2 : 1, 3, FALSE);
   gtk_table_set_col_spacings (GTK_TABLE (table), 6);
diff --git a/plug-ins/gimpressionist/color.c b/plug-ins/gimpressionist/color.c
index 70dbe19..e9f80bd 100644
--- a/plug-ins/gimpressionist/color.c
+++ b/plug-ins/gimpressionist/color.c
@@ -30,8 +30,8 @@
 
 #define NUMCOLORRADIO 2
 
-static GtkWidget *colorradio[NUMCOLORRADIO];
-static GtkObject *colornoiseadjust = NULL;
+static GtkWidget     *colorradio[NUMCOLORRADIO];
+static GtkAdjustment *colornoiseadjust = NULL;
 
 void
 color_restore (void)
diff --git a/plug-ins/gimpressionist/general.c b/plug-ins/gimpressionist/general.c
index be2f817..222b200 100644
--- a/plug-ins/gimpressionist/general.c
+++ b/plug-ins/gimpressionist/general.c
@@ -35,16 +35,16 @@
 
 #define NUMGENERALBGRADIO 4
 
-static GtkWidget *general_bg_radio[NUMGENERALBGRADIO];
-static GtkWidget *general_paint_edges      = NULL;
-static GtkObject *general_dark_edge_adjust = NULL;
-static GtkWidget *general_tileable;
-static GtkWidget *general_drop_shadow      = NULL;
-static GtkWidget *general_color_button;
-static GtkObject *general_shadow_adjust    = NULL;
-static GtkObject *general_shadow_depth     = NULL;
-static GtkObject *general_shadow_blur      = NULL;
-static GtkObject *dev_thresh_adjust        = NULL;
+static GtkWidget     *general_bg_radio[NUMGENERALBGRADIO];
+static GtkWidget     *general_paint_edges      = NULL;
+static GtkAdjustment *general_dark_edge_adjust = NULL;
+static GtkWidget     *general_tileable;
+static GtkWidget     *general_drop_shadow      = NULL;
+static GtkWidget     *general_color_button;
+static GtkAdjustment *general_shadow_adjust    = NULL;
+static GtkAdjustment *general_shadow_depth     = NULL;
+static GtkAdjustment *general_shadow_blur      = NULL;
+static GtkAdjustment *dev_thresh_adjust        = NULL;
 
 static int
 normalize_bg (int n)
diff --git a/plug-ins/gimpressionist/orientation.c b/plug-ins/gimpressionist/orientation.c
index b84cf8e..539e20c 100644
--- a/plug-ins/gimpressionist/orientation.c
+++ b/plug-ins/gimpressionist/orientation.c
@@ -28,10 +28,10 @@
 
 #include "libgimp/stdplugins-intl.h"
 
-static GtkWidget *orient_radio[NUMORIENTRADIO];
-static GtkObject *orient_num_adjust = NULL;
-static GtkObject *orient_first_adjust = NULL;
-static GtkObject *orient_last_adjust = NULL;
+static GtkWidget     *orient_radio[NUMORIENTRADIO];
+static GtkAdjustment *orient_num_adjust = NULL;
+static GtkAdjustment *orient_first_adjust = NULL;
+static GtkAdjustment *orient_last_adjust = NULL;
 
 
 static void
diff --git a/plug-ins/gimpressionist/paper.c b/plug-ins/gimpressionist/paper.c
index d413a90..a4d25e5 100644
--- a/plug-ins/gimpressionist/paper.c
+++ b/plug-ins/gimpressionist/paper.c
@@ -31,12 +31,12 @@
 #include "libgimp/stdplugins-intl.h"
 
 
-static GtkWidget *paper_preview       = NULL;
-static GtkWidget *paper_invert        = NULL;
-static GtkWidget *paper_list          = NULL;
-static GtkObject *paper_relief_adjust = NULL;
-static GtkObject *paper_scale_adjust  = NULL;
-static GtkWidget *paper_overlay       = NULL;
+static GtkWidget     *paper_preview       = NULL;
+static GtkWidget     *paper_invert        = NULL;
+static GtkWidget     *paper_list          = NULL;
+static GtkAdjustment *paper_relief_adjust = NULL;
+static GtkAdjustment *paper_scale_adjust  = NULL;
+static GtkWidget     *paper_overlay       = NULL;
 
 static void paper_update_preview (void)
 {
diff --git a/plug-ins/gimpressionist/placement.c b/plug-ins/gimpressionist/placement.c
index c49b45e..078d492 100644
--- a/plug-ins/gimpressionist/placement.c
+++ b/plug-ins/gimpressionist/placement.c
@@ -30,9 +30,9 @@
 
 #define NUM_PLACE_RADIO 2
 
-static GtkWidget *placement_radio[NUM_PLACE_RADIO];
-static GtkWidget *placement_center = NULL;
-static GtkObject *brush_density_adjust = NULL;
+static GtkWidget     *placement_radio[NUM_PLACE_RADIO];
+static GtkWidget     *placement_center = NULL;
+static GtkAdjustment *brush_density_adjust = NULL;
 
 void
 place_restore (void)
diff --git a/plug-ins/gimpressionist/size.c b/plug-ins/gimpressionist/size.c
index 86f75f5..070da99 100644
--- a/plug-ins/gimpressionist/size.c
+++ b/plug-ins/gimpressionist/size.c
@@ -30,10 +30,10 @@
 
 #define NUMSIZERADIO 8
 
-static GtkObject *sizenumadjust   = NULL;
-static GtkObject *sizefirstadjust = NULL;
-static GtkObject *sizelastadjust  = NULL;
-static GtkWidget *sizeradio[NUMSIZERADIO];
+static GtkAdjustment *sizenumadjust   = NULL;
+static GtkAdjustment *sizefirstadjust = NULL;
+static GtkAdjustment *sizelastadjust  = NULL;
+static GtkWidget     *sizeradio[NUMSIZERADIO];
 
 static void
 size_store (GtkWidget *wg, void *d)
diff --git a/plug-ins/gimpressionist/sizemap.c b/plug-ins/gimpressionist/sizemap.c
index eaf0343..456ff5c 100644
--- a/plug-ins/gimpressionist/sizemap.c
+++ b/plug-ins/gimpressionist/sizemap.c
@@ -36,13 +36,13 @@
 
 #define MAPFILE "data.out"
 
-static GtkWidget *smwindow;
-static GtkWidget *smvectorprev;
-static GtkWidget *smpreviewprev;
-static GtkWidget *prev_button;
-static GtkWidget *next_button;
-static GtkWidget *add_button;
-static GtkWidget *kill_button;
+static GtkWidget     *smwindow;
+static GtkWidget     *smvectorprev;
+static GtkWidget     *smpreviewprev;
+static GtkWidget     *prev_button;
+static GtkWidget     *next_button;
+static GtkWidget     *add_button;
+static GtkWidget     *kill_button;
 
 static GtkAdjustment *smvectprevbrightadjust = NULL;
 
diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c
index ef4a508..41421e6 100644
--- a/plug-ins/ifs-compose/ifs-compose.c
+++ b/plug-ins/ifs-compose/ifs-compose.c
@@ -76,8 +76,8 @@ typedef struct
   GtkWidget     *scale;
   GtkWidget     *spin;
 
-  ValuePairType type;
-  guint         timeout_id;
+  ValuePairType  type;
+  guint          timeout_id;
 
   union
   {
diff --git a/plug-ins/imagemap/imap_table.c b/plug-ins/imagemap/imap_table.c
index 35ebebc..407360b 100644
--- a/plug-ins/imagemap/imap_table.c
+++ b/plug-ins/imagemap/imap_table.c
@@ -38,7 +38,7 @@ GtkWidget*
 create_spin_button_in_table(GtkWidget *table, GtkWidget *label,
                             int row, int col, int value, int min, int max)
 {
-   GtkObject *adj = gtk_adjustment_new(value, min, max, 1, 1, 1);
+   GtkAdjustment *adj = gtk_adjustment_new(value, min, max, 1, 1, 1);
    GtkWidget *button = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0);
    gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(button), TRUE);
    if (label)


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