[gimp/gtk3-port: 39/235] 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: 39/235] app: port tools to GTK+ 3.0 (trivial changes only)
- Date: Fri, 26 May 2017 17:44:08 +0000 (UTC)
commit 829f5bc769ec0cf1e16ecdbce6bbd5de361a5f6a
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/gimplevelstool.c | 4 ++--
app/tools/gimprotatetool.c | 5 ++---
app/tools/gimpsheartool.c | 6 ++----
app/tools/gimptexttool-editor.c | 7 ++++---
4 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index 79d2807..a740643 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -349,6 +349,7 @@ gimp_levels_tool_dialog (GimpFilterTool *filter_tool)
GtkAdjustment *adjustment;
GtkWidget *bar;
GtkWidget *handle_bar;
+ GtkAdjustment *data;
gint border;
g_signal_connect (filter_tool->settings_box, "file-dialog-setup",
@@ -498,8 +499,7 @@ gimp_levels_tool_dialog (GimpFilterTool *filter_tool)
tool->gamma = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spinbutton));
- 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);
diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c
index ba76ccd..20dfc51 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -186,8 +186,7 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
FALSE, FALSE, 0);
gtk_widget_show (table);
- rotate->angle_adj = (GtkAdjustment *)
- gtk_adjustment_new (0, -180, 180, 0.1, 15, 0);
+ rotate->angle_adj = gtk_adjustment_new (0, -180, 180, 0.1, 15, 0);
button = gtk_spin_button_new (rotate->angle_adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (button), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (button), TRUE);
@@ -206,7 +205,7 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_widget_show (scale);
- adj = (GtkAdjustment *) gtk_adjustment_new (0, -1, 1, 1, 10, 0);
+ adj = gtk_adjustment_new (0, -1, 1, 1, 10, 0);
button = gtk_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (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 68f4620..4904950 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -132,8 +132,7 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
FALSE, FALSE, 0);
gtk_widget_show (vbox);
- shear->x_adj = (GtkAdjustment *)
- gtk_adjustment_new (0, -65536, 65536, 1, 10, 0);
+ shear->x_adj = gtk_adjustment_new (0, -65536, 65536, 1, 10, 0);
scale = gimp_spin_scale_new (shear->x_adj, _("Shear magnitude _X"), 0);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), -1000, 1000);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
@@ -143,8 +142,7 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
G_CALLBACK (shear_x_mag_changed),
tr_tool);
- shear->y_adj = (GtkAdjustment *)
- gtk_adjustment_new (0, -65536, 65536, 1, 10, 0);
+ shear->y_adj = gtk_adjustment_new (0, -65536, 65536, 1, 10, 0);
scale = gimp_spin_scale_new (shear->y_adj, _("Shear magnitude _Y"), 0);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), -1000, 1000);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 9c32b90..ae8e92b 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -228,7 +228,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,
@@ -465,7 +466,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");
@@ -522,7 +523,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]