[gimp/gtk3-port: 235/239] plug-ins: s/GtkObject/GtkAdjustment/
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 235/239] plug-ins: s/GtkObject/GtkAdjustment/
- Date: Fri, 30 Sep 2011 14:17:09 +0000 (UTC)
commit 2270f731967cbafc2fe89c94d4012f00e0b060ce
Author: Michael Natterer <mitch gimp org>
Date: Sun May 15 03:28:34 2011 +0200
plug-ins: s/GtkObject/GtkAdjustment/
plug-ins/gfig/gfig-dialog.c | 40 ++++++++++++++++----------------
plug-ins/gimpressionist/brush.c | 10 ++++----
plug-ins/gimpressionist/color.c | 4 +-
plug-ins/gimpressionist/general.c | 20 ++++++++--------
plug-ins/gimpressionist/orientation.c | 8 +++---
plug-ins/gimpressionist/orientmap.c | 28 +++++++++++-----------
plug-ins/gimpressionist/paper.c | 12 +++++-----
plug-ins/gimpressionist/placement.c | 6 ++--
plug-ins/gimpressionist/size.c | 8 +++---
plug-ins/gimpressionist/sizemap.c | 28 +++++++++++-----------
plug-ins/ifs-compose/ifs-compose.c | 27 ++++++++++------------
plug-ins/imagemap/imap_table.c | 2 +-
plug-ins/win-snap/winsnap.c | 18 +++++++-------
13 files changed, 104 insertions(+), 107 deletions(-)
---
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index 7227353..813a8b7 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -1218,12 +1218,12 @@ gfig_prefs_action_callback (GtkAction *widget,
if (!dialog)
{
- GtkWidget *main_vbox;
- GtkWidget *table;
- GtkWidget *toggle;
- GtkObject *size_data;
- GtkWidget *scale;
- GtkObject *scale_data;
+ GtkWidget *main_vbox;
+ GtkWidget *table;
+ GtkWidget *toggle;
+ GtkAdjustment *size_data;
+ GtkWidget *scale;
+ GtkAdjustment *scale_data;
dialog = gimp_dialog_new (_("Options"), "gimp-gfig-options",
GTK_WIDGET (data), 0, NULL, NULL,
@@ -1337,7 +1337,7 @@ gfig_prefs_action_callback (GtkAction *widget,
scale_data =
gtk_adjustment_new (selopt.feather_radius, 0.0, 100.0, 1.0, 1.0, 0.0);
- scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
+ scale = gtk_hscale_new (scale_data);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
g_signal_connect (scale_data, "value-changed",
@@ -1365,13 +1365,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,
@@ -1417,7 +1417,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);
@@ -1434,12 +1434,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);
@@ -1456,7 +1456,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);
@@ -1704,8 +1704,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/brush.c b/plug-ins/gimpressionist/brush.c
index 1cd5e2c..54f787d 100644
--- a/plug-ins/gimpressionist/brush.c
+++ b/plug-ins/gimpressionist/brush.c
@@ -41,11 +41,11 @@ static void update_brush_preview (const char *fn);
static GtkWidget *brush_preview = NULL;
static GtkListStore *brush_list_store = NULL;
-static GtkWidget *brush_list = NULL;
-static GtkObject *brush_relief_adjust = NULL;
-static GtkObject *brush_aspect_adjust = NULL;
-static GtkObject *brush_gamma_adjust = NULL;
-static gboolean brush_dont_update = FALSE;
+static GtkWidget *brush_list = NULL;
+static GtkAdjustment *brush_relief_adjust = NULL;
+static GtkAdjustment *brush_aspect_adjust = NULL;
+static GtkAdjustment *brush_gamma_adjust = NULL;
+static gboolean brush_dont_update = FALSE;
static gchar *last_selected_brush = NULL;
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/orientmap.c b/plug-ins/gimpressionist/orientmap.c
index 93622ea..1addf1f 100644
--- a/plug-ins/gimpressionist/orientmap.c
+++ b/plug-ins/gimpressionist/orientmap.c
@@ -34,22 +34,22 @@
#define NUMVECTYPES 4
-static GtkWidget *orient_map_window;
-
-static GtkWidget *vector_preview;
-static GtkWidget *orient_map_preview_prev;
-static GtkWidget *prev_button;
-static GtkWidget *next_button;
-static GtkWidget *add_button;
-static GtkWidget *kill_button;
-static GtkObject *vector_preview_brightness_adjust = NULL;
-
-static GtkObject *angle_adjust = NULL;
-static GtkObject *strength_adjust = NULL;
-static GtkObject *orient_map_str_exp_adjust = NULL;
-static GtkObject *angle_offset_adjust = NULL;
-static GtkWidget *vector_types[NUMVECTYPES];
-static GtkWidget *orient_voronoi = NULL;
+static GtkWidget *orient_map_window;
+
+static GtkWidget *vector_preview;
+static GtkWidget *orient_map_preview_prev;
+static GtkWidget *prev_button;
+static GtkWidget *next_button;
+static GtkWidget *add_button;
+static GtkWidget *kill_button;
+static GtkAdjustment *vector_preview_brightness_adjust = NULL;
+
+static GtkAdjustment *angle_adjust = NULL;
+static GtkAdjustment *strength_adjust = NULL;
+static GtkAdjustment *orient_map_str_exp_adjust = NULL;
+static GtkAdjustment *angle_offset_adjust = NULL;
+static GtkWidget *vector_types[NUMVECTYPES];
+static GtkWidget *orient_voronoi = NULL;
#define OMWIDTH 150
#define OMHEIGHT 150
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 a6f47b3..7ed1b9e 100644
--- a/plug-ins/gimpressionist/sizemap.c
+++ b/plug-ins/gimpressionist/sizemap.c
@@ -36,20 +36,20 @@
#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 GtkObject *smvectprevbrightadjust = NULL;
-
-static GtkObject *sizadjust = NULL;
-static GtkObject *smstradjust = NULL;
-static GtkObject *smstrexpadjust = NULL;
-static GtkWidget *size_voronoi = NULL;
+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;
+
+static GtkAdjustment *sizadjust = NULL;
+static GtkAdjustment *smstradjust = NULL;
+static GtkAdjustment *smstrexpadjust = NULL;
+static GtkWidget *size_voronoi = NULL;
#define OMWIDTH 150
#define OMHEIGHT 150
diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c
index d4dad58..4cd859c 100644
--- a/plug-ins/ifs-compose/ifs-compose.c
+++ b/plug-ins/ifs-compose/ifs-compose.c
@@ -72,12 +72,12 @@ typedef enum
typedef struct
{
- GtkObject *adjustment;
- GtkWidget *scale;
- GtkWidget *spin;
+ GtkAdjustment *adjustment;
+ GtkWidget *scale;
+ GtkWidget *spin;
- ValuePairType type;
- guint timeout_id;
+ ValuePairType type;
+ guint timeout_id;
union
{
@@ -2136,8 +2136,7 @@ value_pair_create (gpointer data,
if (create_scale)
{
- value_pair->scale =
- gtk_hscale_new (GTK_ADJUSTMENT (value_pair->adjustment));
+ value_pair->scale = gtk_hscale_new (value_pair->adjustment);
if (type == VALUE_PAIR_INT)
gtk_scale_set_digits (GTK_SCALE (value_pair->scale), 0);
@@ -2158,11 +2157,9 @@ static void
value_pair_update (ValuePair *value_pair)
{
if (value_pair->type == VALUE_PAIR_INT)
- gtk_adjustment_set_value (GTK_ADJUSTMENT (value_pair->adjustment),
- *value_pair->data.i);
+ gtk_adjustment_set_value (value_pair->adjustment, *value_pair->data.i);
else
- gtk_adjustment_set_value (GTK_ADJUSTMENT (value_pair->adjustment),
- *value_pair->data.d);
+ gtk_adjustment_set_value (value_pair->adjustment, *value_pair->data.d);
}
@@ -2175,19 +2172,19 @@ value_pair_scale_callback_real (gpointer data)
if (value_pair->type == VALUE_PAIR_DOUBLE)
{
if ((gdouble) *value_pair->data.d !=
- gtk_adjustment_get_value (GTK_ADJUSTMENT (value_pair->adjustment)))
+ gtk_adjustment_get_value (value_pair->adjustment))
{
changed = TRUE;
- *value_pair->data.d = gtk_adjustment_get_value (GTK_ADJUSTMENT (value_pair->adjustment));
+ *value_pair->data.d = gtk_adjustment_get_value (value_pair->adjustment);
}
}
else
{
if (*value_pair->data.i !=
- (gint) gtk_adjustment_get_value (GTK_ADJUSTMENT (value_pair->adjustment)))
+ (gint) gtk_adjustment_get_value (value_pair->adjustment))
{
changed = TRUE;
- *value_pair->data.i = gtk_adjustment_get_value (GTK_ADJUSTMENT (value_pair->adjustment));
+ *value_pair->data.i = gtk_adjustment_get_value (value_pair->adjustment);
}
}
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)
diff --git a/plug-ins/win-snap/winsnap.c b/plug-ins/win-snap/winsnap.c
index 7401044..de620f8 100644
--- a/plug-ins/win-snap/winsnap.c
+++ b/plug-ins/win-snap/winsnap.c
@@ -838,15 +838,15 @@ snap_toggle_update (GtkWidget *widget,
static gboolean
snap_dialog (void)
{
- GtkWidget *dialog;
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkObject *adj;
- GSList *radio_group = NULL;
- gint radio_pressed[2];
- gint decorations;
- gboolean run;
+ GtkWidget *dialog;
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *label;
+ GtkAdjustment *adj;
+ GSList *radio_group = NULL;
+ gint radio_pressed[2];
+ gint decorations;
+ gboolean run;
/* Set defaults */
radio_pressed[0] = (winsnapvals.root == FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]