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>
* configure.in: Added 'dz' (Dzongkha) to ALL_LINGUAS
......
......@@ -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");
}
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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");
}
......
......@@ -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;
......
......@@ -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
{
......
......@@ -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,
......
......@@ -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:
......
......@@ -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 */
}
......
......@@ -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;
......
......@@ -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
......
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