[gimp] app: fix mnemonic of transform-tools "Readjust" button



commit 5ff38e68591298dd6b524c56ac888781b2361dc9
Author: Ell <ell_se yahoo com>
Date:   Fri Mar 8 03:44:26 2019 -0500

    app: fix mnemonic of transform-tools "Readjust" button
    
    ... and make sure that the tool implements readjust() when
    receiving a RESPONSE_READJUST.

 app/tools/gimptransformgridtool.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/app/tools/gimptransformgridtool.c b/app/tools/gimptransformgridtool.c
index 162f2b6171..9260e353cc 100644
--- a/app/tools/gimptransformgridtool.c
+++ b/app/tools/gimptransformgridtool.c
@@ -1095,7 +1095,7 @@ gimp_transform_grid_tool_dialog (GimpTransformGridTool *tg_tool)
 
   gimp_tool_gui_add_button   (tg_tool->gui, _("_Reset"),     RESPONSE_RESET);
   if (GIMP_TRANSFORM_GRID_TOOL_GET_CLASS (tg_tool)->readjust)
-    gimp_tool_gui_add_button (tg_tool->gui, _("_Readjust"),  RESPONSE_READJUST);
+    gimp_tool_gui_add_button (tg_tool->gui, _("Re_adjust"),  RESPONSE_READJUST);
   gimp_tool_gui_add_button   (tg_tool->gui, _("_Cancel"),    GTK_RESPONSE_CANCEL);
   gimp_tool_gui_add_button   (tg_tool->gui, ok_button_label, GTK_RESPONSE_OK);
 
@@ -1265,23 +1265,24 @@ gimp_transform_grid_tool_response (GimpToolGui           *gui,
       break;
 
     case RESPONSE_READJUST:
-      {
-        gboolean direction_linked;
+      if (GIMP_TRANSFORM_GRID_TOOL_GET_CLASS (tg_tool)->readjust)
+        {
+          gboolean direction_linked;
 
-        /*  readjust the transformation info  */
-        GIMP_TRANSFORM_GRID_TOOL_GET_CLASS (tg_tool)->readjust (tg_tool);
+          /*  readjust the transformation info  */
+          GIMP_TRANSFORM_GRID_TOOL_GET_CLASS (tg_tool)->readjust (tg_tool);
 
-        /*  recalculate the tool's transformation matrix, preserving the
-         *  overall transformation
-         */
-        direction_linked             = tg_options->direction_linked;
-        tg_options->direction_linked = TRUE;
-        gimp_transform_tool_recalc_matrix (tr_tool, display);
-        tg_options->direction_linked = direction_linked;
+          /*  recalculate the tool's transformation matrix, preserving the
+           *  overall transformation
+           */
+          direction_linked             = tg_options->direction_linked;
+          tg_options->direction_linked = TRUE;
+          gimp_transform_tool_recalc_matrix (tr_tool, display);
+          tg_options->direction_linked = direction_linked;
 
-        /*  push the new info to the undo stack  */
-        gimp_transform_grid_tool_push_internal_undo (tg_tool);
-      }
+          /*  push the new info to the undo stack  */
+          gimp_transform_grid_tool_push_internal_undo (tg_tool);
+        }
       break;
 
     case GTK_RESPONSE_OK:


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