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



commit 4f7c81a95391fbc70a31609d942bff20714049d8
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 eae3fa0..625621e 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -325,6 +325,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",
@@ -502,8 +503,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 f60d794..fd77a5d 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 17ae565..05ab933 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -131,8 +131,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);
@@ -142,8 +141,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 e4a109e..0e76417 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -227,7 +227,8 @@ gimp_text_tool_editor_position (GimpTextTool *text_tool)
       GtkRequisition    requisition;
       gdouble           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->widget,
                     "x1", &x,
@@ -464,7 +465,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");
@@ -520,7 +521,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]