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> Thu Nov 25 02:56:01 MET 1999 Sven Neumann <sven@gimp.org>
* app/blend.c * app/blend.c
......
...@@ -231,8 +231,8 @@ about_dialog_create (gint timeout) ...@@ -231,8 +231,8 @@ about_dialog_create (gint timeout)
gtk_widget_push_style (style); gtk_widget_push_style (style);
gtk_style_unref (style); gtk_style_unref (style);
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION, label_text = g_strdup_printf (_("Version %s brought to you by"),
_(" brought to you by")); GIMP_VERSION);
label = gtk_label_new (label_text); label = gtk_label_new (label_text);
g_free(label_text); g_free(label_text);
label_text=NULL; label_text=NULL;
......
...@@ -642,23 +642,20 @@ plug_in_def_add (PlugInDef *plug_in_def) ...@@ -642,23 +642,20 @@ plug_in_def_add (PlugInDef *plug_in_def)
* of one of these things, but Nick Lamb's alien/unknown format * of one of these things, but Nick Lamb's alien/unknown format
* loader needs to be able to register no extensions, prefixes or * loader needs to be able to register no extensions, prefixes or
* magics. -- austin 13/Feb/99 */ * magics. -- austin 13/Feb/99 */
tmp = plug_in_def->proc_defs; for (tmp = plug_in_def->proc_defs; tmp; tmp = g_slist_next (tmp))
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)))
{ {
proc_def->extensions = g_strdup(""); proc_def = tmp->data;
}
tmp = tmp->next;
}
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; for (tmp = plug_in_defs; tmp; tmp = g_slist_next (tmp))
while (tmp)
{ {
tplug_in_def = tmp->data; tplug_in_def = tmp->data;
...@@ -685,8 +682,6 @@ plug_in_def_add (PlugInDef *plug_in_def) ...@@ -685,8 +682,6 @@ plug_in_def_add (PlugInDef *plug_in_def)
} }
return; return;
} }
tmp = tmp->next;
} }
write_pluginrc = TRUE; write_pluginrc = TRUE;
...@@ -695,35 +690,29 @@ plug_in_def_add (PlugInDef *plug_in_def) ...@@ -695,35 +690,29 @@ plug_in_def_add (PlugInDef *plug_in_def)
g_free (plug_in_def); g_free (plug_in_def);
} }
char* gchar *
plug_in_menu_path (char *name) plug_in_menu_path (gchar *name)
{ {
PlugInDef *plug_in_def; PlugInDef *plug_in_def;
PlugInProcDef *proc_def; PlugInProcDef *proc_def;
GSList *tmp, *tmp2; GSList *tmp, *tmp2;
tmp = plug_in_defs; for (tmp = plug_in_defs; tmp; tmp = g_slist_next (tmp))
while (tmp)
{ {
plug_in_def = tmp->data; plug_in_def = tmp->data;
tmp = tmp->next;
tmp2 = plug_in_def->proc_defs; for (tmp2 = plug_in_def->proc_defs; tmp2; tmp2 = g_slist_next (tmp2))
while (tmp2)
{ {
proc_def = tmp2->data; proc_def = tmp2->data;
tmp2 = tmp2->next;
if (strcmp (proc_def->db_info.name, name) == 0) if (strcmp (proc_def->db_info.name, name) == 0)
return proc_def->menu_path; return proc_def->menu_path;
} }
} }
tmp = proc_defs; for (tmp = proc_defs; tmp; tmp = g_slist_next (tmp))
while (tmp)
{ {
proc_def = tmp->data; proc_def = tmp->data;
tmp = tmp->next;
if (strcmp (proc_def->db_info.name, name) == 0) if (strcmp (proc_def->db_info.name, name) == 0)
return proc_def->menu_path; return proc_def->menu_path;
...@@ -733,10 +722,10 @@ plug_in_menu_path (char *name) ...@@ -733,10 +722,10 @@ plug_in_menu_path (char *name)
} }
PlugIn* PlugIn*
plug_in_new (char *name) plug_in_new (gchar *name)
{ {
PlugIn *plug_in; PlugIn *plug_in;
char *path; gchar *path;
if (!g_path_is_absolute (name)) if (!g_path_is_absolute (name))
{ {
...@@ -813,7 +802,7 @@ plug_in_destroy (PlugIn *plug_in) ...@@ -813,7 +802,7 @@ plug_in_destroy (PlugIn *plug_in)
} }
} }
int gint
plug_in_open (PlugIn *plug_in) plug_in_open (PlugIn *plug_in)
{ {
int my_read[2]; int my_read[2];
...@@ -950,17 +939,17 @@ plug_in_open (PlugIn *plug_in) ...@@ -950,17 +939,17 @@ plug_in_open (PlugIn *plug_in)
} }
plug_in->open = TRUE; plug_in->open = TRUE;
return 1; return TRUE;
} }
return 0; return FALSE;
} }
void void
plug_in_close (PlugIn *plug_in, plug_in_close (PlugIn *plug_in,
int kill_it) gint kill_it)
{ {
int status; gint status;
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
struct timeval tv; struct timeval tv;
#endif #endif
...@@ -1244,13 +1233,11 @@ plug_in_set_menu_sensitivity (GimpImageType type) ...@@ -1244,13 +1233,11 @@ plug_in_set_menu_sensitivity (GimpImageType type)
{ {
PlugInProcDef *proc_def; PlugInProcDef *proc_def;
GSList *tmp; GSList *tmp;
int sensitive = FALSE; gboolean sensitive = FALSE;
tmp = proc_defs; for (tmp = proc_defs; tmp; tmp = g_slist_next (tmp))
while (tmp)
{ {
proc_def = tmp->data; proc_def = tmp->data;
tmp = tmp->next;
if (proc_def->image_types_val && proc_def->menu_path) if (proc_def->image_types_val && proc_def->menu_path)
{ {
...@@ -1280,6 +1267,7 @@ plug_in_set_menu_sensitivity (GimpImageType type) ...@@ -1280,6 +1267,7 @@ plug_in_set_menu_sensitivity (GimpImageType type)
} }
menus_set_sensitive (proc_def->menu_path, sensitive); menus_set_sensitive (proc_def->menu_path, sensitive);
if (last_plug_in && (last_plug_in == &(proc_def->db_info))) if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{ {
menus_set_sensitive ("<Image>/Filters/Repeat last", sensitive); menus_set_sensitive ("<Image>/Filters/Repeat last", sensitive);
...@@ -2478,7 +2466,7 @@ plug_in_proc_def_remove (PlugInProcDef *proc_def) ...@@ -2478,7 +2466,7 @@ plug_in_proc_def_remove (PlugInProcDef *proc_def)
{ {
/* Destroy the menu item */ /* Destroy the menu item */
if (proc_def->menu_path) if (proc_def->menu_path)
menus_destroy (gettext(proc_def->menu_path)); menus_destroy (proc_def->menu_path);
/* Unregister the procedural database entry */ /* Unregister the procedural database entry */
procedural_db_unregister (proc_def->db_info.name); procedural_db_unregister (proc_def->db_info.name);
......
...@@ -404,7 +404,7 @@ brush_select_new (gchar *title, ...@@ -404,7 +404,7 @@ brush_select_new (gchar *title,
bsp->brush_name = gtk_label_new (_("No Brushes available")); bsp->brush_name = gtk_label_new (_("No Brushes available"));
gtk_box_pack_start (GTK_BOX (util_box), bsp->brush_name, FALSE, FALSE, 4); 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_box_pack_start (GTK_BOX (util_box), bsp->brush_size, FALSE, FALSE, 2);
gtk_widget_show (bsp->brush_name); gtk_widget_show (bsp->brush_name);
...@@ -1420,7 +1420,7 @@ update_active_brush_field (BrushSelect *bsp) ...@@ -1420,7 +1420,7 @@ update_active_brush_field (BrushSelect *bsp)
gtk_label_set_text (GTK_LABEL (bsp->brush_name), brush->name); gtk_label_set_text (GTK_LABEL (bsp->brush_name), brush->name);
/* Set brush size */ /* 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); brush->mask->width, brush->mask->height);
gtk_label_set_text (GTK_LABEL (bsp->brush_size), buf); gtk_label_set_text (GTK_LABEL (bsp->brush_size), buf);
......
...@@ -159,6 +159,7 @@ context_manager_init (void) ...@@ -159,6 +159,7 @@ context_manager_init (void)
case INK: case INK:
case DODGEBURN: case DODGEBURN:
case SMUDGE: case SMUDGE:
case XINPUT_AIRBRUSH:
tool_info[i].tool_context = tool_info[i].tool_context =
gimp_context_new (tool_info[i].private_tip, global_tool_context); gimp_context_new (tool_info[i].private_tip, global_tool_context);
break; break;
...@@ -170,11 +171,16 @@ context_manager_init (void) ...@@ -170,11 +171,16 @@ context_manager_init (void)
} }
if (! global_paint_options && if (! global_paint_options &&
active_tool && tool_info[active_tool->type].tool_context) active_tool &&
gimp_context_set_parent (tool_info[active_tool->type].tool_context, tool_info[active_tool->type].tool_context)
user_context); {
gimp_context_set_parent (tool_info[active_tool->type].tool_context,
user_context);
}
else if (global_paint_options) else if (global_paint_options)
gimp_context_set_parent (global_tool_context, user_context); {
gimp_context_set_parent (global_tool_context, user_context);
}
} }
void void
......
...@@ -245,7 +245,7 @@ selection_options_init (SelectionOptions *options, ...@@ -245,7 +245,7 @@ selection_options_init (SelectionOptions *options,
_("Intelligent Scissors Options") : _("Intelligent Scissors Options") :
((tool_type == BY_COLOR_SELECT) ? ((tool_type == BY_COLOR_SELECT) ?
_("By-Color Select Options") : _("By-Color Select Options") :
_("ERROR: Unknown Selection Type")))))))), "ERROR: Unknown Selection Type"))))))),
reset_func); reset_func);
/* the main vbox */ /* the main vbox */
...@@ -558,7 +558,7 @@ paint_options_init (PaintOptions *options, ...@@ -558,7 +558,7 @@ paint_options_init (PaintOptions *options,
_("Smudge Options") : _("Smudge Options") :
((tool_type == XINPUT_AIRBRUSH) ? ((tool_type == XINPUT_AIRBRUSH) ?
_("Xinput Airbrush Options") : _("Xinput Airbrush Options") :
_("ERROR: Unknown Paint Type"))))))))))))), "ERROR: Unknown Paint Type")))))))))))),
reset_func); reset_func);
/* initialize the paint options structure */ /* initialize the paint options structure */
......
...@@ -231,8 +231,8 @@ about_dialog_create (gint timeout) ...@@ -231,8 +231,8 @@ about_dialog_create (gint timeout)
gtk_widget_push_style (style); gtk_widget_push_style (style);
gtk_style_unref (style); gtk_style_unref (style);
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION, label_text = g_strdup_printf (_("Version %s brought to you by"),
_(" brought to you by")); GIMP_VERSION);
label = gtk_label_new (label_text); label = gtk_label_new (label_text);
g_free(label_text); g_free(label_text);
label_text=NULL; label_text=NULL;
......
...@@ -122,7 +122,7 @@ update_field (InfoField *field) ...@@ -122,7 +122,7 @@ update_field (InfoField *field)
break; break;
default: default:
g_warning (_("Unknown info_dialog field type.")); g_warning ("Unknown info_dialog field type.");
break; break;
} }
......
...@@ -65,7 +65,7 @@ drawable_fill (GimpDrawable *drawable, ...@@ -65,7 +65,7 @@ drawable_fill (GimpDrawable *drawable,
return; return;
default: default:
g_warning (_("drawable_fill called with unknown fill type")); g_warning ("unknown fill type");
a = r = g = b = 0; a = r = g = b = 0;
break; break;
} }
......
...@@ -77,7 +77,7 @@ gimp_fatal_error (gchar *fmt, ...) ...@@ -77,7 +77,7 @@ gimp_fatal_error (gchar *fmt, ...)
va_list args; va_list args;
va_start (args, fmt); 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); va_end (args);
g_on_error_query (prog_name); g_on_error_query (prog_name);
#else #else
...@@ -103,9 +103,9 @@ gimp_terminate (gchar *fmt, ...) ...@@ -103,9 +103,9 @@ gimp_terminate (gchar *fmt, ...)
va_list args; va_list args;
va_start (args, fmt); va_start (args, fmt);
printf ("%s terminated: ", prog_name); g_print ("%s terminated: ", prog_name);
vprintf (fmt, args); vprintf (fmt, args);
printf ("\n"); g_print ("\n");
va_end (args); va_end (args);
if (use_debug_handler) if (use_debug_handler)
......
...@@ -70,7 +70,7 @@ add_point (int num_pts, ...@@ -70,7 +70,7 @@ add_point (int num_pts,
global_pts = (GdkPoint *) g_realloc ((void *) global_pts, sizeof (GdkPoint) * max_segs); global_pts = (GdkPoint *) g_realloc ((void *) global_pts, sizeof (GdkPoint) * max_segs);
if (!global_pts) 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; global_pts[num_pts].x = x;
......
...@@ -773,7 +773,7 @@ gradient_get_color_at (gradient_t *gradient, ...@@ -773,7 +773,7 @@ gradient_get_color_at (gradient_t *gradient,
default: default:
grad_dump_gradient (gradient, stderr); 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); (int) seg->type);
break; break;
} }
...@@ -830,7 +830,7 @@ gradient_get_color_at (gradient_t *gradient, ...@@ -830,7 +830,7 @@ gradient_get_color_at (gradient_t *gradient,
default: default:
grad_dump_gradient (gradient, stderr); 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); (int) seg->color);
break; break;
} }
...@@ -1658,8 +1658,7 @@ ed_do_new_gradient_callback (GtkWidget *widget, ...@@ -1658,8 +1658,7 @@ ed_do_new_gradient_callback (GtkWidget *widget,
if (!gradient_name) if (!gradient_name)
{ {
g_message (_("ed_do_new_gradient_callback(): " g_warning ("received NULL in call_data");
"oops, received NULL in call_data"));
return; return;
} }
...@@ -1725,8 +1724,7 @@ ed_do_copy_gradient_callback (GtkWidget *widget, ...@@ -1725,8 +1724,7 @@ ed_do_copy_gradient_callback (GtkWidget *widget,
if (!gradient_name) if (!gradient_name)
{ {
g_message (_("ed_do_copy_gradient_callback(): " g_warning ("received NULL in call_data");
"oops, received NULL in call_data"));
return; return;
} }
...@@ -1812,8 +1810,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget, ...@@ -1812,8 +1810,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!gradient_name) if (!gradient_name)
{ {
g_message (_("ed_do_rename_gradient_callback(): " g_warning ("received NULL in call_data");
"oops, received NULL in call_data"));
return; return;
} }
...@@ -1827,8 +1824,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget, ...@@ -1827,8 +1824,7 @@ ed_do_rename_gradient_callback (GtkWidget *widget,
if (!grad || !grad_list) if (!grad || !grad_list)
{ {
g_message (_("ed_do_rename_gradient_callback(): " g_warning ("can't find gradient to rename");
"oops, can't find gradient to rename"));
return; return;
} }
...@@ -1929,8 +1925,7 @@ ed_do_delete_gradient_callback (GtkWidget *widget, ...@@ -1929,8 +1925,7 @@ ed_do_delete_gradient_callback (GtkWidget *widget,
} }
if (tmp == NULL) if (tmp == NULL)
gimp_fatal_error (_("ed_do_delete_gradient_callback(): " gimp_fatal_error ("Could not find gradient to delete!");
"Could not find gradient to delete!"));
/* Delete gradient from gradients list */ /* Delete gradient from gradients list */
gradients_list = g_slist_remove (gradients_list, curr_gradient); gradients_list = g_slist_remove (gradients_list, curr_gradient);
...@@ -2010,8 +2005,7 @@ ed_do_save_pov_callback (GtkWidget *widget, ...@@ -2010,8 +2005,7 @@ ed_do_save_pov_callback (GtkWidget *widget,
file = fopen (filename, "wb"); file = fopen (filename, "wb");
if (!file) if (!file)
g_message (_("ed_do_save_pov_callback(): oops, could not open \"%s\""), g_message (_("Could not open \"%s\""), filename);
filename);
else else
{ {
fprintf (file, "/* color_map file created by the GIMP */\n"); fprintf (file, "/* color_map file created by the GIMP */\n");
...@@ -2745,8 +2739,8 @@ control_do_hint (gint x, ...@@ -2745,8 +2739,8 @@ control_do_hint (gint x,
break; break;
default: default:
g_message ("control_do_hint: oops, in_handle is true " g_warning ("in_handle is true yet we got handle type %d",
"yet we got handle type %d", (int) handle); (int) handle);
break; break;
} }
} }
...@@ -2883,8 +2877,8 @@ control_button_press (gint x, ...@@ -2883,8 +2877,8 @@ control_button_press (gint x,
return; return;
default: default:
g_message ("control_button_press(): oops, in_handle is true " g_warning ("in_handle is true yet we got handle type %d",
"yet we got handle type %d", (int) handle); (int) handle);
return; return;
}