From 7053e3daac40c32468ae3ee303f93df0d016fcb2 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 12 Sep 2006 06:37:54 +0000 Subject: [PATCH] app/tools/gimpclonetool.c app/tools/gimpconvolvetool.c 2006-09-12 Sven Neumann * app/tools/gimpclonetool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimperasertool.c * app/tools/gimppainttool.c * app/tools/gimpperspectiveclonetool.c * app/tools/gimpregionselecttool.c * app/tools/gimpselectiontool.c * app/tools/gimpsmudgetool.c * app/tools/gimpvectortool.c: removed trailing dot from statusbar messages. * app/widgets/gimpwidgets-utils.c (gimp_suggest_modifiers): don't use "try" if the modifier action has been specified. --- ChangeLog | 19 ++++++++ app/tools/gimpclonetool.c | 2 +- app/tools/gimpconvolvetool.c | 8 ++-- app/tools/gimpcroptool.c | 3 +- app/tools/gimpcurvestool.c | 4 +- app/tools/gimpdodgeburntool.c | 8 ++-- app/tools/gimperasertool.c | 4 +- app/tools/gimppainttool.c | 18 +++---- app/tools/gimpperspectiveclonetool.c | 2 +- app/tools/gimpregionselecttool.c | 2 +- app/tools/gimpselectiontool.c | 20 ++++---- app/tools/gimpsmudgetool.c | 4 +- app/tools/gimpvectortool.c | 32 ++++++------- app/widgets/gimpwidgets-utils.c | 72 +++++++++++++++++++--------- 14 files changed, 123 insertions(+), 75 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83d2638d41..b24d5f8584 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2006-09-12 Sven Neumann + + * app/tools/gimpclonetool.c + * app/tools/gimpconvolvetool.c + * app/tools/gimpcroptool.c + * app/tools/gimpcurvestool.c + * app/tools/gimpdodgeburntool.c + * app/tools/gimperasertool.c + * app/tools/gimppainttool.c + * app/tools/gimpperspectiveclonetool.c + * app/tools/gimpregionselecttool.c + * app/tools/gimpselectiontool.c + * app/tools/gimpsmudgetool.c + * app/tools/gimpvectortool.c: removed trailing dot from statusbar + messages. + + * app/widgets/gimpwidgets-utils.c (gimp_suggest_modifiers): don't + use "try" if the modifier action has been specified. + 2006-09-12 Pema Geyleg * configure.in: Added 'dz' (Dzongkha) to ALL_LINGUAS diff --git a/app/tools/gimpclonetool.c b/app/tools/gimpclonetool.c index 4d68af1111..6293d8dd55 100644 --- a/app/tools/gimpclonetool.c +++ b/app/tools/gimpclonetool.c @@ -86,7 +86,7 @@ gimp_clone_tool_init (GimpCloneTool *clone) paint_tool->status = _("Click to clone"); paint_tool->status_ctrl = _("%s to set a new clone source"); - source_tool->status_paint = _("Click to clone."); + source_tool->status_paint = _("Click to clone"); source_tool->status_set_source = _("Click to set a new clone source"); source_tool->status_set_source_ctrl = _("%s to set a new clone source"); } diff --git a/app/tools/gimpconvolvetool.c b/app/tools/gimpconvolvetool.c index 8b55c20a33..c303f66a8c 100644 --- a/app/tools/gimpconvolvetool.c +++ b/app/tools/gimpconvolvetool.c @@ -167,14 +167,14 @@ gimp_convolve_tool_status_update (GimpTool *tool, switch (type) { case GIMP_BLUR_CONVOLVE: - paint_tool->status = _("Click to blur."); - paint_tool->status_line = _("Click to blur the line."); + paint_tool->status = _("Click to blur"); + paint_tool->status_line = _("Click to blur the line"); paint_tool->status_ctrl = _("%s to sharpen"); break; case GIMP_SHARPEN_CONVOLVE: - paint_tool->status = _("Click to sharpen."); - paint_tool->status_line = _("Click to sharpen the line."); + paint_tool->status = _("Click to sharpen"); + paint_tool->status_line = _("Click to sharpen the line"); paint_tool->status_ctrl = _("%s to blur"); break; diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c index 68534a35ab..fe948517b7 100644 --- a/app/tools/gimpcroptool.c +++ b/app/tools/gimpcroptool.c @@ -238,8 +238,7 @@ gimp_crop_tool_button_release (GimpTool *tool, GdkModifierType state, GimpDisplay *display) { - gimp_tool_push_status (tool, display, - _("Click or press enter to crop.")); + gimp_tool_push_status (tool, display, _("Click or press enter to crop")); gimp_rectangle_tool_button_release (tool, coords, time, state, display); } diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index 0482a99eed..404a249c05 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -358,12 +358,12 @@ gimp_curves_tool_oper_update (GimpTool *tool, if (state & GDK_SHIFT_MASK) { mode = GIMP_COLOR_PICK_MODE_PALETTE; - status = _("Click to add a control point."); + status = _("Click to add a control point"); } else if (state & GDK_CONTROL_MASK) { mode = GIMP_COLOR_PICK_MODE_PALETTE; - status = _("Click to add control points to all channels."); + status = _("Click to add control points to all channels"); } GIMP_COLOR_TOOL (tool)->pick_mode = mode; diff --git a/app/tools/gimpdodgeburntool.c b/app/tools/gimpdodgeburntool.c index 5399c73311..0f02192e50 100644 --- a/app/tools/gimpdodgeburntool.c +++ b/app/tools/gimpdodgeburntool.c @@ -170,14 +170,14 @@ gimp_dodge_burn_tool_status_update (GimpTool *tool, switch (type) { case GIMP_DODGE: - paint_tool->status = _("Click to dodge."); - paint_tool->status_line = _("Click to dodge the line."); + paint_tool->status = _("Click to dodge"); + paint_tool->status_line = _("Click to dodge the line"); paint_tool->status_ctrl = _("%s to burn"); break; case GIMP_BURN: - paint_tool->status = _("Click to burn."); - paint_tool->status_line = _("Click to burn the line."); + paint_tool->status = _("Click to burn"); + paint_tool->status_line = _("Click to burn the line"); paint_tool->status_ctrl = _("%s to dodge"); break; diff --git a/app/tools/gimperasertool.c b/app/tools/gimperasertool.c index 087e401b39..e8439935eb 100644 --- a/app/tools/gimperasertool.c +++ b/app/tools/gimperasertool.c @@ -94,8 +94,8 @@ gimp_eraser_tool_init (GimpEraserTool *eraser) gimp_paint_tool_enable_color_picker (paint_tool, GIMP_COLOR_PICK_MODE_BACKGROUND); - paint_tool->status = _("Click to erase."); - paint_tool->status_line = _("Click to erase the line."); + paint_tool->status = _("Click to erase"); + paint_tool->status_line = _("Click to erase the line"); paint_tool->status_ctrl = _("%s to pick a background color"); } diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index c340d8a6a6..4ff73ec29b 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -127,8 +127,8 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool) paint_tool->pick_colors = FALSE; paint_tool->draw_line = FALSE; - paint_tool->status = _("Click to paint."); - paint_tool->status_line = _("Click to draw the line."); + paint_tool->status = _("Click to paint"); + paint_tool->status_line = _("Click to draw the line"); paint_tool->status_ctrl = _("%s to pick a color"); paint_tool->core = NULL; @@ -479,13 +479,13 @@ gimp_paint_tool_modifier_key (GimpTool *tool, case GIMP_COLOR_PICK_MODE_FOREGROUND: gimp_tool_push_status (tool, display, _("Click in any image to pick the " - "foreground color.")); + "foreground color")); break; case GIMP_COLOR_PICK_MODE_BACKGROUND: gimp_tool_push_status (tool, display, _("Click in any image to pick the " - "background color.")); + "background color")); break; default: @@ -557,11 +557,11 @@ gimp_paint_tool_oper_update (GimpTool *tool, * draw a line. */ - gdouble dx, dy, dist; - gchar status_str[STATUSBAR_SIZE]; - gchar *status_help; - gint off_x, off_y; - gboolean hard; + gchar status_str[STATUSBAR_SIZE]; + gchar *status_help; + gdouble dx, dy, dist; + gint off_x, off_y; + gboolean hard; core->cur_coords = *coords; diff --git a/app/tools/gimpperspectiveclonetool.c b/app/tools/gimpperspectiveclonetool.c index 6024492a93..693ac108ff 100644 --- a/app/tools/gimpperspectiveclonetool.c +++ b/app/tools/gimpperspectiveclonetool.c @@ -647,7 +647,7 @@ gimp_perspective_clone_tool_oper_update (GimpTool *tool, if (clone->src_drawable == NULL) { gimp_tool_replace_status (tool, display, - _("Ctrl-Click to set a clone source.")); + _("Ctrl-Click to set a clone source")); } else { diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c index f492a8275a..9b6171b17b 100644 --- a/app/tools/gimpregionselecttool.c +++ b/app/tools/gimpregionselecttool.c @@ -161,7 +161,7 @@ gimp_region_select_tool_button_press (GimpTool *tool, return; gimp_tool_push_status (tool, display, - _("Move the mouse to change threshold.")); + _("Move the mouse to change threshold")); /* calculate the region boundary */ region_sel->segs = gimp_region_select_tool_calculate (region_sel, display, diff --git a/app/tools/gimpselectiontool.c b/app/tools/gimpselectiontool.c index d1daa9a167..86f7248a3c 100644 --- a/app/tools/gimpselectiontool.c +++ b/app/tools/gimpselectiontool.c @@ -273,18 +273,20 @@ gimp_selection_tool_oper_update (GimpTool *tool, if (! selection_empty) { status = gimp_suggest_modifiers (_("Click-Drag to replace the " - "current selection."), + "current selection"), modifiers & ~state, NULL, NULL, NULL); free_status = TRUE; } else - status = _("Click-Drag to create a new selection."); + { + status = _("Click-Drag to create a new selection"); + } break; case SELECTION_ADD: status = gimp_suggest_modifiers (_("Click-Drag to add to the " - "current selection."), + "current selection"), modifiers & ~(state | GDK_SHIFT_MASK), NULL, NULL, NULL); @@ -293,7 +295,7 @@ gimp_selection_tool_oper_update (GimpTool *tool, case SELECTION_SUBTRACT: status = gimp_suggest_modifiers (_("Click-Drag to subtract from the " - "current selection."), + "current selection"), modifiers & ~(state | GDK_CONTROL_MASK), NULL, NULL, NULL); @@ -302,7 +304,7 @@ gimp_selection_tool_oper_update (GimpTool *tool, case SELECTION_INTERSECT: status = gimp_suggest_modifiers (_("Click-Drag to intersect with " - "the current selection."), + "the current selection"), modifiers & ~state, NULL, NULL, NULL); free_status = TRUE; @@ -310,22 +312,22 @@ gimp_selection_tool_oper_update (GimpTool *tool, case SELECTION_MOVE_MASK: status = gimp_suggest_modifiers (_("Click-Drag to move the " - "selection mask."), + "selection mask"), modifiers & ~state, NULL, NULL, NULL); free_status = TRUE; break; case SELECTION_MOVE: - status = _("Click-Drag to move the selected pixels."); + status = _("Click-Drag to move the selected pixels"); break; case SELECTION_MOVE_COPY: - status = _("Click-Drag to move a copy of the selected pixels."); + status = _("Click-Drag to move a copy of the selected pixels"); break; case SELECTION_ANCHOR: - status = _("Click to anchor the floating selection."); + status = _("Click to anchor the floating selection"); break; default: diff --git a/app/tools/gimpsmudgetool.c b/app/tools/gimpsmudgetool.c index 8ac6a0f180..a0c52a63f3 100644 --- a/app/tools/gimpsmudgetool.c +++ b/app/tools/gimpsmudgetool.c @@ -75,8 +75,8 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge) gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (smudge), GIMP_COLOR_PICK_MODE_FOREGROUND); - paint_tool->status = _("Click to smudge."); - paint_tool->status_line = _("Click to smudge the line."); + paint_tool->status = _("Click to smudge"); + paint_tool->status_line = _("Click to smudge the line"); paint_tool->status_ctrl = NULL; /* don't suggest Ctrl even if it works */ } diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c index 777259c900..a370134744 100644 --- a/app/tools/gimpvectortool.c +++ b/app/tools/gimpvectortool.c @@ -1141,29 +1141,29 @@ gimp_vector_tool_status_update (GimpTool *tool, switch (vector_tool->function) { case VECTORS_SELECT_VECTOR: - status = _("Click to pick path to edit."); + status = _("Click to pick path to edit"); break; case VECTORS_CREATE_VECTOR: - status = _("Click to create a new path."); + status = _("Click to create a new path"); break; case VECTORS_CREATE_STROKE: - status = _("Click to create a new component of the path."); + status = _("Click to create a new component of the path"); break; case VECTORS_ADD_ANCHOR: - status = gimp_suggest_modifiers (_("Click to create a new anchor."), + status = gimp_suggest_modifiers (_("Click to create a new anchor"), GDK_SHIFT_MASK & ~state, NULL, NULL, NULL); free_status = TRUE; break; case VECTORS_MOVE_ANCHOR: - status = _("Click-Drag to move the anchor around."); + status = _("Click-Drag to move the anchor around"); break; case VECTORS_MOVE_ANCHORSET: - status = _("Click-Drag to move the anchors around."); + status = _("Click-Drag to move the anchors around"); break; case VECTORS_MOVE_HANDLE: status = gimp_suggest_modifiers (_("Click-Drag to move the handle " - "around."), + "around"), GDK_SHIFT_MASK & ~state, NULL, NULL, NULL); free_status = TRUE; @@ -1171,45 +1171,45 @@ gimp_vector_tool_status_update (GimpTool *tool, case VECTORS_MOVE_CURVE: if (GIMP_VECTOR_TOOL_GET_OPTIONS (tool)->polygonal) status = gimp_suggest_modifiers (_("Click-Drag to move the " - "anchors around."), + "anchors around"), GDK_SHIFT_MASK & ~state, NULL, NULL, NULL); else status = gimp_suggest_modifiers (_("Click-Drag to change the " - "shape of the curve."), + "shape of the curve"), GDK_SHIFT_MASK & ~state, _("%s: symmetrical"), NULL, NULL); free_status = TRUE; break; case VECTORS_MOVE_STROKE: status = gimp_suggest_modifiers (_("Click-Drag to move the " - "component around."), + "component around"), GDK_SHIFT_MASK & ~state, NULL, NULL, NULL); free_status = TRUE; break; case VECTORS_MOVE_VECTORS: - status = _("Click-Drag to move the path around."); + status = _("Click-Drag to move the path around"); break; case VECTORS_INSERT_ANCHOR: status = gimp_suggest_modifiers (_("Click-Drag to insert an anchor " - "on the path."), + "on the path"), GDK_SHIFT_MASK & ~state, NULL, NULL, NULL); free_status = TRUE; break; case VECTORS_DELETE_ANCHOR: - status = _("Click to delete this anchor."); + status = _("Click to delete this anchor"); break; case VECTORS_CONNECT_STROKES: status = _("Click to connect this anchor " - "with the selected endpoint."); + "with the selected endpoint"); break; case VECTORS_DELETE_SEGMENT: - status = _("Click to open up the path."); + status = _("Click to open up the path"); break; case VECTORS_CONVERT_EDGE: - status = _("Click to make this node angular."); + status = _("Click to make this node angular"); break; case VECTORS_FINISHED: status = NULL; diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c index 0a67acc31a..ac141a3372 100644 --- a/app/widgets/gimpwidgets-utils.c +++ b/app/widgets/gimpwidgets-utils.c @@ -600,50 +600,78 @@ gimp_suggest_modifiers (const gchar *message, const gchar *control_format, const gchar *alt_format) { - gchar msg_buf[3][BUF_SIZE]; - gint num_msgs = 0; + gchar msg_buf[3][BUF_SIZE]; + gint num_msgs = 0; + gboolean try = FALSE; if (modifiers & GDK_SHIFT_MASK) { if (shift_format && *shift_format) - g_snprintf (msg_buf[num_msgs], BUF_SIZE, shift_format, - gimp_get_mod_name_shift ()); + { + g_snprintf (msg_buf[num_msgs], BUF_SIZE, shift_format, + gimp_get_mod_name_shift ()); + } else - g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_shift (), BUF_SIZE); + { + g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_shift (), BUF_SIZE); + try = TRUE; + } + num_msgs++; } + if (modifiers & GDK_CONTROL_MASK) { if (control_format && *control_format) - g_snprintf (msg_buf[num_msgs], BUF_SIZE, control_format, - gimp_get_mod_name_control ()); + { + g_snprintf (msg_buf[num_msgs], BUF_SIZE, control_format, + gimp_get_mod_name_control ()); + } else - g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_control (), BUF_SIZE); + { + g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_control (), BUF_SIZE); + try = TRUE; + } + num_msgs++; } + if (modifiers & GDK_MOD1_MASK) { if (alt_format && *alt_format) - g_snprintf (msg_buf[num_msgs], BUF_SIZE, alt_format, - gimp_get_mod_name_alt ()); + { + g_snprintf (msg_buf[num_msgs], BUF_SIZE, alt_format, + gimp_get_mod_name_alt ()); + } else - g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_alt (), BUF_SIZE); + { + g_strlcpy (msg_buf[num_msgs], gimp_get_mod_name_alt (), BUF_SIZE); + try = TRUE; + } + num_msgs++; } + /* This convoluted way to build the message using multiple format strings * tries to make the messages easier to translate to other languages. */ - if (num_msgs == 1) - return g_strdup_printf (_("%s (try %s)"), message, - msg_buf[0]); - else if (num_msgs == 2) - return g_strdup_printf (_("%s (try %s, %s)"), message, - msg_buf[0], msg_buf[1]); - else if (num_msgs == 3) - return g_strdup_printf (_("%s (try %s, %s, %s)"), message, - msg_buf[0], msg_buf[1], msg_buf[2]); - else - return g_strdup (message); + + switch (num_msgs) + { + case 1: + return g_strdup_printf (try ? _("%s (try %s)") : _("%s (%s)"), + message, msg_buf[0]); + + case 2: + return g_strdup_printf (_("%s (try %s, %s)"), + message, msg_buf[0], msg_buf[1]); + + case 3: + return g_strdup_printf (_("%s (try %s, %s, %s)"), + message, msg_buf[0], msg_buf[1], msg_buf[2]); + } + + return g_strdup (message); } #undef BUF_SIZE -- GitLab