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



commit fd327c82ffd37ba3e5980dc941133e5436d40bc1
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      |    4 ++--
 app/tools/gimpsheartool.c       |    4 ++--
 app/tools/gimptexttool-editor.c |    7 ++++---
 4 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index a0fa064..0675f4d 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -325,6 +325,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",
@@ -462,8 +463,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 f7a8066..109aa98 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -174,7 +174,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_table_set_row_spacings (GTK_TABLE (table), 2);
@@ -184,7 +184,7 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
                       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 c31ef1b..029859f 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -131,7 +131,7 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
                       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:"),
@@ -141,7 +141,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 c4e950e..3777ec4 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,
@@ -451,7 +452,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");
@@ -508,7 +509,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]