locale-wrapper for menus_set_sensitive (..._locale) and menus_set_state

1999-06-06  Tomas Ogren  <stric@ing.umu.se>

* app/menus.[ch]: locale-wrapper for menus_set_sensitive (..._locale)
  and menus_set_state (..._locale) which splits the menu-entry
  "<Foo>/Bar/Baz" into "<Foo>" and "/Bar/Baz" to remove double
  translations
* app/app_procs.c, app/channels_dialog.c, app/fileops.c, app/gdisplay.c
* app/gdisplay_ops.c, app/layers_dialog.c, app/paths_dialog.c
* app/plug_in.c:
  Use the _locale version from above
This commit is contained in:
Tomas Ogren 1999-06-06 21:13:03 +00:00 committed by Tomas Ögren
parent 79be4895ec
commit d085c151d3
34 changed files with 305 additions and 294 deletions

View File

@ -1,3 +1,14 @@
1999-06-06 Tomas Ogren <stric@ing.umu.se>
* app/menus.[ch]: locale-wrapper for menus_set_sensitive (..._locale)
and menus_set_state (..._locale) which splits the menu-entry
"<Foo>/Bar/Baz" into "<Foo>" and "/Bar/Baz" to remove double
translations
* app/app_procs.c, app/channels_dialog.c, app/fileops.c, app/gdisplay.c
* app/gdisplay_ops.c, app/layers_dialog.c, app/paths_dialog.c
* app/plug_in.c:
Use the _locale version from above
1999-06-06 Tomas Ogren <stric@ing.umu.se>
* app/{color_notebook.c,color_select.c,lc_dialog.c,temp_buf.c,tool_options.c,tools.c}:

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -693,8 +693,8 @@ static void
really_quit_cancel_callback (GtkWidget *widget,
GtkWidget *dialog)
{
menus_set_sensitive (_("<Toolbox>/File/Quit"), TRUE);
menus_set_sensitive (_("<Image>/File/Quit"), TRUE);
menus_set_sensitive_locale ("<Toolbox>", N_("/File/Quit"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Quit"), TRUE);
gtk_widget_destroy (dialog);
}
@ -714,8 +714,8 @@ really_quit_dialog (void)
GtkWidget *button;
GtkWidget *label;
menus_set_sensitive (_("<Toolbox>/File/Quit"), FALSE);
menus_set_sensitive (_("<Image>/File/Quit"), FALSE);
menus_set_sensitive_locale ("<Toolbox>", N_("/File/Quit"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Quit"), FALSE);
dialog = gtk_dialog_new ();
gtk_window_set_wmclass (GTK_WINDOW (dialog), "really_quit", "Gimp");

View File

@ -534,31 +534,31 @@ channels_dialog_set_menu_sensitivity ()
else
aux_sens = FALSE;
menus_set_sensitive (_("<Channels>/New Channel"), !fs_sens);
menus_set_sensitive_locale ("<Channels>", N_("/New Channel"), !fs_sens);
gtk_widget_set_sensitive (channels_ops_buttons[0].widget, !fs_sens);
menus_set_sensitive (_("<Channels>/Raise Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Raise Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[1].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Lower Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Lower Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[2].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Duplicate Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Duplicate Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[3].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Delete Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Delete Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[4].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Channel to Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Channel to Selection"), aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[5].widget, aux_sens);
menus_set_sensitive (_("<Channels>/Add to Selection"), aux_sens);
menus_set_sensitive (_("<Channels>/Subtract From Selection"), aux_sens);
menus_set_sensitive (_("<Channels>/Intersect With Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Add to Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Subtract From Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Intersect With Selection"), aux_sens);
}

View File

@ -1568,62 +1568,62 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
lnum = g_slist_length (gdisp->gimage->layers);
}
menus_set_sensitive (_("<Image>/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive (_("<Image>/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive (_("<Image>/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Image/RGB"), (base_type != RGB));
menus_set_sensitive (_("<Image>/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive (_("<Image>/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/RGB"), (base_type != RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive_locale ("<Image>", N_("/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Select"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Into"), lp);
menus_set_sensitive (_("<Image>/Edit/Clear"), lp);
menus_set_sensitive (_("<Image>/Edit/Fill"), lp);
menus_set_sensitive (_("<Image>/Edit/Stroke"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Named"), lp);
menus_set_sensitive (_("<Image>/Image/Colors"), lp);
menus_set_sensitive (_("<Image>/Image/Channel Ops/Offset"), lp);
menus_set_sensitive (_("<Image>/Image/Histogram"), lp);
menus_set_sensitive (_("<Image>/Filters"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Select"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Into"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Clear"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Fill"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Stroke"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Channel Ops/Offset"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Histogram"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Filters"), lp);
/* save selection to channel */
menus_set_sensitive (_("<Image>/Select/Save To Channel"), !fs);
menus_set_sensitive_locale ("<Image>", N_("/Select/Save To Channel"), !fs);
menus_set_state (_("<Image>/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state (_("<Image>/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state (_("<Image>/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state (_("<Image>/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state (_("<Image>/View/Dot for dot"), gdisp->dot_for_dot);
menus_set_state_locale ("<Image>", N_("/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state_locale ("<Image>", N_("/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state_locale ("<Image>", N_("/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Dot for dot"), gdisp->dot_for_dot);
plug_in_set_menu_sensitivity (type);
}

View File

@ -302,7 +302,7 @@ gdisplay_close_warning_callback (GtkWidget *w,
GDisplay *gdisp;
GtkWidget *mbox;
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
mbox = (GtkWidget *) client_data;
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (mbox));
@ -321,7 +321,7 @@ gdisplay_cancel_warning_callback (GtkWidget *w,
{
GtkWidget *mbox;
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
mbox = (GtkWidget *) client_data;
gtk_widget_destroy (mbox);
}
@ -331,7 +331,7 @@ gdisplay_delete_warning_callback (GtkWidget *widget,
GdkEvent *event,
gpointer client_data)
{
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
return FALSE;
}
@ -367,7 +367,7 @@ gdisplay_close_warning_dialog (char *image_name,
return;
}
menus_set_sensitive (_("<Image>/File/Close"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), FALSE);
warning_dialog = mbox = gtk_dialog_new ();
/* should this be image_window or the actual image name??? */

View File

@ -1568,62 +1568,62 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
lnum = g_slist_length (gdisp->gimage->layers);
}
menus_set_sensitive (_("<Image>/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive (_("<Image>/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive (_("<Image>/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Image/RGB"), (base_type != RGB));
menus_set_sensitive (_("<Image>/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive (_("<Image>/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/RGB"), (base_type != RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive_locale ("<Image>", N_("/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Select"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Into"), lp);
menus_set_sensitive (_("<Image>/Edit/Clear"), lp);
menus_set_sensitive (_("<Image>/Edit/Fill"), lp);
menus_set_sensitive (_("<Image>/Edit/Stroke"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Named"), lp);
menus_set_sensitive (_("<Image>/Image/Colors"), lp);
menus_set_sensitive (_("<Image>/Image/Channel Ops/Offset"), lp);
menus_set_sensitive (_("<Image>/Image/Histogram"), lp);
menus_set_sensitive (_("<Image>/Filters"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Select"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Into"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Clear"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Fill"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Stroke"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Channel Ops/Offset"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Histogram"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Filters"), lp);
/* save selection to channel */
menus_set_sensitive (_("<Image>/Select/Save To Channel"), !fs);
menus_set_sensitive_locale ("<Image>", N_("/Select/Save To Channel"), !fs);
menus_set_state (_("<Image>/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state (_("<Image>/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state (_("<Image>/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state (_("<Image>/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state (_("<Image>/View/Dot for dot"), gdisp->dot_for_dot);
menus_set_state_locale ("<Image>", N_("/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state_locale ("<Image>", N_("/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state_locale ("<Image>", N_("/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Dot for dot"), gdisp->dot_for_dot);
plug_in_set_menu_sensitivity (type);
}

View File

@ -1534,10 +1534,10 @@ file_save_ok_callback (GtkWidget *w,
static void
file_dialog_show (GtkWidget *filesel)
{
menus_set_sensitive (_("<Toolbox>/File/Open"), FALSE);
menus_set_sensitive (_("<Image>/File/Open"), FALSE);
menus_set_sensitive (_("<Image>/File/Save"), FALSE);
menus_set_sensitive (_("<Image>/File/Save as"), FALSE);
menus_set_sensitive_locale ("<Toolbox>", N_("/File/Open"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Open"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Save"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Save as"), FALSE);
gtk_widget_show (filesel);
}
@ -1547,10 +1547,10 @@ file_dialog_hide (GtkWidget *filesel)
{
gtk_widget_hide (filesel);
menus_set_sensitive (_("<Toolbox>/File/Open"), TRUE);
menus_set_sensitive (_("<Image>/File/Open"), TRUE);
menus_set_sensitive (_("<Image>/File/Save"), TRUE);
menus_set_sensitive (_("<Image>/File/Save as"), TRUE);
menus_set_sensitive_locale ("<Toolbox>", N_("/File/Open"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Open"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Save"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Save as"), TRUE);
return TRUE;
}
@ -1996,6 +1996,6 @@ file_update_menus (GSList *procs,
procs = procs->next;
if (file_proc->db_info.proc_type != PDB_EXTENSION)
menus_set_sensitive (gettext(file_proc->menu_path), (file_proc->image_types_val & image_type));
menus_set_sensitive (file_proc->menu_path, (file_proc->image_types_val & image_type));
}
}

View File

@ -1568,62 +1568,62 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
lnum = g_slist_length (gdisp->gimage->layers);
}
menus_set_sensitive (_("<Image>/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive (_("<Image>/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive (_("<Image>/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive (_("<Image>/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive (_("<Image>/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive (_("<Image>/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Previous Layer"), !fs && !aux && lp && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Next Layer"), !fs && !aux && lp && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Raise Layer"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Lower Layer"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Top"), !fs && !aux && lp && alpha && lind > 0);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Stack/Layer to Bottom"), !fs && !aux && lp && alpha && lind < (lnum - 1));
menus_set_sensitive_locale ("<Image>", N_("/Layers/Anchor Layer"), fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Merge Visible Layers"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Flatten Image"), !fs && !aux && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Alpha To Selection"), !aux && lp && alpha);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Mask To Selection"), !aux && lm && lp);
menus_set_sensitive_locale ("<Image>", N_("/Layers/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Image/RGB"), (base_type != RGB));
menus_set_sensitive (_("<Image>/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive (_("<Image>/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/RGB"), (base_type != RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Grayscale"), (base_type != GRAY));
menus_set_sensitive_locale ("<Image>", N_("/Image/Indexed"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Threshold"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Posterize") , (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Equalize"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Invert"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Color Balance"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Brightness-Contrast"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Hue-Saturation"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Curves"), (base_type != INDEXED));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Levels"), (base_type != INDEXED));
menus_set_sensitive (_("<Image>/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors/Desaturate"), (base_type == RGB));
menus_set_sensitive (_("<Image>/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive_locale ("<Image>", N_("/Image/Alpha/Add Alpha Channel"), !fs && !aux && lp && !lm && !alpha);
menus_set_sensitive (_("<Image>/Select"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Into"), lp);
menus_set_sensitive (_("<Image>/Edit/Clear"), lp);
menus_set_sensitive (_("<Image>/Edit/Fill"), lp);
menus_set_sensitive (_("<Image>/Edit/Stroke"), lp);
menus_set_sensitive (_("<Image>/Edit/Cut Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Copy Named"), lp);
menus_set_sensitive (_("<Image>/Edit/Paste Named"), lp);
menus_set_sensitive (_("<Image>/Image/Colors"), lp);
menus_set_sensitive (_("<Image>/Image/Channel Ops/Offset"), lp);
menus_set_sensitive (_("<Image>/Image/Histogram"), lp);
menus_set_sensitive (_("<Image>/Filters"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Select"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Into"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Clear"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Fill"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Stroke"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Cut Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Copy Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Edit/Paste Named"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Colors"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Channel Ops/Offset"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Image/Histogram"), lp);
menus_set_sensitive_locale ("<Image>", N_("/Filters"), lp);
/* save selection to channel */
menus_set_sensitive (_("<Image>/Select/Save To Channel"), !fs);
menus_set_sensitive_locale ("<Image>", N_("/Select/Save To Channel"), !fs);
menus_set_state (_("<Image>/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state (_("<Image>/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state (_("<Image>/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state (_("<Image>/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state (_("<Image>/View/Dot for dot"), gdisp->dot_for_dot);
menus_set_state_locale ("<Image>", N_("/View/Toggle Rulers"), GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Toggle Guides"), gdisp->draw_guides);
menus_set_state_locale ("<Image>", N_("/View/Snap To Guides"), gdisp->snap_to_guides);
menus_set_state_locale ("<Image>", N_("/View/Toggle Statusbar"), GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
menus_set_state_locale ("<Image>", N_("/View/Dot for dot"), gdisp->dot_for_dot);
plug_in_set_menu_sensitivity (type);
}

View File

@ -302,7 +302,7 @@ gdisplay_close_warning_callback (GtkWidget *w,
GDisplay *gdisp;
GtkWidget *mbox;
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
mbox = (GtkWidget *) client_data;
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (mbox));
@ -321,7 +321,7 @@ gdisplay_cancel_warning_callback (GtkWidget *w,
{
GtkWidget *mbox;
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
mbox = (GtkWidget *) client_data;
gtk_widget_destroy (mbox);
}
@ -331,7 +331,7 @@ gdisplay_delete_warning_callback (GtkWidget *widget,
GdkEvent *event,
gpointer client_data)
{
menus_set_sensitive (_("<Image>/File/Close"), TRUE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), TRUE);
return FALSE;
}
@ -367,7 +367,7 @@ gdisplay_close_warning_dialog (char *image_name,
return;
}
menus_set_sensitive (_("<Image>/File/Close"), FALSE);
menus_set_sensitive_locale ("<Image>", N_("/File/Close"), FALSE);
warning_dialog = mbox = gtk_dialog_new ();
/* should this be image_window or the actual image name??? */

View File

@ -534,31 +534,31 @@ channels_dialog_set_menu_sensitivity ()
else
aux_sens = FALSE;
menus_set_sensitive (_("<Channels>/New Channel"), !fs_sens);
menus_set_sensitive_locale ("<Channels>", N_("/New Channel"), !fs_sens);
gtk_widget_set_sensitive (channels_ops_buttons[0].widget, !fs_sens);
menus_set_sensitive (_("<Channels>/Raise Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Raise Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[1].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Lower Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Lower Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[2].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Duplicate Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Duplicate Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[3].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Delete Channel"), !fs_sens && aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Delete Channel"), !fs_sens && aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[4].widget,
!fs_sens && aux_sens);
menus_set_sensitive (_("<Channels>/Channel to Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Channel to Selection"), aux_sens);
gtk_widget_set_sensitive (channels_ops_buttons[5].widget, aux_sens);
menus_set_sensitive (_("<Channels>/Add to Selection"), aux_sens);
menus_set_sensitive (_("<Channels>/Subtract From Selection"), aux_sens);
menus_set_sensitive (_("<Channels>/Intersect With Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Add to Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Subtract From Selection"), aux_sens);
menus_set_sensitive_locale ("<Channels>", N_("/Intersect With Selection"), aux_sens);
}

View File

@ -910,57 +910,57 @@ layers_dialog_set_menu_sensitivity ()
lnum = g_slist_length (layersD->gimage->layers);
}
menus_set_sensitive (_("<Layers>/Stack/Previous Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Previous Layer"),
fs && ac && gimage && lp && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Next Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Next Layer"),
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/Stack/Raise Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Raise Layer"),
fs && ac && gimage && lp && alpha && lind > 0);
gtk_widget_set_sensitive (layers_ops_buttons[1].widget,
fs && ac && gimage && lp && alpha && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Lower Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Lower Layer"),
fs && ac && gimage && lp && lind < (lnum - 1));
gtk_widget_set_sensitive (layers_ops_buttons[2].widget,
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/Stack/Layer to Top"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Layer to Top"),
fs && ac && gimage && lp && alpha && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Layer to Bottom"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Layer to Bottom"),
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/New Layer"), gimage);
menus_set_sensitive_locale ("<Layers>", N_("/New Layer"), gimage);
gtk_widget_set_sensitive (layers_ops_buttons[0].widget, gimage);
menus_set_sensitive (_("<Layers>/Duplicate Layer"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Duplicate Layer"), fs && ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[3].widget,
fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Delete Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Delete Layer"), ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[4].widget, ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Anchor Layer"), !fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Anchor Layer"), !fs && ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[5].widget,
!fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Scale Layer"), ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Resize Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Scale Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Resize Layer"), ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Merge Visible Layers"),
menus_set_sensitive_locale ("<Layers>", N_("/Merge Visible Layers"),
fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Merge Down"), fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Flatten Image"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Merge Down"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Flatten Image"), fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Add Layer Mask"),
menus_set_sensitive_locale ("<Layers>", N_("/Add Layer Mask"),
fs && ac && gimage && !lm && lp && alpha);
menus_set_sensitive (_("<Layers>/Apply Layer Mask"),
menus_set_sensitive_locale ("<Layers>", N_("/Apply Layer Mask"),
fs && ac && gimage && lm && lp);
menus_set_sensitive (_("<Layers>/Alpha to Selection"),
menus_set_sensitive_locale ("<Layers>", N_("/Alpha to Selection"),
fs && ac && gimage && lp && alpha);
menus_set_sensitive (_("<Layers>/Mask to Selection"),
menus_set_sensitive_locale ("<Layers>", N_("/Mask to Selection"),
fs && ac && gimage && lm && lp);
menus_set_sensitive (_("<Layers>/Add Alpha Channel"), !alpha);
menus_set_sensitive_locale ("<Layers>", N_("/Add Alpha Channel"), !alpha);
/* set mode, preserve transparency and opacity to insensitive
* if there are no layers

View File

@ -181,30 +181,30 @@ paths_ops_button_set_sensitive (gint but,
switch(but)
{
case NEW_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/New Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/New Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[0].widget,sensitive);
break;
case DUP_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Duplicate Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Duplicate Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[1].widget,sensitive);
break;
case DEL_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Delete Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Delete Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[2].widget,sensitive);
break;
case PATH_TO_SEL_BUTTON:
menus_set_sensitive (_("<Paths>/Path to Selection"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Path to Selection"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[3].widget,sensitive);
break;
case STROKE_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Stroke Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Stroke Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[4].widget,sensitive);
break;
case COPY_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Copy Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Copy Path"), sensitive);
break;
case PASTE_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Paste Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Paste Path"), sensitive);
break;
default:
g_warning(_("paths_ops_button_set_sensitive:: invalid button specified"));

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -910,57 +910,57 @@ layers_dialog_set_menu_sensitivity ()
lnum = g_slist_length (layersD->gimage->layers);
}
menus_set_sensitive (_("<Layers>/Stack/Previous Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Previous Layer"),
fs && ac && gimage && lp && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Next Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Next Layer"),
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/Stack/Raise Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Raise Layer"),
fs && ac && gimage && lp && alpha && lind > 0);
gtk_widget_set_sensitive (layers_ops_buttons[1].widget,
fs && ac && gimage && lp && alpha && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Lower Layer"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Lower Layer"),
fs && ac && gimage && lp && lind < (lnum - 1));
gtk_widget_set_sensitive (layers_ops_buttons[2].widget,
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/Stack/Layer to Top"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Layer to Top"),
fs && ac && gimage && lp && alpha && lind > 0);
menus_set_sensitive (_("<Layers>/Stack/Layer to Bottom"),
menus_set_sensitive_locale ("<Layers>", N_("/Stack/Layer to Bottom"),
fs && ac && gimage && lp && lind < (lnum - 1));
menus_set_sensitive (_("<Layers>/New Layer"), gimage);
menus_set_sensitive_locale ("<Layers>", N_("/New Layer"), gimage);
gtk_widget_set_sensitive (layers_ops_buttons[0].widget, gimage);
menus_set_sensitive (_("<Layers>/Duplicate Layer"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Duplicate Layer"), fs && ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[3].widget,
fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Delete Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Delete Layer"), ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[4].widget, ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Anchor Layer"), !fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Anchor Layer"), !fs && ac && gimage && lp);
gtk_widget_set_sensitive (layers_ops_buttons[5].widget,
!fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Scale Layer"), ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Resize Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Scale Layer"), ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Resize Layer"), ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Merge Visible Layers"),
menus_set_sensitive_locale ("<Layers>", N_("/Merge Visible Layers"),
fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Merge Down"), fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Flatten Image"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Merge Down"), fs && ac && gimage && lp);
menus_set_sensitive_locale ("<Layers>", N_("/Flatten Image"), fs && ac && gimage && lp);
menus_set_sensitive (_("<Layers>/Add Layer Mask"),
menus_set_sensitive_locale ("<Layers>", N_("/Add Layer Mask"),
fs && ac && gimage && !lm && lp && alpha);
menus_set_sensitive (_("<Layers>/Apply Layer Mask"),
menus_set_sensitive_locale ("<Layers>", N_("/Apply Layer Mask"),
fs && ac && gimage && lm && lp);
menus_set_sensitive (_("<Layers>/Alpha to Selection"),
menus_set_sensitive_locale ("<Layers>", N_("/Alpha to Selection"),
fs && ac && gimage && lp && alpha);
menus_set_sensitive (_("<Layers>/Mask to Selection"),
menus_set_sensitive_locale ("<Layers>", N_("/Mask to Selection"),
fs && ac && gimage && lm && lp);
menus_set_sensitive (_("<Layers>/Add Alpha Channel"), !alpha);
menus_set_sensitive_locale ("<Layers>", N_("/Add Alpha Channel"), !alpha);
/* set mode, preserve transparency and opacity to insensitive
* if there are no layers

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -181,30 +181,30 @@ paths_ops_button_set_sensitive (gint but,
switch(but)
{
case NEW_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/New Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/New Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[0].widget,sensitive);
break;
case DUP_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Duplicate Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Duplicate Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[1].widget,sensitive);
break;
case DEL_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Delete Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Delete Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[2].widget,sensitive);
break;
case PATH_TO_SEL_BUTTON:
menus_set_sensitive (_("<Paths>/Path to Selection"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Path to Selection"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[3].widget,sensitive);
break;
case STROKE_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Stroke Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Stroke Path"), sensitive);
gtk_widget_set_sensitive(paths_ops_buttons[4].widget,sensitive);
break;
case COPY_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Copy Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Copy Path"), sensitive);
break;
case PASTE_PATH_BUTTON:
menus_set_sensitive (_("<Paths>/Paste Path"), sensitive);
menus_set_sensitive_locale ("<Paths>", N_("/Paste Path"), sensitive);
break;
default:
g_warning(_("paths_ops_button_set_sensitive:: invalid button specified"));

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}

View File

@ -1275,11 +1275,11 @@ plug_in_set_menu_sensitivity (int base_type)
break;
}
menus_set_sensitive (gettext(proc_def->menu_path), sensitive);
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);
menus_set_sensitive (_("<Image>/Filters/Re-show last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_locale ("<Image>", N_("/Filters/Re-show last"), sensitive);
}
}
}