[gimp/gtk3-port: 51/237] app: port tools to GTK+ 3.0 (trivial changes only)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 51/237] app: port tools to GTK+ 3.0 (trivial changes only)
- Date: Sat, 7 May 2011 20:04:14 +0000 (UTC)
commit 3b7c885ca3f6ea0de379d988b3e358558f30af1f
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 19 13:01:44 2010 +0200
app: port tools to GTK+ 3.0 (trivial changes only)
app/tools/gimpbrightnesscontrasttool.c | 4 ++--
app/tools/gimpcolorbalancetool.c | 12 ++++++------
app/tools/gimpcolorizetool.c | 8 ++++----
app/tools/gimpforegroundselectoptions.c | 26 +++++++++++++-------------
app/tools/gimphuesaturationtool.c | 10 +++++-----
app/tools/gimplevelstool.c | 15 +++++++--------
app/tools/gimpposterizetool.c | 4 ++--
app/tools/gimprotatetool.c | 4 ++--
app/tools/gimpsheartool.c | 4 ++--
app/tools/gimptexttool-editor.c | 7 ++++---
10 files changed, 47 insertions(+), 47 deletions(-)
---
diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c
index be60f12..d18f0ea 100644
--- a/app/tools/gimpbrightnesscontrasttool.c
+++ b/app/tools/gimpbrightnesscontrasttool.c
@@ -295,7 +295,7 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
GtkWidget *main_vbox;
GtkWidget *table;
GtkWidget *button;
- GtkObject *data;
+ GtkAdjustment *data;
bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (image_map_tool);
config = bc_tool->config;
@@ -316,7 +316,7 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
-127.0, 127.0, 1.0, 10.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- bc_tool->brightness_data = GTK_ADJUSTMENT (data);
+ bc_tool->brightness_data = data;
g_signal_connect (data, "value-changed",
G_CALLBACK (brightness_contrast_brightness_changed),
diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c
index 9e4a09a..23ae7f5 100644
--- a/app/tools/gimpcolorbalancetool.c
+++ b/app/tools/gimpcolorbalancetool.c
@@ -214,10 +214,10 @@ create_levels_scale (gdouble value,
GtkWidget *table,
gint col)
{
- GtkWidget *label;
- GtkWidget *slider;
- GtkWidget *spinbutton;
- GtkObject *adj;
+ GtkWidget *label;
+ GtkWidget *slider;
+ GtkWidget *spinbutton;
+ GtkAdjustment *adj;
label = gtk_label_new (left);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
@@ -229,7 +229,7 @@ create_levels_scale (gdouble value,
value, -100.0, 100.0,
1.0, 10.0, 0.0, 1.0, 0);
- slider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
+ slider = gtk_hscale_new (adj);
gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
gtk_widget_set_size_request (slider, 100, -1);
gtk_table_attach_defaults (GTK_TABLE (table), slider, 1, 2, col, col + 1);
@@ -245,7 +245,7 @@ create_levels_scale (gdouble value,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (spinbutton);
- return GTK_ADJUSTMENT (adj);
+ return adj;
}
static void
diff --git a/app/tools/gimpcolorizetool.c b/app/tools/gimpcolorizetool.c
index 708e225..5b62588 100644
--- a/app/tools/gimpcolorizetool.c
+++ b/app/tools/gimpcolorizetool.c
@@ -217,7 +217,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
GtkWidget *table;
GtkWidget *frame;
GtkWidget *vbox;
- GtkObject *data;
+ GtkAdjustment *data;
main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
@@ -243,7 +243,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
0.0, 360.0, 1.0, 15.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- col_tool->hue_data = GTK_ADJUSTMENT (data);
+ col_tool->hue_data = data;
g_signal_connect (data, "value-changed",
G_CALLBACK (colorize_hue_changed),
@@ -256,7 +256,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
0.0, 100.0, 1.0, 10.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- col_tool->saturation_data = GTK_ADJUSTMENT (data);
+ col_tool->saturation_data = data;
g_signal_connect (data, "value-changed",
G_CALLBACK (colorize_saturation_changed),
@@ -269,7 +269,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
-100.0, 100.0, 1.0, 10.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- col_tool->lightness_data = GTK_ADJUSTMENT (data);
+ col_tool->lightness_data = data;
g_signal_connect (data, "value-changed",
G_CALLBACK (colorize_lightness_changed),
diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c
index 68063f0..904c1bb 100644
--- a/app/tools/gimpforegroundselectoptions.c
+++ b/app/tools/gimpforegroundselectoptions.c
@@ -258,19 +258,19 @@ gimp_foreground_select_options_get_property (GObject *object,
GtkWidget *
gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
{
- GObject *config = G_OBJECT (tool_options);
- GtkWidget *vbox = gimp_selection_options_gui (tool_options);
- GtkWidget *hbox;
- GtkWidget *button;
- GtkWidget *frame;
- GtkWidget *scale;
- GtkWidget *label;
- GtkWidget *menu;
- GtkWidget *inner_frame;
- GtkWidget *table;
- GtkObject *adj;
- gchar *title;
- gint row = 0;
+ GObject *config = G_OBJECT (tool_options);
+ GtkWidget *vbox = gimp_selection_options_gui (tool_options);
+ GtkWidget *hbox;
+ GtkWidget *button;
+ GtkWidget *frame;
+ GtkWidget *scale;
+ GtkWidget *label;
+ GtkWidget *menu;
+ GtkWidget *inner_frame;
+ GtkWidget *table;
+ GtkAdjustment *adj;
+ gchar *title;
+ gint row = 0;
gtk_widget_set_sensitive (GIMP_SELECTION_OPTIONS (tool_options)->antialias_toggle,
FALSE);
diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c
index 7977827..1c89a37 100644
--- a/app/tools/gimphuesaturationtool.c
+++ b/app/tools/gimphuesaturationtool.c
@@ -227,7 +227,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *image_map_tool)
GtkWidget *button;
GtkWidget *frame;
GtkWidget *hbox;
- GtkObject *data;
+ GtkAdjustment *data;
GtkSizeGroup *label_group;
GtkSizeGroup *spinner_group;
GSList *group = NULL;
@@ -350,7 +350,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *image_map_tool)
0.0, 100.0, 1.0, 15.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- hs_tool->overlap_data = GTK_ADJUSTMENT (data);
+ hs_tool->overlap_data = data;
gtk_size_group_add_widget (label_group, GIMP_SCALE_ENTRY_LABEL (data));
gtk_size_group_add_widget (spinner_group, GIMP_SCALE_ENTRY_SPINBUTTON (data));
@@ -383,7 +383,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *image_map_tool)
-180.0, 180.0, 1.0, 15.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- hs_tool->hue_data = GTK_ADJUSTMENT (data);
+ hs_tool->hue_data = data;
gtk_size_group_add_widget (label_group, GIMP_SCALE_ENTRY_LABEL (data));
gtk_size_group_add_widget (spinner_group, GIMP_SCALE_ENTRY_SPINBUTTON (data));
@@ -399,7 +399,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *image_map_tool)
-100.0, 100.0, 1.0, 10.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- hs_tool->lightness_data = GTK_ADJUSTMENT (data);
+ hs_tool->lightness_data = data;
gtk_size_group_add_widget (label_group, GIMP_SCALE_ENTRY_LABEL (data));
gtk_size_group_add_widget (spinner_group, GIMP_SCALE_ENTRY_SPINBUTTON (data));
@@ -415,7 +415,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *image_map_tool)
-100.0, 100.0, 1.0, 10.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
- hs_tool->saturation_data = GTK_ADJUSTMENT (data);
+ hs_tool->saturation_data = data;
gtk_size_group_add_widget (label_group, GIMP_SCALE_ENTRY_LABEL (data));
gtk_size_group_add_widget (spinner_group, GIMP_SCALE_ENTRY_SPINBUTTON (data));
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index 2d8c3ed..183f0b0 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -366,7 +366,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
GtkWidget *button;
GtkWidget *spinbutton;
GtkWidget *bar;
- GtkObject *data;
+ GtkAdjustment *data;
gint border;
g_signal_connect (image_map_tool->settings_box, "file-dialog-setup",
@@ -510,7 +510,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
- tool->low_input = GTK_ADJUSTMENT (data);
+ tool->low_input = data;
g_signal_connect (tool->low_input, "value-changed",
G_CALLBACK (levels_low_input_changed),
tool);
@@ -526,13 +526,12 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gimp_help_set_help_data (spinbutton, _("Gamma"), NULL);
gtk_widget_show (spinbutton);
- tool->gamma = GTK_ADJUSTMENT (data);
+ tool->gamma = data;
g_signal_connect (tool->gamma, "value-changed",
G_CALLBACK (levels_gamma_changed),
tool);
- tool->gamma_linear = GTK_ADJUSTMENT (gtk_adjustment_new (127, 0, 255,
- 0.1, 1.0, 0.0));
+ tool->gamma_linear = gtk_adjustment_new (127, 0, 255, 0.1, 1.0, 0.0);
g_signal_connect (tool->gamma_linear, "value-changed",
G_CALLBACK (levels_linear_gamma_changed),
tool);
@@ -556,7 +555,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
- tool->high_input = GTK_ADJUSTMENT (data);
+ tool->high_input = data;
g_signal_connect (tool->high_input, "value-changed",
G_CALLBACK (levels_high_input_changed),
tool);
@@ -617,7 +616,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
- tool->low_output = GTK_ADJUSTMENT (data);
+ tool->low_output = data;
g_signal_connect (tool->low_output, "value-changed",
G_CALLBACK (levels_low_output_changed),
tool);
@@ -632,7 +631,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_end (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
- tool->high_output = GTK_ADJUSTMENT (data);
+ tool->high_output = data;
g_signal_connect (tool->high_output, "value-changed",
G_CALLBACK (levels_high_output_changed),
tool);
diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c
index 8f057b4..10df117 100644
--- a/app/tools/gimpposterizetool.c
+++ b/app/tools/gimpposterizetool.c
@@ -215,7 +215,7 @@ gimp_posterize_tool_dialog (GimpImageMapTool *image_map_tool)
GimpPosterizeTool *posterize_tool = GIMP_POSTERIZE_TOOL (image_map_tool);
GtkWidget *main_vbox;
GtkWidget *table;
- GtkObject *data;
+ GtkAdjustment *data;
main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
@@ -234,7 +234,7 @@ gimp_posterize_tool_dialog (GimpImageMapTool *image_map_tool)
gimp_scale_entry_set_logarithmic (data, TRUE);
- posterize_tool->levels_data = GTK_ADJUSTMENT (data);
+ posterize_tool->levels_data = data;
g_signal_connect (posterize_tool->levels_data, "value-changed",
G_CALLBACK (gimp_posterize_tool_levels_changed),
diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c
index f320541..cadadbc 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -170,7 +170,7 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
GtkWidget *table;
GtkWidget *button;
GtkWidget *scale;
- GtkObject *adj;
+ GtkAdjustment *adj;
table = gtk_table_new (4, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
@@ -181,7 +181,7 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
table, FALSE, FALSE, 0);
gtk_widget_show (table);
- button = gimp_spin_button_new ((GtkObject **) &rotate->angle_adj,
+ button = gimp_spin_button_new (&rotate->angle_adj,
0, -180, 180, 0.1, 15, 0, 2, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (button), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (button), SB_WIDTH);
diff --git a/app/tools/gimpsheartool.c b/app/tools/gimpsheartool.c
index f83d340..1da2bb1 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -128,7 +128,7 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
table, FALSE, FALSE, 0);
gtk_widget_show (table);
- button = gimp_spin_button_new ((GtkObject **) &shear->x_adj,
+ button = gimp_spin_button_new (&shear->x_adj,
0, -65536, 65536, 1, 15, 0, 1, 0);
gtk_entry_set_width_chars (GTK_ENTRY (button), SB_WIDTH);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, _("Shear magnitude _X:"),
@@ -138,7 +138,7 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
G_CALLBACK (shear_x_mag_changed),
tr_tool);
- button = gimp_spin_button_new ((GtkObject **) &shear->y_adj,
+ button = gimp_spin_button_new (&shear->y_adj,
0, -65536, 65536, 1, 15, 0, 1, 0);
gtk_entry_set_width_chars (GTK_ENTRY (button), SB_WIDTH);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, _("Shear magnitude _Y:"),
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 8d8b039..9f0aef6 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -206,7 +206,8 @@ gimp_text_tool_editor_position (GimpTextTool *text_tool)
GtkRequisition requisition;
gint x, y;
- gtk_widget_size_request (text_tool->style_overlay, &requisition);
+ gtk_widget_get_preferred_size (text_tool->style_overlay,
+ &requisition, NULL);
g_object_get (text_tool,
"x1", &x,
@@ -431,7 +432,7 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
gimp_text_tool_ensure_proxy (text_tool);
- if (gtk_bindings_activate_event (GTK_OBJECT (text_tool->proxy_text_view),
+ if (gtk_bindings_activate_event (G_OBJECT (text_tool->proxy_text_view),
kevent))
{
GIMP_LOG (TEXT_EDITING, "binding handled event");
@@ -488,7 +489,7 @@ gimp_text_tool_editor_key_release (GimpTextTool *text_tool,
gimp_text_tool_ensure_proxy (text_tool);
- if (gtk_bindings_activate_event (GTK_OBJECT (text_tool->proxy_text_view),
+ if (gtk_bindings_activate_event (G_OBJECT (text_tool->proxy_text_view),
kevent))
{
GIMP_LOG (TEXT_EDITING, "binding handled event");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]