[gimp/gtk3-port: 39/231] app: port tools to GTK+ 3.0 (trivial changes only)



commit 3c79575bdb020bef67f73ddf9c46bc65c2c43e9a
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 38688b2..7ec1580 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -339,6 +339,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
   GtkAdjustment    *adjustment;
   GtkWidget        *bar;
   GtkWidget        *handle_bar;
+  GtkAdjustment    *data;
   gint              border;
 
   g_signal_connect (image_map_tool->settings_box, "file-dialog-setup",
@@ -484,8 +485,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_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 1caccbe..34c7f9f 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -184,8 +184,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);
@@ -204,7 +203,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 1179bf9..1184da9 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -130,8 +130,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);
@@ -141,8 +140,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 2762030..85af22d 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -222,7 +222,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,
@@ -467,7 +468,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");
@@ -524,7 +525,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]