diff --git a/ChangeLog b/ChangeLog index 83d2638d41bad04fab85a479e3f3916a1e004b09..b24d5f8584c833297440d6d3b864e58a796533b0 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 4d68af11119c65b540bafa9ab72ae34acd1ae4a3..6293d8dd55a986f1ab4aebd7592ee741e689f10b 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 8b55c20a3345e856c6900442d48a8ad1d803148f..c303f66a8cee29c557f3fa780f49e5e453baed98 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 68534a35abfc609da933fbf8bc61ed0760c5aaf4..fe948517b7dc57fc6143b84e62168c37a0f72939 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 0482a99eed32f2a0eb5677c8b1c26f35c37fa9e0..404a249c056b6bf4235b5a8afea628e26916023a 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 5399c73311f218b18ebe4aba654ce872f924d319..0f02192e5028525e9b75de24e380973a2f433aa4 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 087e401b39720b3529ead126c892f68b5ab21e68..e8439935eb0c035d1c724f20e0d7a1786030548c 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 c340d8a6a6be8e1c7f5b28c111cbbbd4d0da5ef8..4ff73ec29b6d0bacd306906e0c5f4b9166cfe577 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 6024492a93e51f82e4b92033fb240394cad86265..693ac108ff72d4b78477faa07886147d5685a401 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 f492a8275af6dcc5087654e48f5b447d45aea0e5..9b6171b17b3a8266b64638b417e9cde7ec4a40bb 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 d1daa9a16792eb8b27333b43e20c34a05ef00931..86f7248a3c2410b9ae014ad13baf1dff9f721087 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 8ac6a0f1802fc184768f66c1d8cb4df7b0561234..a0c52a63f3dba8202514cc845ba1e1c7e25c7d7c 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 777259c900c3db5c30e2268a20aeb8e4dad4d599..a370134744665fa4bd39b050e00b58ebf04af904 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 0a67acc31a0becc6a5f355667b4d727be5578e05..ac141a337208e7c4cd4f2275cc3d3ac9e0129d52 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