Commit 7053e3da authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/tools/gimpclonetool.c app/tools/gimpconvolvetool.c

2006-09-12  Sven Neumann  <sven@gimp.org>

	* 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.
parent 5055f0e0
2006-09-12 Sven Neumann <sven@gimp.org>
* 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 <pgeyleg@gmail.com> 2006-09-12 Pema Geyleg <pgeyleg@gmail.com>
* configure.in: Added 'dz' (Dzongkha) to ALL_LINGUAS * configure.in: Added 'dz' (Dzongkha) to ALL_LINGUAS
......
...@@ -86,7 +86,7 @@ gimp_clone_tool_init (GimpCloneTool *clone) ...@@ -86,7 +86,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
paint_tool->status = _("Click to clone"); paint_tool->status = _("Click to clone");
paint_tool->status_ctrl = _("%s to set a new clone source"); 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 = _("Click to set a new clone source");
source_tool->status_set_source_ctrl = _("%s to set a new clone source"); source_tool->status_set_source_ctrl = _("%s to set a new clone source");
} }
......
...@@ -167,14 +167,14 @@ gimp_convolve_tool_status_update (GimpTool *tool, ...@@ -167,14 +167,14 @@ gimp_convolve_tool_status_update (GimpTool *tool,
switch (type) switch (type)
{ {
case GIMP_BLUR_CONVOLVE: case GIMP_BLUR_CONVOLVE:
paint_tool->status = _("Click to blur."); paint_tool->status = _("Click to blur");
paint_tool->status_line = _("Click to blur the line."); paint_tool->status_line = _("Click to blur the line");
paint_tool->status_ctrl = _("%s to sharpen"); paint_tool->status_ctrl = _("%s to sharpen");
break; break;
case GIMP_SHARPEN_CONVOLVE: case GIMP_SHARPEN_CONVOLVE:
paint_tool->status = _("Click to sharpen."); paint_tool->status = _("Click to sharpen");
paint_tool->status_line = _("Click to sharpen the line."); paint_tool->status_line = _("Click to sharpen the line");
paint_tool->status_ctrl = _("%s to blur"); paint_tool->status_ctrl = _("%s to blur");
break; break;
......
...@@ -238,8 +238,7 @@ gimp_crop_tool_button_release (GimpTool *tool, ...@@ -238,8 +238,7 @@ gimp_crop_tool_button_release (GimpTool *tool,
GdkModifierType state, GdkModifierType state,
GimpDisplay *display) GimpDisplay *display)
{ {
gimp_tool_push_status (tool, display, gimp_tool_push_status (tool, display, _("Click or press enter to crop"));
_("Click or press enter to crop."));
gimp_rectangle_tool_button_release (tool, coords, time, state, display); gimp_rectangle_tool_button_release (tool, coords, time, state, display);
} }
......
...@@ -358,12 +358,12 @@ gimp_curves_tool_oper_update (GimpTool *tool, ...@@ -358,12 +358,12 @@ gimp_curves_tool_oper_update (GimpTool *tool,
if (state & GDK_SHIFT_MASK) if (state & GDK_SHIFT_MASK)
{ {
mode = GIMP_COLOR_PICK_MODE_PALETTE; 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) else if (state & GDK_CONTROL_MASK)
{ {
mode = GIMP_COLOR_PICK_MODE_PALETTE; 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; GIMP_COLOR_TOOL (tool)->pick_mode = mode;
......
...@@ -170,14 +170,14 @@ gimp_dodge_burn_tool_status_update (GimpTool *tool, ...@@ -170,14 +170,14 @@ gimp_dodge_burn_tool_status_update (GimpTool *tool,
switch (type) switch (type)
{ {
case GIMP_DODGE: case GIMP_DODGE:
paint_tool->status = _("Click to dodge."); paint_tool->status = _("Click to dodge");
paint_tool->status_line = _("Click to dodge the line."); paint_tool->status_line = _("Click to dodge the line");
paint_tool->status_ctrl = _("%s to burn"); paint_tool->status_ctrl = _("%s to burn");
break; break;
case GIMP_BURN: case GIMP_BURN:
paint_tool->status = _("Click to burn."); paint_tool->status = _("Click to burn");
paint_tool->status_line = _("Click to burn the line."); paint_tool->status_line = _("Click to burn the line");
paint_tool->status_ctrl = _("%s to dodge"); paint_tool->status_ctrl = _("%s to dodge");
break; break;
......
...@@ -94,8 +94,8 @@ gimp_eraser_tool_init (GimpEraserTool *eraser) ...@@ -94,8 +94,8 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
gimp_paint_tool_enable_color_picker (paint_tool, gimp_paint_tool_enable_color_picker (paint_tool,
GIMP_COLOR_PICK_MODE_BACKGROUND); GIMP_COLOR_PICK_MODE_BACKGROUND);
paint_tool->status = _("Click to erase."); paint_tool->status = _("Click to erase");
paint_tool->status_line = _("Click to erase the line."); paint_tool->status_line = _("Click to erase the line");
paint_tool->status_ctrl = _("%s to pick a background color"); paint_tool->status_ctrl = _("%s to pick a background color");
} }
......
...@@ -127,8 +127,8 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool) ...@@ -127,8 +127,8 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool)
paint_tool->pick_colors = FALSE; paint_tool->pick_colors = FALSE;
paint_tool->draw_line = FALSE; paint_tool->draw_line = FALSE;
paint_tool->status = _("Click to paint."); paint_tool->status = _("Click to paint");
paint_tool->status_line = _("Click to draw the line."); paint_tool->status_line = _("Click to draw the line");
paint_tool->status_ctrl = _("%s to pick a color"); paint_tool->status_ctrl = _("%s to pick a color");
paint_tool->core = NULL; paint_tool->core = NULL;
...@@ -479,13 +479,13 @@ gimp_paint_tool_modifier_key (GimpTool *tool, ...@@ -479,13 +479,13 @@ gimp_paint_tool_modifier_key (GimpTool *tool,
case GIMP_COLOR_PICK_MODE_FOREGROUND: case GIMP_COLOR_PICK_MODE_FOREGROUND:
gimp_tool_push_status (tool, display, gimp_tool_push_status (tool, display,
_("Click in any image to pick the " _("Click in any image to pick the "
"foreground color.")); "foreground color"));
break; break;
case GIMP_COLOR_PICK_MODE_BACKGROUND: case GIMP_COLOR_PICK_MODE_BACKGROUND:
gimp_tool_push_status (tool, display, gimp_tool_push_status (tool, display,
_("Click in any image to pick the " _("Click in any image to pick the "
"background color.")); "background color"));
break; break;
default: default:
...@@ -557,11 +557,11 @@ gimp_paint_tool_oper_update (GimpTool *tool, ...@@ -557,11 +557,11 @@ gimp_paint_tool_oper_update (GimpTool *tool,
* draw a line. * draw a line.
*/ */
gdouble dx, dy, dist; gchar status_str[STATUSBAR_SIZE];
gchar status_str[STATUSBAR_SIZE]; gchar *status_help;
gchar *status_help; gdouble dx, dy, dist;
gint off_x, off_y; gint off_x, off_y;
gboolean hard; gboolean hard;
core->cur_coords = *coords; core->cur_coords = *coords;
......
...@@ -647,7 +647,7 @@ gimp_perspective_clone_tool_oper_update (GimpTool *tool, ...@@ -647,7 +647,7 @@ gimp_perspective_clone_tool_oper_update (GimpTool *tool,
if (clone->src_drawable == NULL) if (clone->src_drawable == NULL)
{ {
gimp_tool_replace_status (tool, display, gimp_tool_replace_status (tool, display,
_("Ctrl-Click to set a clone source.")); _("Ctrl-Click to set a clone source"));
} }
else else
{ {
......
...@@ -161,7 +161,7 @@ gimp_region_select_tool_button_press (GimpTool *tool, ...@@ -161,7 +161,7 @@ gimp_region_select_tool_button_press (GimpTool *tool,
return; return;
gimp_tool_push_status (tool, display, gimp_tool_push_status (tool, display,
_("Move the mouse to change threshold.")); _("Move the mouse to change threshold"));
/* calculate the region boundary */ /* calculate the region boundary */
region_sel->segs = gimp_region_select_tool_calculate (region_sel, display, region_sel->segs = gimp_region_select_tool_calculate (region_sel, display,
......
...@@ -273,18 +273,20 @@ gimp_selection_tool_oper_update (GimpTool *tool, ...@@ -273,18 +273,20 @@ gimp_selection_tool_oper_update (GimpTool *tool,
if (! selection_empty) if (! selection_empty)
{ {
status = gimp_suggest_modifiers (_("Click-Drag to replace the " status = gimp_suggest_modifiers (_("Click-Drag to replace the "
"current selection."), "current selection"),
modifiers & ~state, modifiers & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
} }
else else
status = _("Click-Drag to create a new selection."); {
status = _("Click-Drag to create a new selection");
}
break; break;
case SELECTION_ADD: case SELECTION_ADD:
status = gimp_suggest_modifiers (_("Click-Drag to add to the " status = gimp_suggest_modifiers (_("Click-Drag to add to the "
"current selection."), "current selection"),
modifiers modifiers
& ~(state | GDK_SHIFT_MASK), & ~(state | GDK_SHIFT_MASK),
NULL, NULL, NULL); NULL, NULL, NULL);
...@@ -293,7 +295,7 @@ gimp_selection_tool_oper_update (GimpTool *tool, ...@@ -293,7 +295,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
case SELECTION_SUBTRACT: case SELECTION_SUBTRACT:
status = gimp_suggest_modifiers (_("Click-Drag to subtract from the " status = gimp_suggest_modifiers (_("Click-Drag to subtract from the "
"current selection."), "current selection"),
modifiers modifiers
& ~(state | GDK_CONTROL_MASK), & ~(state | GDK_CONTROL_MASK),
NULL, NULL, NULL); NULL, NULL, NULL);
...@@ -302,7 +304,7 @@ gimp_selection_tool_oper_update (GimpTool *tool, ...@@ -302,7 +304,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
case SELECTION_INTERSECT: case SELECTION_INTERSECT:
status = gimp_suggest_modifiers (_("Click-Drag to intersect with " status = gimp_suggest_modifiers (_("Click-Drag to intersect with "
"the current selection."), "the current selection"),
modifiers & ~state, modifiers & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
...@@ -310,22 +312,22 @@ gimp_selection_tool_oper_update (GimpTool *tool, ...@@ -310,22 +312,22 @@ gimp_selection_tool_oper_update (GimpTool *tool,
case SELECTION_MOVE_MASK: case SELECTION_MOVE_MASK:
status = gimp_suggest_modifiers (_("Click-Drag to move the " status = gimp_suggest_modifiers (_("Click-Drag to move the "
"selection mask."), "selection mask"),
modifiers & ~state, modifiers & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
break; break;
case SELECTION_MOVE: case SELECTION_MOVE:
status = _("Click-Drag to move the selected pixels."); status = _("Click-Drag to move the selected pixels");
break; break;
case SELECTION_MOVE_COPY: 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; break;
case SELECTION_ANCHOR: case SELECTION_ANCHOR:
status = _("Click to anchor the floating selection."); status = _("Click to anchor the floating selection");
break; break;
default: default:
......
...@@ -75,8 +75,8 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge) ...@@ -75,8 +75,8 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge)
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (smudge), gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (smudge),
GIMP_COLOR_PICK_MODE_FOREGROUND); GIMP_COLOR_PICK_MODE_FOREGROUND);
paint_tool->status = _("Click to smudge."); paint_tool->status = _("Click to smudge");
paint_tool->status_line = _("Click to smudge the line."); paint_tool->status_line = _("Click to smudge the line");
paint_tool->status_ctrl = NULL; /* don't suggest Ctrl even if it works */ paint_tool->status_ctrl = NULL; /* don't suggest Ctrl even if it works */
} }
......
...@@ -1141,29 +1141,29 @@ gimp_vector_tool_status_update (GimpTool *tool, ...@@ -1141,29 +1141,29 @@ gimp_vector_tool_status_update (GimpTool *tool,
switch (vector_tool->function) switch (vector_tool->function)
{ {
case VECTORS_SELECT_VECTOR: case VECTORS_SELECT_VECTOR:
status = _("Click to pick path to edit."); status = _("Click to pick path to edit");
break; break;
case VECTORS_CREATE_VECTOR: case VECTORS_CREATE_VECTOR:
status = _("Click to create a new path."); status = _("Click to create a new path");
break; break;
case VECTORS_CREATE_STROKE: 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; break;
case VECTORS_ADD_ANCHOR: 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, GDK_SHIFT_MASK & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
break; break;
case VECTORS_MOVE_ANCHOR: case VECTORS_MOVE_ANCHOR:
status = _("Click-Drag to move the anchor around."); status = _("Click-Drag to move the anchor around");
break; break;
case VECTORS_MOVE_ANCHORSET: case VECTORS_MOVE_ANCHORSET:
status = _("Click-Drag to move the anchors around."); status = _("Click-Drag to move the anchors around");
break; break;
case VECTORS_MOVE_HANDLE: case VECTORS_MOVE_HANDLE:
status = gimp_suggest_modifiers (_("Click-Drag to move the handle " status = gimp_suggest_modifiers (_("Click-Drag to move the handle "
"around."), "around"),
GDK_SHIFT_MASK & ~state, GDK_SHIFT_MASK & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
...@@ -1171,45 +1171,45 @@ gimp_vector_tool_status_update (GimpTool *tool, ...@@ -1171,45 +1171,45 @@ gimp_vector_tool_status_update (GimpTool *tool,
case VECTORS_MOVE_CURVE: case VECTORS_MOVE_CURVE:
if (GIMP_VECTOR_TOOL_GET_OPTIONS (tool)->polygonal) if (GIMP_VECTOR_TOOL_GET_OPTIONS (tool)->polygonal)
status = gimp_suggest_modifiers (_("Click-Drag to move the " status = gimp_suggest_modifiers (_("Click-Drag to move the "
"anchors around."), "anchors around"),
GDK_SHIFT_MASK & ~state, GDK_SHIFT_MASK & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
else else
status = gimp_suggest_modifiers (_("Click-Drag to change the " status = gimp_suggest_modifiers (_("Click-Drag to change the "
"shape of the curve."), "shape of the curve"),
GDK_SHIFT_MASK & ~state, GDK_SHIFT_MASK & ~state,
_("%s: symmetrical"), NULL, NULL); _("%s: symmetrical"), NULL, NULL);
free_status = TRUE; free_status = TRUE;
break; break;
case VECTORS_MOVE_STROKE: case VECTORS_MOVE_STROKE:
status = gimp_suggest_modifiers (_("Click-Drag to move the " status = gimp_suggest_modifiers (_("Click-Drag to move the "
"component around."), "component around"),
GDK_SHIFT_MASK & ~state, GDK_SHIFT_MASK & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
break; break;
case VECTORS_MOVE_VECTORS: case VECTORS_MOVE_VECTORS:
status = _("Click-Drag to move the path around."); status = _("Click-Drag to move the path around");
break; break;
case VECTORS_INSERT_ANCHOR: case VECTORS_INSERT_ANCHOR:
status = gimp_suggest_modifiers (_("Click-Drag to insert an anchor " status = gimp_suggest_modifiers (_("Click-Drag to insert an anchor "
"on the path."), "on the path"),
GDK_SHIFT_MASK & ~state, GDK_SHIFT_MASK & ~state,
NULL, NULL, NULL); NULL, NULL, NULL);
free_status = TRUE; free_status = TRUE;
break; break;
case VECTORS_DELETE_ANCHOR: case VECTORS_DELETE_ANCHOR:
status = _("Click to delete this anchor."); status = _("Click to delete this anchor");
break; break;
case VECTORS_CONNECT_STROKES: case VECTORS_CONNECT_STROKES:
status = _("Click to connect this anchor " status = _("Click to connect this anchor "
"with the selected endpoint."); "with the selected endpoint");
break; break;
case VECTORS_DELETE_SEGMENT: case VECTORS_DELETE_SEGMENT:
status = _("Click to open up the path."); status = _("Click to open up the path");
break; break;
case VECTORS_CONVERT_EDGE: case VECTORS_CONVERT_EDGE:
status = _("Click to make this node angular."); status = _("Click to make this node angular");
break; break;
case VECTORS_FINISHED: case VECTORS_FINISHED:
status = NULL; status = NULL;
......
...@@ -600,50 +600,78 @@ gimp_suggest_modifiers (const gchar *message, ...@@ -600,50 +600,78 @@ gimp_suggest_modifiers (const gchar *message,
const gchar *control_format, const gchar *control_format,
const gchar *alt_format) const gchar *alt_format)
{ {
gchar msg_buf[3][BUF_SIZE]; gchar msg_buf[3][BUF_SIZE];
gint num_msgs = 0; gint num_msgs = 0;
gboolean try = FALSE;
if (modifiers & GDK_SHIFT_MASK) if (modifiers & GDK_SHIFT_MASK)
{ {
if (shift_format && *shift_format) 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 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++; num_msgs++;
} }
if (modifiers & GDK_CONTROL_MASK) if (modifiers & GDK_CONTROL_MASK)
{ {
if (control_format && *control_format) 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 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++; num_msgs++;
} }
if (modifiers & GDK_MOD1_MASK) if (modifiers & GDK_MOD1_MASK)
{ {
if (alt_format && *alt_format) 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 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++; num_msgs++;
} }
/* This convoluted way to build the message using multiple format strings /* This convoluted way to build the message using multiple format strings
* tries to make the messages easier to translate to other languages. * tries to make the messages easier to translate to other languages.
*/ */
if (num_msgs == 1)
return g_strdup_printf (_("%s (try %s)"), message, switch (num_msgs)
msg_buf[0]); {
else if (num_msgs == 2) case 1:
return g_strdup_printf (_("%s (try %s, %s)"), message, return g_strdup_printf (try ? _("%s (try %s)") : _("%s (%s)"),
msg_buf[0], msg_buf[1]); message, msg_buf[0]);
else if (num_msgs == 3)
return g_strdup_printf (_("%s (try %s, %s, %s)"), message, case 2:
msg_buf[0], msg_buf[1], msg_buf[2]); return g_strdup_printf (_("%s (try %s, %s)"),
else message, msg_buf[0], msg_buf[1]);
return g_strdup (message);
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 #undef BUF_SIZE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment