Commit 720518b3 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

Removed the definitions of the tearoff menu items and build them on the

1999-11-25  Michael Natterer  <mitch@gimp.org>

	* app/menus.c: Removed the definitions of the tearoff menu items
	and build them on the fly. Added N_()-marked submenus instead so
	they get properly translated. Removed N_() from all separators.

	Hacked menu_translate(): Don't try to translate separators,
	tearoffs and the /File/MRUxx entries. Avoid multiple lookups in
	the "gimp-std-plugins" domain. Translating plug-in menu entries is
	still broken.

	Defined all filter categories for proper translation and a first
	try to order them and to add separators (please comment...).

	New Category /Filters/Web.

	(Did 'make update-po' in the po* directories and updated the
	german translations.)

	* app/about_dialog.c
	* app/brush_select.c
	* app/drawable.c
	* app/errors.c
	* app/free_select.c
	* app/gradient.c
	* app/info_dialog.c
	* app/plug_in.c
	* app/tool_options.c: minor i18n updates like removing _() from
	some error messages.

	* app/context_manager.c: a private context for the Xinput Airbrush.

	* plug-ins/common/video.c: Register under /Filters/Distorts

	* plug-ins/imagemap/imap_main.c: Register under /Filters/Web
	(Marc, what about putting "prepare for gif" and "webify" there?)

	* plug-ins/perl/po/de.po: s/Xtn/Xtns/g
parent e4d411f8
1999-11-25 Michael Natterer <mitch@gimp.org>
* app/menus.c: Removed the definitions of the tearoff menu items
and build them on the fly. Added N_()-marked submenus instead so
they get properly translated. Removed N_() from all separators.
Hacked menu_translate(): Don't try to translate separators,
tearoffs and the /File/MRUxx entries. Avoid multiple lookups in
the "gimp-std-plugins" domain. Translating plug-in menu entries is
still broken.
Defined all filter categories for proper translation and a first
try to order them and to add separators (please comment...).
New Category /Filters/Web.
(Did 'make update-po' in the po* directories and updated the
german translations.)
* app/about_dialog.c
* app/brush_select.c
* app/drawable.c
* app/errors.c
* app/free_select.c
* app/gradient.c
* app/info_dialog.c
* app/plug_in.c
* app/tool_options.c: minor i18n updates like removing _() from
some error messages.
* app/context_manager.c: a private context for the Xinput Airbrush.
* plug-ins/common/video.c: Register under /Filters/Distorts
* plug-ins/imagemap/imap_main.c: Register under /Filters/Web
(Marc, what about putting "prepare for gif" and "webify" there?)
* plug-ins/perl/po/de.po: s/Xtn/Xtns/g
Thu Nov 25 02:56:01 MET 1999 Sven Neumann <sven@gimp.org>
* app/blend.c
......
......@@ -231,8 +231,8 @@ about_dialog_create (gint timeout)
gtk_widget_push_style (style);
gtk_style_unref (style);
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION,
_(" brought to you by"));
label_text = g_strdup_printf (_("Version %s brought to you by"),
GIMP_VERSION);
label = gtk_label_new (label_text);
g_free(label_text);
label_text=NULL;
......
......@@ -642,23 +642,20 @@ plug_in_def_add (PlugInDef *plug_in_def)
* of one of these things, but Nick Lamb's alien/unknown format
* loader needs to be able to register no extensions, prefixes or
* magics. -- austin 13/Feb/99 */
tmp = plug_in_def->proc_defs;
while (tmp)
{
proc_def = tmp->data;
if (!proc_def->extensions && !proc_def->prefixes && !proc_def->magics &&
proc_def->menu_path &&
(!strncmp (proc_def->menu_path, "<Load>", 6) ||
!strncmp (proc_def->menu_path, "<Save>", 6)))
for (tmp = plug_in_def->proc_defs; tmp; tmp = g_slist_next (tmp))
{
proc_def->extensions = g_strdup("");
}
tmp = tmp->next;
}
proc_def = tmp->data;
if (!proc_def->extensions && !proc_def->prefixes && !proc_def->magics &&
proc_def->menu_path &&
(!strncmp (proc_def->menu_path, "<Load>", 6) ||
!strncmp (proc_def->menu_path, "<Save>", 6)))
{
proc_def->extensions = g_strdup("");
}
}
tmp = plug_in_defs;
while (tmp)
for (tmp = plug_in_defs; tmp; tmp = g_slist_next (tmp))
{
tplug_in_def = tmp->data;
......@@ -685,8 +682,6 @@ plug_in_def_add (PlugInDef *plug_in_def)
}
return;
}
tmp = tmp->next;
}
write_pluginrc = TRUE;
......@@ -695,35 +690,29 @@ plug_in_def_add (PlugInDef *plug_in_def)
g_free (plug_in_def);
}
char*
plug_in_menu_path (char *name)
gchar *
plug_in_menu_path (gchar *name)
{
PlugInDef *plug_in_def;
PlugInProcDef *proc_def;
GSList *tmp, *tmp2;
tmp = plug_in_defs;
while (tmp)
for (tmp = plug_in_defs; tmp; tmp = g_slist_next (tmp))
{
plug_in_def = tmp->data;
tmp = tmp->next;
tmp2 = plug_in_def->proc_defs;
while (tmp2)
for (tmp2 = plug_in_def->proc_defs; tmp2; tmp2 = g_slist_next (tmp2))
{
proc_def = tmp2->data;
tmp2 = tmp2->next;
if (strcmp (proc_def->db_info.name, name) == 0)
return proc_def->menu_path;
}
}
tmp = proc_defs;
while (tmp)
for (tmp = proc_defs; tmp; tmp = g_slist_next (tmp))
{
proc_def = tmp->data;
tmp = tmp->next;
if (strcmp (proc_def->db_info.name, name) == 0)
return proc_def->menu_path;
......@@ -733,10 +722,10 @@ plug_in_menu_path (char *name)
}
PlugIn*
plug_in_new (char *name)
plug_in_new (gchar *name)
{
PlugIn *plug_in;
char *path;
gchar *path;
if (!g_path_is_absolute (name))
{
......@@ -813,7 +802,7 @@ plug_in_destroy (PlugIn *plug_in)
}
}
int
gint
plug_in_open (PlugIn *plug_in)
{
int my_read[2];
......@@ -950,17 +939,17 @@ plug_in_open (PlugIn *plug_in)
}
plug_in->open = TRUE;
return 1;
return TRUE;
}
return 0;
return FALSE;
}
void
plug_in_close (PlugIn *plug_in,
int kill_it)
gint kill_it)
{
int status;
gint status;
#ifndef G_OS_WIN32
struct timeval tv;
#endif
......@@ -1244,13 +1233,11 @@ plug_in_set_menu_sensitivity (GimpImageType type)
{
PlugInProcDef *proc_def;
GSList *tmp;
int sensitive = FALSE;
gboolean sensitive = FALSE;
tmp = proc_defs;
while (tmp)
for (tmp = proc_defs; tmp; tmp = g_slist_next (tmp))
{
proc_def = tmp->data;
tmp = tmp->next;
if (proc_def->image_types_val && proc_def->menu_path)
{
......@@ -1280,6 +1267,7 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
menus_set_sensitive (proc_def->menu_path, sensitive);
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
menus_set_sensitive ("<Image>/Filters/Repeat last", sensitive);
......@@ -2478,7 +2466,7 @@ plug_in_proc_def_remove (PlugInProcDef *proc_def)
{
/* Destroy the menu item */
if (proc_def->menu_path)
menus_destroy (gettext(proc_def->menu_path));
menus_destroy (proc_def->menu_path);
/* Unregister the procedural database entry */
procedural_db_unregister (proc_def->db_info.name);
......
......@@ -404,7 +404,7 @@ brush_select_new (gchar *title,
bsp->brush_name = gtk_label_new (_("No Brushes available"));
gtk_box_pack_start (GTK_BOX (util_box), bsp->brush_name, FALSE, FALSE, 4);
bsp->brush_size = gtk_label_new (_("(0 X 0)"));
bsp->brush_size = gtk_label_new ("(0 x 0)");
gtk_box_pack_start (GTK_BOX (util_box), bsp->brush_size, FALSE, FALSE, 2);
gtk_widget_show (bsp->brush_name);
......@@ -1420,7 +1420,7 @@ update_active_brush_field (BrushSelect *bsp)
gtk_label_set_text (GTK_LABEL (bsp->brush_name), brush->name);
/* Set brush size */
g_snprintf (buf, sizeof (buf), _("(%d X %d)"),
g_snprintf (buf, sizeof (buf), "(%d x %d)",
brush->mask->width, brush->mask->height);
gtk_label_set_text (GTK_LABEL (bsp->brush_size), buf);
......
......@@ -159,6 +159,7 @@ context_manager_init (void)
case INK:
case DODGEBURN:
case SMUDGE:
case XINPUT_AIRBRUSH:
tool_info[i].tool_context =
gimp_context_new (tool_info[i].private_tip, global_tool_context);
break;
......@@ -170,11 +171,16 @@ context_manager_init (void)
}
if (! global_paint_options &&
active_tool && tool_info[active_tool->type].tool_context)
gimp_context_set_parent (tool_info[active_tool->type].tool_context,
user_context);
active_tool &&
tool_info[active_tool->type].tool_context)
{
gimp_context_set_parent (tool_info[active_tool->type].tool_context,
user_context);
}
else if (global_paint_options)
gimp_context_set_parent (global_tool_context, user_context);
{
gimp_context_set_parent (global_tool_context, user_context);
}
}
void
......
......@@ -245,7 +245,7 @@ selection_options_init (SelectionOptions *options,
_("Intelligent Scissors Options") :
((tool_type == BY_COLOR_SELECT) ?
_("By-Color Select Options") :
_("ERROR: Unknown Selection Type")))))))),
"ERROR: Unknown Selection Type"))))))),
reset_func);
/* the main vbox */
......@@ -558,7 +558,7 @@ paint_options_init (PaintOptions *options,
_("Smudge Options") :
((tool_type == XINPUT_AIRBRUSH) ?
_("Xinput Airbrush Options") :
_("ERROR: Unknown Paint Type"))))))))))))),
"ERROR: Unknown Paint Type")))))))))))),
reset_func);
/* initialize the paint options structure */
......
......@@ -231,8 +231,8 @@ about_dialog_create (gint timeout)
gtk_widget_push_style (style);
gtk_style_unref (style);
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION,
_(" brought to you by"));
label_text = g_strdup_printf (_("Version %s brought to you by"),
GIMP_VERSION);
label = gtk_label_new (label_text);
g_free(label_text);
label_text=NULL;
......
......@@ -122,7 +122,7 @@ update_field (InfoField *field)
break;
default:
g_warning (_("Unknown info_dialog field type."));
g_warning ("Unknown info_dialog field type.");
break;
}
......
......@@ -65,7 +65,7 @@ drawable_fill (GimpDrawable *drawable,
return;
default:
g_warning (_("drawable_fill called with unknown fill type"));
g_warning ("unknown fill type");
a = r = g = b = 0;
break;
}
......
......@@ -77,7 +77,7 @@ gimp_fatal_error (gchar *fmt, ...)
va_list args;
va_start (args, fmt);
printf (_("%s: fatal error: %s\n"), prog_name, g_strdup_vprintf (fmt, args));
g_print ("%s: fatal error: %s\n", prog_name, g_strdup_vprintf (fmt, args));
va_end (args);
g_on_error_query (prog_name);
#else
......@@ -103,9 +103,9 @@ gimp_terminate (gchar *fmt, ...)
va_list args;
va_start (args, fmt);
printf ("%s terminated: ", prog_name);
g_print ("%s terminated: ", prog_name);
vprintf (fmt, args);
printf ("\n");
g_print ("\n");
va_end (args);
if (use_debug_handler)
......
......@@ -70,7 +70,7 @@ add_point (int num_pts,
global_pts = (GdkPoint *) g_realloc ((void *) global_pts, sizeof (GdkPoint) * max_segs);
if (!global_pts)
gimp_fatal_error (_("add_point(): Unable to reallocate points array in free_select."));
gimp_fatal_error ("add_point(): Unable to reallocate points array in free_select.");
}
global_pts[num_pts].x = x;
......
......@@ -773,7 +773,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown gradient type %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown gradient type %d",
(int) seg->type);
break;
}
......@@ -830,7 +830,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown coloring mode %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown coloring mode %d",
(int) seg->color);
break;
}
......@@ -1658,8 +1658,7 @@ ed_do_new_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_new_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1725,8 +1724,7 @@ ed_do_copy_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_copy_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1812,8 +1810,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_rename_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1827,8 +1824,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!grad || !grad_list)
{
g_message (_("ed_do_rename_gradient_callback(): "
"oops, can't find gradient to rename"));
g_warning ("can't find gradient to rename");
return;
}
......@@ -1929,8 +1925,7 @@ ed_do_delete_gradient_callback (GtkWidget *widget,
}
if (tmp == NULL)
gimp_fatal_error (_("ed_do_delete_gradient_callback(): "
"Could not find gradient to delete!"));
gimp_fatal_error ("Could not find gradient to delete!");
/* Delete gradient from gradients list */
gradients_list = g_slist_remove (gradients_list, curr_gradient);
......@@ -2010,8 +2005,7 @@ ed_do_save_pov_callback (GtkWidget *widget,
file = fopen (filename, "wb");
if (!file)
g_message (_("ed_do_save_pov_callback(): oops, could not open \"%s\""),
filename);
g_message (_("Could not open \"%s\""), filename);
else
{
fprintf (file, "/* color_map file created by the GIMP */\n");
......@@ -2745,8 +2739,8 @@ control_do_hint (gint x,
break;
default:
g_message ("control_do_hint: oops, in_handle is true "
"yet we got handle type %d", (int) handle);
g_warning ("in_handle is true yet we got handle type %d",
(int) handle);
break;
}
}
......@@ -2883,8 +2877,8 @@ control_button_press (gint x,
return;
default:
g_message ("control_button_press(): oops, in_handle is true "
"yet we got handle type %d", (int) handle);
g_warning ("in_handle is true yet we got handle type %d",
(int) handle);
return;
}
}
......@@ -2933,8 +2927,7 @@ control_point_in_handle (gint x,
break;
default:
g_message ("control_point_in_handle(): oops, can not handle drag mode %d",
(int) handle);
g_warning ("can not handle drag mode %d", (int) handle);
return FALSE;
}
......@@ -3028,7 +3021,7 @@ control_motion (gint x)
break;
default:
gimp_fatal_error (_("control_motion(): Attempt to move bogus handle %d"),
gimp_fatal_error ("Attempt to move bogus handle %d",
(int) g_editor->control_drag_mode);
break;
}
......
......@@ -773,7 +773,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown gradient type %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown gradient type %d",
(int) seg->type);
break;
}
......@@ -830,7 +830,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown coloring mode %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown coloring mode %d",
(int) seg->color);
break;
}
......@@ -1658,8 +1658,7 @@ ed_do_new_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_new_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1725,8 +1724,7 @@ ed_do_copy_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_copy_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1812,8 +1810,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!gradient_name)
{
g_message (_("ed_do_rename_gradient_callback(): "
"oops, received NULL in call_data"));
g_warning ("received NULL in call_data");
return;
}
......@@ -1827,8 +1824,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!grad || !grad_list)
{
g_message (_("ed_do_rename_gradient_callback(): "
"oops, can't find gradient to rename"));
g_warning ("can't find gradient to rename");
return;
}
......@@ -1929,8 +1925,7 @@ ed_do_delete_gradient_callback (GtkWidget *widget,
}
if (tmp == NULL)
gimp_fatal_error (_("ed_do_delete_gradient_callback(): "
"Could not find gradient to delete!"));
gimp_fatal_error ("Could not find gradient to delete!");
/* Delete gradient from gradients list */
gradients_list = g_slist_remove (gradients_list, curr_gradient);
......@@ -2010,8 +2005,7 @@ ed_do_save_pov_callback (GtkWidget *widget,
file = fopen (filename, "wb");
if (!file)
g_message (_("ed_do_save_pov_callback(): oops, could not open \"%s\""),
filename);
g_message (_("Could not open \"%s\""), filename);
else
{
fprintf (file, "/* color_map file created by the GIMP */\n");
......@@ -2745,8 +2739,8 @@ control_do_hint (gint x,
break;
default:
g_message ("control_do_hint: oops, in_handle is true "
"yet we got handle type %d", (int) handle);
g_warning ("in_handle is true yet we got handle type %d",
(int) handle);
break;
}
}
......@@ -2883,8 +2877,8 @@ control_button_press (gint x,
return;
default:
g_message ("control_button_press(): oops, in_handle is true "
"yet we got handle type %d", (int) handle);
g_warning ("in_handle is true yet we got handle type %d",
(int) handle);
return;
}
}
......@@ -2933,8 +2927,7 @@ control_point_in_handle (gint x,
break;
default:
g_message ("control_point_in_handle(): oops, can not handle drag mode %d",
(int) handle);
g_warning ("can not handle drag mode %d", (int) handle);
return FALSE;
}
......@@ -3028,7 +3021,7 @@ control_motion (gint x)
break;
default:
gimp_fatal_error (_("control_motion(): Attempt to move bogus handle %d"),
gimp_fatal_error ("Attempt to move bogus handle %d",
(int) g_editor->control_drag_mode);
break;
}
......
......@@ -231,8 +231,8 @@ about_dialog_create (gint timeout)
gtk_widget_push_style (style);
gtk_style_unref (style);
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION,
_(" brought to you by"));
label_text = g_strdup_printf (_("Version %s brought to you by"),
GIMP_VERSION);
label = gtk_label_new (label_text);
g_free(label_text);
label_text=NULL;
......
......@@ -404,7 +404,7 @@ brush_select_new (gchar *title,
bsp->brush_name = gtk_label_new (_("No Brushes available"));
gtk_box_pack_start (GTK_BOX (util_box), bsp->brush_name, FALSE, FALSE, 4);
bsp->brush_size = gtk_label_new (_("(0 X 0)"));
bsp->brush_size = gtk_label_new ("(0 x 0)");
gtk_box_pack_start (GTK_BOX (util_box), bsp->brush_size, FALSE, FALSE, 2);
gtk_widget_show (bsp->brush_name);
......@@ -1420,7 +1420,7 @@ update_active_brush_field (BrushSelect *bsp)
gtk_label_set_text (GTK_LABEL (bsp->brush_name), brush->name);
/* Set brush size */
g_snprintf (buf, sizeof (buf), _("(%d X %d)"),
g_snprintf (buf, sizeof (buf), "(%d x %d)",
brush->mask->width, brush->mask->height);
gtk_label_set_text (GTK_LABEL (bsp->brush_size), buf);
......
......@@ -773,7 +773,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown gradient type %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown gradient type %d",
(int) seg->type);
break;
}
......@@ -830,7 +830,7 @@ gradient_get_color_at (gradient_t *gradient,
default:
grad_dump_gradient (gradient, stderr);
gimp_fatal_error (_("gradient_get_color_at(): Unknown coloring mode %d"),
gimp_fatal_error ("gradient_get_color_at(): Unknown coloring mode %d",
(int) seg->color);