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



commit 0c74362cba6f50188d892b21bb065b5b73a19761
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/gimpaligntool.c               |    2 +-
 app/tools/gimpbrightnesscontrasttool.c  |    4 ++--
 app/tools/gimpcolorbalancetool.c        |   12 ++++++------
 app/tools/gimpcolorizetool.c            |    8 ++++----
 app/tools/gimpeditselectiontool.c       |   24 ++++++++++++------------
 app/tools/gimpforegroundselectoptions.c |   26 +++++++++++++-------------
 app/tools/gimpforegroundselecttool.c    |    8 ++++----
 app/tools/gimpfreeselecttool.c          |   10 +++++-----
 app/tools/gimphuesaturationtool.c       |   10 +++++-----
 app/tools/gimpimagemaptool.c            |   10 +++++-----
 app/tools/gimpiscissorstool.c           |    8 ++++----
 app/tools/gimplevelstool.c              |   15 +++++++--------
 app/tools/gimpmeasuretool.c             |    2 +-
 app/tools/gimpposterizetool.c           |    4 ++--
 app/tools/gimprectangletool.c           |   16 ++++++++--------
 app/tools/gimprotatetool.c              |   12 ++++++------
 app/tools/gimpsheartool.c               |    4 ++--
 app/tools/gimptexttool-editor.c         |   21 +++++++++++----------
 app/tools/gimptransformtool.c           |   10 +++++-----
 app/tools/gimpvectortool.c              |   28 ++++++++++++++--------------
 20 files changed, 117 insertions(+), 117 deletions(-)
---
diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c
index 0226956..9ace3a0 100644
--- a/app/tools/gimpaligntool.c
+++ b/app/tools/gimpaligntool.c
@@ -908,7 +908,7 @@ gimp_align_tool_controls (GimpAlignTool *align_tool)
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
-  spinbutton = gimp_spin_button_new ((GtkObject **) &align_tool->horz_offset_adjustment,
+  spinbutton = gimp_spin_button_new (&align_tool->horz_offset_adjustment,
                                      0,
                                      -100000,
                                      100000,
diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c
index 27f8980..cde2263 100644
--- a/app/tools/gimpbrightnesscontrasttool.c
+++ b/app/tools/gimpbrightnesscontrasttool.c
@@ -301,7 +301,7 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
   GtkWidget                    *table;
   GtkWidget                    *slider;
   GtkWidget                    *button;
-  GtkObject                    *data;
+  GtkAdjustment                *data;
 
   bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (image_map_tool);
   config  = bc_tool->config;
@@ -322,7 +322,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;
   slider = GIMP_SCALE_ENTRY_SCALE (data);
   gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_CONTINUOUS);
 
diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c
index 7f57a7d..6d46e9e 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_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_CONTINUOUS);
   gtk_widget_set_size_request (slider, 100, -1);
@@ -246,7 +246,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 a35c3aa..fcc25e8 100644
--- a/app/tools/gimpcolorizetool.c
+++ b/app/tools/gimpcolorizetool.c
@@ -218,7 +218,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
   GtkWidget        *slider;
   GtkWidget        *frame;
   GtkWidget        *vbox;
-  GtkObject        *data;
+  GtkAdjustment    *data;
 
   main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
 
@@ -244,7 +244,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;
   slider = GIMP_SCALE_ENTRY_SCALE (data);
   gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_CONTINUOUS);
 
@@ -259,7 +259,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;
   slider = GIMP_SCALE_ENTRY_SCALE (data);
   gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_CONTINUOUS);
 
@@ -274,7 +274,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;
   slider = GIMP_SCALE_ENTRY_SCALE (data);
   gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_CONTINUOUS);
 
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index 6888215..5529677 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -1127,10 +1127,10 @@ gimp_edit_selection_tool_translate (GimpTool          *tool,
 
   /* bail out early if it is not an arrow key event */
 
-  if (kevent->keyval != GDK_Left &&
-      kevent->keyval != GDK_Right &&
-      kevent->keyval != GDK_Up &&
-      kevent->keyval != GDK_Down)
+  if (kevent->keyval != GDK_KEY_Left &&
+      kevent->keyval != GDK_KEY_Right &&
+      kevent->keyval != GDK_KEY_Up &&
+      kevent->keyval != GDK_KEY_Down)
     return FALSE;
 
   /*  adapt arrow velocity to the zoom factor when holding <shift>  */
@@ -1143,38 +1143,38 @@ gimp_edit_selection_tool_translate (GimpTool          *tool,
    *  them.
    */
   inc_x = process_event_queue_keys (kevent,
-                                    GDK_Left,
+                                    GDK_KEY_Left,
                                     kevent->state | GDK_SHIFT_MASK,
                                     -1 * velocity,
 
-                                    GDK_Left,
+                                    GDK_KEY_Left,
                                     kevent->state & ~GDK_SHIFT_MASK,
                                     -1,
 
-                                    GDK_Right,
+                                    GDK_KEY_Right,
                                     kevent->state | GDK_SHIFT_MASK,
                                     1 * velocity,
 
-                                    GDK_Right,
+                                    GDK_KEY_Right,
                                     kevent->state & ~GDK_SHIFT_MASK,
                                     1,
 
                                     0);
 
   inc_y = process_event_queue_keys (kevent,
-                                    GDK_Up,
+                                    GDK_KEY_Up,
                                     kevent->state | GDK_SHIFT_MASK,
                                     -1 * velocity,
 
-                                    GDK_Up,
+                                    GDK_KEY_Up,
                                     kevent->state & ~GDK_SHIFT_MASK,
                                     -1,
 
-                                    GDK_Down,
+                                    GDK_KEY_Down,
                                     kevent->state | GDK_SHIFT_MASK,
                                     1 * velocity,
 
-                                    GDK_Down,
+                                    GDK_KEY_Down,
                                     kevent->state & ~GDK_SHIFT_MASK,
                                     1,
 
diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c
index 5853ba5..1ff4f02 100644
--- a/app/tools/gimpforegroundselectoptions.c
+++ b/app/tools/gimpforegroundselectoptions.c
@@ -255,19 +255,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/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 71b3915..5a592a3 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -404,13 +404,13 @@ gimp_foreground_select_tool_key_press (GimpTool    *tool,
     {
       switch (kevent->keyval)
         {
-        case GDK_Return:
-        case GDK_KP_Enter:
-        case GDK_ISO_Enter:
+        case GDK_KEY_Return:
+        case GDK_KEY_KP_Enter:
+        case GDK_KEY_ISO_Enter:
           gimp_foreground_select_tool_apply (fg_select, display);
           return TRUE;
 
-        case GDK_Escape:
+        case GDK_KEY_Escape:
           gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
           return TRUE;
 
diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c
index 37cdb13..dce6184 100644
--- a/app/tools/gimpfreeselecttool.c
+++ b/app/tools/gimpfreeselecttool.c
@@ -1430,17 +1430,17 @@ gimp_free_select_tool_key_press (GimpTool    *tool,
 
   switch (kevent->keyval)
     {
-    case GDK_BackSpace:
+    case GDK_KEY_BackSpace:
       gimp_free_select_tool_remove_last_segment (fst);
       return TRUE;
 
-    case GDK_Return:
-    case GDK_KP_Enter:
-    case GDK_ISO_Enter:
+    case GDK_KEY_Return:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_ISO_Enter:
       gimp_free_select_tool_commit (fst, display);
       return TRUE;
 
-    case GDK_Escape:
+    case GDK_KEY_Escape:
       gimp_free_select_tool_halt (fst);
       return TRUE;
 
diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c
index b716ded..8e3f4db 100644
--- a/app/tools/gimphuesaturationtool.c
+++ b/app/tools/gimphuesaturationtool.c
@@ -228,7 +228,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;
@@ -351,7 +351,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));
@@ -387,7 +387,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));
@@ -406,7 +406,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));
@@ -425,7 +425,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/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index 965f668..97e9288 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -438,21 +438,21 @@ gimp_image_map_tool_key_press (GimpTool    *tool,
     {
       switch (kevent->keyval)
         {
-        case GDK_Return:
-        case GDK_KP_Enter:
-        case GDK_ISO_Enter:
+        case GDK_KEY_Return:
+        case GDK_KEY_KP_Enter:
+        case GDK_KEY_ISO_Enter:
           gimp_image_map_tool_response (image_map_tool->shell,
                                         GTK_RESPONSE_OK,
                                         image_map_tool);
           return TRUE;
 
-        case GDK_BackSpace:
+        case GDK_KEY_BackSpace:
           gimp_image_map_tool_response (image_map_tool->shell,
                                         RESPONSE_RESET,
                                         image_map_tool);
           return TRUE;
 
-        case GDK_Escape:
+        case GDK_KEY_Escape:
           gimp_image_map_tool_response (image_map_tool->shell,
                                         GTK_RESPONSE_CANCEL,
                                         image_map_tool);
diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c
index 9f079fc..8884272 100644
--- a/app/tools/gimpiscissorstool.c
+++ b/app/tools/gimpiscissorstool.c
@@ -1082,9 +1082,9 @@ gimp_iscissors_tool_key_press (GimpTool    *tool,
 
   switch (kevent->keyval)
     {
-    case GDK_Return:
-    case GDK_KP_Enter:
-    case GDK_ISO_Enter:
+    case GDK_KEY_Return:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_ISO_Enter:
       if (iscissors->connected && iscissors->mask)
         {
           gimp_iscissors_tool_apply (iscissors, display);
@@ -1092,7 +1092,7 @@ gimp_iscissors_tool_key_press (GimpTool    *tool,
         }
       return FALSE;
 
-    case GDK_Escape:
+    case GDK_KEY_Escape:
       gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
       return TRUE;
 
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index 8803fa3..8cb3d11 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/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c
index abe5cdf..21c44ba 100644
--- a/app/tools/gimpmeasuretool.c
+++ b/app/tools/gimpmeasuretool.c
@@ -478,7 +478,7 @@ gimp_measure_tool_key_press (GimpTool    *tool,
     {
       switch (kevent->keyval)
         {
-        case GDK_Escape:
+        case GDK_KEY_Escape:
           gimp_measure_tool_halt (GIMP_MEASURE_TOOL (tool));
           return TRUE;
 
diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c
index 86a3e00..a5ef380 100644
--- a/app/tools/gimpposterizetool.c
+++ b/app/tools/gimpposterizetool.c
@@ -216,7 +216,7 @@ gimp_posterize_tool_dialog (GimpImageMapTool *image_map_tool)
   GtkWidget         *main_vbox;
   GtkWidget         *table;
   GtkWidget         *slider;
-  GtkObject         *data;
+  GtkAdjustment     *data;
 
   main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
 
@@ -235,7 +235,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;
 
   slider = GIMP_SCALE_ENTRY_SCALE (data);
   gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index 0a82e5d..a49d2c9 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -1455,27 +1455,27 @@ gimp_rectangle_tool_key_press (GimpTool    *tool,
 
   switch (kevent->keyval)
     {
-    case GDK_Up:
+    case GDK_KEY_Up:
       dy = -1;
       break;
-    case GDK_Left:
+    case GDK_KEY_Left:
       dx = -1;
       break;
-    case GDK_Right:
+    case GDK_KEY_Right:
       dx = 1;
       break;
-    case GDK_Down:
+    case GDK_KEY_Down:
       dy = 1;
       break;
 
-    case GDK_Return:
-    case GDK_KP_Enter:
-    case GDK_ISO_Enter:
+    case GDK_KEY_Return:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_ISO_Enter:
       if (gimp_rectangle_tool_execute (rect_tool))
         gimp_rectangle_tool_halt (rect_tool);
       return TRUE;
 
-    case GDK_Escape:
+    case GDK_KEY_Escape:
       gimp_rectangle_tool_cancel (rect_tool);
       gimp_rectangle_tool_halt (rect_tool);
       return TRUE;
diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c
index f6d3e37..35b4180 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -139,19 +139,19 @@ gimp_rotate_tool_key_press (GimpTool    *tool,
 
       switch (kevent->keyval)
         {
-        case GDK_Up:
+        case GDK_KEY_Up:
           gtk_spin_button_spin (angle_spin, GTK_SPIN_STEP_FORWARD, 0.0);
           return TRUE;
 
-        case GDK_Down:
+        case GDK_KEY_Down:
           gtk_spin_button_spin (angle_spin, GTK_SPIN_STEP_BACKWARD, 0.0);
           return TRUE;
 
-        case GDK_Left:
+        case GDK_KEY_Left:
           gtk_spin_button_spin (angle_spin, GTK_SPIN_PAGE_FORWARD, 0.0);
           return TRUE;
 
-        case GDK_Right:
+        case GDK_KEY_Right:
           gtk_spin_button_spin (angle_spin, GTK_SPIN_PAGE_BACKWARD, 0.0);
           return TRUE;
 
@@ -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 4da3077..74cee4c 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -127,7 +127,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:"),
@@ -137,7 +137,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 a34392b..b81a525 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -204,7 +204,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,
@@ -435,7 +436,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");
@@ -450,21 +451,21 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
 
   switch (kevent->keyval)
     {
-    case GDK_Return:
-    case GDK_KP_Enter:
-    case GDK_ISO_Enter:
+    case GDK_KEY_Return:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_ISO_Enter:
       gimp_text_tool_reset_im_context (text_tool);
       gimp_text_tool_enter_text (text_tool, "\n");
       break;
 
-    case GDK_Tab:
-    case GDK_KP_Tab:
-    case GDK_ISO_Left_Tab:
+    case GDK_KEY_Tab:
+    case GDK_KEY_KP_Tab:
+    case GDK_KEY_ISO_Left_Tab:
       gimp_text_tool_reset_im_context (text_tool);
       gimp_text_tool_enter_text (text_tool, "\t");
       break;
 
-    case GDK_Escape:
+    case GDK_KEY_Escape:
       gimp_rectangle_tool_cancel (GIMP_RECTANGLE_TOOL (text_tool));
       gimp_tool_control (GIMP_TOOL (text_tool), GIMP_TOOL_ACTION_HALT,
                          GIMP_TOOL (text_tool)->display);
@@ -492,7 +493,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");
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index a9e0ed2..4c4b10e 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -503,17 +503,17 @@ gimp_transform_tool_key_press (GimpTool    *tool,
     {
       switch (kevent->keyval)
         {
-        case GDK_Return:
-        case GDK_KP_Enter:
-        case GDK_ISO_Enter:
+        case GDK_KEY_Return:
+        case GDK_KEY_KP_Enter:
+        case GDK_KEY_ISO_Enter:
           gimp_transform_tool_response (NULL, GTK_RESPONSE_OK, trans_tool);
           return TRUE;
 
-        case GDK_BackSpace:
+        case GDK_KEY_BackSpace:
           gimp_transform_tool_response (NULL, RESPONSE_RESET, trans_tool);
           return TRUE;
 
-        case GDK_Escape:
+        case GDK_KEY_Escape:
           gimp_transform_tool_response (NULL, GTK_RESPONSE_CANCEL, trans_tool);
           return TRUE;
         }
diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c
index 45f0431..824219e 100644
--- a/app/tools/gimpvectortool.c
+++ b/app/tools/gimpvectortool.c
@@ -819,21 +819,21 @@ gimp_vector_tool_key_press (GimpTool     *tool,
 
   switch (kevent->keyval)
     {
-    case GDK_Return:
-    case GDK_KP_Enter:
-    case GDK_ISO_Enter:
+    case GDK_KEY_Return:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_ISO_Enter:
       gimp_vector_tool_to_selection_extended (vector_tool, kevent->state);
       break;
 
-    case GDK_BackSpace:
-    case GDK_Delete:
+    case GDK_KEY_BackSpace:
+    case GDK_KEY_Delete:
       gimp_vector_tool_delete_selected_anchors (vector_tool);
       break;
 
-    case GDK_Left:
-    case GDK_Right:
-    case GDK_Up:
-    case GDK_Down:
+    case GDK_KEY_Left:
+    case GDK_KEY_Right:
+    case GDK_KEY_Up:
+    case GDK_KEY_Down:
       xdist = FUNSCALEX (shell, pixels);
       ydist = FUNSCALEY (shell, pixels);
 
@@ -843,19 +843,19 @@ gimp_vector_tool_key_press (GimpTool     *tool,
 
       switch (kevent->keyval)
         {
-        case GDK_Left:
+        case GDK_KEY_Left:
           gimp_vector_tool_move_selected_anchors (vector_tool, -xdist, 0);
           break;
 
-        case GDK_Right:
+        case GDK_KEY_Right:
           gimp_vector_tool_move_selected_anchors (vector_tool, xdist, 0);
           break;
 
-        case GDK_Up:
+        case GDK_KEY_Up:
           gimp_vector_tool_move_selected_anchors (vector_tool, 0, -ydist);
           break;
 
-        case GDK_Down:
+        case GDK_KEY_Down:
           gimp_vector_tool_move_selected_anchors (vector_tool, 0, ydist);
           break;
 
@@ -867,7 +867,7 @@ gimp_vector_tool_key_press (GimpTool     *tool,
       vector_tool->have_undo = FALSE;
       break;
 
-    case GDK_Escape:
+    case GDK_KEY_Escape:
       if (options->edit_mode != GIMP_VECTOR_MODE_DESIGN)
         g_object_set (options, "vectors-edit-mode",
                       GIMP_VECTOR_MODE_DESIGN, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]