mirror of https://github.com/GNOME/gimp.git
big i18n fix patch from SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp>. Fixes
those pesky menu problems -Yosh
This commit is contained in:
parent
dbe96e67d2
commit
3423edf7eb
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
Tue Aug 24 12:49:35 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* app/channels_dialog.c
|
||||||
|
* app/layers_dialog.c
|
||||||
|
* app/menus.c
|
||||||
|
* plug-ins/common/autostretch_hsv.c
|
||||||
|
* plug-ins/common/compose.c
|
||||||
|
* plug-ins/common/decompose.c
|
||||||
|
* plug-ins/common/mail.c
|
||||||
|
* plug-ins/print/print.c
|
||||||
|
* plug-ins/script-fu/script-fu-scripts.c: big i18n fix patch
|
||||||
|
from SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp>. Fixes those
|
||||||
|
pesky menu problems
|
||||||
|
|
||||||
Tue Aug 24 20:32:39 MEST 1999 Sven Neumann <sven.gimp.org>
|
Tue Aug 24 20:32:39 MEST 1999 Sven Neumann <sven.gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/Makefile.am
|
* plug-ins/common/Makefile.am
|
||||||
|
|
|
@ -622,26 +622,26 @@ channels_dialog_set_menu_sensitivity ()
|
||||||
gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \
|
gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \
|
||||||
(condition) != 0)
|
(condition) != 0)
|
||||||
|
|
||||||
SET_SENSITIVE (_("/New Channel"), !fs_sens);
|
SET_SENSITIVE (N_("/New Channel"), !fs_sens);
|
||||||
SET_OPS_SENSITIVE (0, !fs_sens);
|
SET_OPS_SENSITIVE (0, !fs_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Raise Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Raise Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (1, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (1, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Lower Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Lower Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (2, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (2, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Duplicate Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Duplicate Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (3, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (3, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Channel to Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Channel to Selection"), aux_sens);
|
||||||
SET_OPS_SENSITIVE (4, aux_sens);
|
SET_OPS_SENSITIVE (4, aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Add to Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Add to Selection"), aux_sens);
|
||||||
SET_SENSITIVE (_("/Subtract From Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Subtract From Selection"), aux_sens);
|
||||||
SET_SENSITIVE (_("/Intersect With Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Intersect With Selection"), aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Delete Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Delete Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
|
||||||
|
|
||||||
#undef SET_OPS_SENSITIVE
|
#undef SET_OPS_SENSITIVE
|
||||||
|
|
|
@ -622,26 +622,26 @@ channels_dialog_set_menu_sensitivity ()
|
||||||
gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \
|
gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \
|
||||||
(condition) != 0)
|
(condition) != 0)
|
||||||
|
|
||||||
SET_SENSITIVE (_("/New Channel"), !fs_sens);
|
SET_SENSITIVE (N_("/New Channel"), !fs_sens);
|
||||||
SET_OPS_SENSITIVE (0, !fs_sens);
|
SET_OPS_SENSITIVE (0, !fs_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Raise Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Raise Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (1, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (1, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Lower Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Lower Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (2, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (2, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Duplicate Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Duplicate Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (3, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (3, !fs_sens && aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Channel to Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Channel to Selection"), aux_sens);
|
||||||
SET_OPS_SENSITIVE (4, aux_sens);
|
SET_OPS_SENSITIVE (4, aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Add to Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Add to Selection"), aux_sens);
|
||||||
SET_SENSITIVE (_("/Subtract From Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Subtract From Selection"), aux_sens);
|
||||||
SET_SENSITIVE (_("/Intersect With Selection"), aux_sens);
|
SET_SENSITIVE (N_("/Intersect With Selection"), aux_sens);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Delete Channel"), !fs_sens && aux_sens);
|
SET_SENSITIVE (N_("/Delete Channel"), !fs_sens && aux_sens);
|
||||||
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
|
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
|
||||||
|
|
||||||
#undef SET_OPS_SENSITIVE
|
#undef SET_OPS_SENSITIVE
|
||||||
|
|
|
@ -1004,46 +1004,46 @@ layers_dialog_set_menu_sensitivity ()
|
||||||
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
|
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
|
||||||
(condition) != 0)
|
(condition) != 0)
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
|
SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
|
||||||
SET_SENSITIVE (_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
|
SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Raise Layer"),
|
SET_SENSITIVE (N_("/Stack/Raise Layer"),
|
||||||
fs && ac && gimage && lp && alpha && prev);
|
fs && ac && gimage && lp && alpha && prev);
|
||||||
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
|
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Lower Layer"),
|
SET_SENSITIVE (N_("/Stack/Lower Layer"),
|
||||||
fs && ac && gimage && lp && next && next_alpha);
|
fs && ac && gimage && lp && next && next_alpha);
|
||||||
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
|
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Layer to Top"),
|
SET_SENSITIVE (N_("/Stack/Layer to Top"),
|
||||||
fs && ac && gimage && lp && alpha && prev);
|
fs && ac && gimage && lp && alpha && prev);
|
||||||
SET_SENSITIVE (_("/Stack/Layer to Bottom"),
|
SET_SENSITIVE (N_("/Stack/Layer to Bottom"),
|
||||||
fs && ac && gimage && lp && next && next_alpha);
|
fs && ac && gimage && lp && next && next_alpha);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/New Layer"), gimage);
|
SET_SENSITIVE (N_("/New Layer"), gimage);
|
||||||
SET_OPS_SENSITIVE (0, gimage);
|
SET_OPS_SENSITIVE (0, gimage);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Duplicate Layer"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
|
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Anchor Layer"), !fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
|
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Delete Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (5, ac && gimage && lp);
|
SET_OPS_SENSITIVE (5, ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Scale Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Scale Layer"), ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Resize Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Resize Layer"), ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Merge Visible Layers"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Merge Visible Layers"), fs && ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Merge Down"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Flatten Image"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha);
|
SET_SENSITIVE (N_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha);
|
||||||
SET_SENSITIVE (_("/Apply Layer Mask"), fs && ac && gimage && lm && lp);
|
SET_SENSITIVE (N_("/Apply Layer Mask"), fs && ac && gimage && lm && lp);
|
||||||
SET_SENSITIVE (_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
|
SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
|
||||||
SET_SENSITIVE (_("/Mask to Selection"), fs && ac && gimage && lm && lp);
|
SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp);
|
||||||
SET_SENSITIVE (_("/Add Alpha Channel"), !alpha);
|
SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha);
|
||||||
|
|
||||||
#undef SET_OPS_SENSITIVE
|
#undef SET_OPS_SENSITIVE
|
||||||
#undef SET_SENSITIVE
|
#undef SET_SENSITIVE
|
||||||
|
|
|
@ -43,7 +43,13 @@
|
||||||
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
||||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||||
|
|
||||||
static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 ");
|
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
|
||||||
|
N_("/File"),
|
||||||
|
N_("/File/Dialogs"),
|
||||||
|
N_("/Layers"),
|
||||||
|
N_("/Tools"),
|
||||||
|
N_("/Dialogs"),
|
||||||
|
N_("/View/Zoom") };
|
||||||
|
|
||||||
static void menus_init (void);
|
static void menus_init (void);
|
||||||
static gchar* menu_translate (const gchar *path,
|
static gchar* menu_translate (const gchar *path,
|
||||||
|
@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_sensitive (menupath, sensitive);
|
menus_set_sensitive (menupath, sensitive);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_state (menupath, state);
|
menus_set_state (menupath, state);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -622,13 +628,14 @@ menus_last_opened_update_labels (void)
|
||||||
{
|
{
|
||||||
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
||||||
|
|
||||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
g_string_sprintf (path, N_("/File/MRU%02d"), i);
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||||
gtk_widget_show (widget);
|
if (widget != NULL) {
|
||||||
|
gtk_widget_show (widget);
|
||||||
|
|
||||||
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
||||||
|
}
|
||||||
filename_slist = filename_slist->next;
|
filename_slist = filename_slist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename)
|
||||||
|
|
||||||
if (num_entries == 0)
|
if (num_entries == 0)
|
||||||
{
|
{
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +710,7 @@ menus_init_mru (void)
|
||||||
last_opened_entries[i].callback_action = i;
|
last_opened_entries[i].callback_action = i;
|
||||||
last_opened_entries[i].item_type = NULL;
|
last_opened_entries[i].item_type = NULL;
|
||||||
|
|
||||||
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
|
g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1);
|
||||||
if (accelerator != NULL)
|
if (accelerator != NULL)
|
||||||
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
||||||
}
|
}
|
||||||
|
@ -718,7 +725,7 @@ menus_init_mru (void)
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
|
|
||||||
g_free (paths);
|
g_free (paths);
|
||||||
|
|
|
@ -1004,46 +1004,46 @@ layers_dialog_set_menu_sensitivity ()
|
||||||
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
|
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
|
||||||
(condition) != 0)
|
(condition) != 0)
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
|
SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
|
||||||
SET_SENSITIVE (_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
|
SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Raise Layer"),
|
SET_SENSITIVE (N_("/Stack/Raise Layer"),
|
||||||
fs && ac && gimage && lp && alpha && prev);
|
fs && ac && gimage && lp && alpha && prev);
|
||||||
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
|
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Lower Layer"),
|
SET_SENSITIVE (N_("/Stack/Lower Layer"),
|
||||||
fs && ac && gimage && lp && next && next_alpha);
|
fs && ac && gimage && lp && next && next_alpha);
|
||||||
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
|
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Stack/Layer to Top"),
|
SET_SENSITIVE (N_("/Stack/Layer to Top"),
|
||||||
fs && ac && gimage && lp && alpha && prev);
|
fs && ac && gimage && lp && alpha && prev);
|
||||||
SET_SENSITIVE (_("/Stack/Layer to Bottom"),
|
SET_SENSITIVE (N_("/Stack/Layer to Bottom"),
|
||||||
fs && ac && gimage && lp && next && next_alpha);
|
fs && ac && gimage && lp && next && next_alpha);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/New Layer"), gimage);
|
SET_SENSITIVE (N_("/New Layer"), gimage);
|
||||||
SET_OPS_SENSITIVE (0, gimage);
|
SET_OPS_SENSITIVE (0, gimage);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Duplicate Layer"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
|
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Anchor Layer"), !fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
|
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Delete Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp);
|
||||||
SET_OPS_SENSITIVE (5, ac && gimage && lp);
|
SET_OPS_SENSITIVE (5, ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Scale Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Scale Layer"), ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Resize Layer"), ac && gimage && lp);
|
SET_SENSITIVE (N_("/Resize Layer"), ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Merge Visible Layers"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Merge Visible Layers"), fs && ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Merge Down"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp);
|
||||||
SET_SENSITIVE (_("/Flatten Image"), fs && ac && gimage && lp);
|
SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp);
|
||||||
|
|
||||||
SET_SENSITIVE (_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha);
|
SET_SENSITIVE (N_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha);
|
||||||
SET_SENSITIVE (_("/Apply Layer Mask"), fs && ac && gimage && lm && lp);
|
SET_SENSITIVE (N_("/Apply Layer Mask"), fs && ac && gimage && lm && lp);
|
||||||
SET_SENSITIVE (_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
|
SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
|
||||||
SET_SENSITIVE (_("/Mask to Selection"), fs && ac && gimage && lm && lp);
|
SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp);
|
||||||
SET_SENSITIVE (_("/Add Alpha Channel"), !alpha);
|
SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha);
|
||||||
|
|
||||||
#undef SET_OPS_SENSITIVE
|
#undef SET_OPS_SENSITIVE
|
||||||
#undef SET_SENSITIVE
|
#undef SET_SENSITIVE
|
||||||
|
|
27
app/menus.c
27
app/menus.c
|
@ -43,7 +43,13 @@
|
||||||
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
||||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||||
|
|
||||||
static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 ");
|
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
|
||||||
|
N_("/File"),
|
||||||
|
N_("/File/Dialogs"),
|
||||||
|
N_("/Layers"),
|
||||||
|
N_("/Tools"),
|
||||||
|
N_("/Dialogs"),
|
||||||
|
N_("/View/Zoom") };
|
||||||
|
|
||||||
static void menus_init (void);
|
static void menus_init (void);
|
||||||
static gchar* menu_translate (const gchar *path,
|
static gchar* menu_translate (const gchar *path,
|
||||||
|
@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_sensitive (menupath, sensitive);
|
menus_set_sensitive (menupath, sensitive);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_state (menupath, state);
|
menus_set_state (menupath, state);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -622,13 +628,14 @@ menus_last_opened_update_labels (void)
|
||||||
{
|
{
|
||||||
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
||||||
|
|
||||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
g_string_sprintf (path, N_("/File/MRU%02d"), i);
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||||
gtk_widget_show (widget);
|
if (widget != NULL) {
|
||||||
|
gtk_widget_show (widget);
|
||||||
|
|
||||||
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
||||||
|
}
|
||||||
filename_slist = filename_slist->next;
|
filename_slist = filename_slist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename)
|
||||||
|
|
||||||
if (num_entries == 0)
|
if (num_entries == 0)
|
||||||
{
|
{
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +710,7 @@ menus_init_mru (void)
|
||||||
last_opened_entries[i].callback_action = i;
|
last_opened_entries[i].callback_action = i;
|
||||||
last_opened_entries[i].item_type = NULL;
|
last_opened_entries[i].item_type = NULL;
|
||||||
|
|
||||||
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
|
g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1);
|
||||||
if (accelerator != NULL)
|
if (accelerator != NULL)
|
||||||
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
||||||
}
|
}
|
||||||
|
@ -718,7 +725,7 @@ menus_init_mru (void)
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
|
|
||||||
g_free (paths);
|
g_free (paths);
|
||||||
|
|
|
@ -43,7 +43,13 @@
|
||||||
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
||||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||||
|
|
||||||
static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 ");
|
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
|
||||||
|
N_("/File"),
|
||||||
|
N_("/File/Dialogs"),
|
||||||
|
N_("/Layers"),
|
||||||
|
N_("/Tools"),
|
||||||
|
N_("/Dialogs"),
|
||||||
|
N_("/View/Zoom") };
|
||||||
|
|
||||||
static void menus_init (void);
|
static void menus_init (void);
|
||||||
static gchar* menu_translate (const gchar *path,
|
static gchar* menu_translate (const gchar *path,
|
||||||
|
@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_sensitive (menupath, sensitive);
|
menus_set_sensitive (menupath, sensitive);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_state (menupath, state);
|
menus_set_state (menupath, state);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -622,13 +628,14 @@ menus_last_opened_update_labels (void)
|
||||||
{
|
{
|
||||||
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
||||||
|
|
||||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
g_string_sprintf (path, N_("/File/MRU%02d"), i);
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||||
gtk_widget_show (widget);
|
if (widget != NULL) {
|
||||||
|
gtk_widget_show (widget);
|
||||||
|
|
||||||
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
||||||
|
}
|
||||||
filename_slist = filename_slist->next;
|
filename_slist = filename_slist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename)
|
||||||
|
|
||||||
if (num_entries == 0)
|
if (num_entries == 0)
|
||||||
{
|
{
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +710,7 @@ menus_init_mru (void)
|
||||||
last_opened_entries[i].callback_action = i;
|
last_opened_entries[i].callback_action = i;
|
||||||
last_opened_entries[i].item_type = NULL;
|
last_opened_entries[i].item_type = NULL;
|
||||||
|
|
||||||
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
|
g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1);
|
||||||
if (accelerator != NULL)
|
if (accelerator != NULL)
|
||||||
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
||||||
}
|
}
|
||||||
|
@ -718,7 +725,7 @@ menus_init_mru (void)
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
|
|
||||||
g_free (paths);
|
g_free (paths);
|
||||||
|
|
|
@ -43,7 +43,13 @@
|
||||||
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
#define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1)
|
||||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||||
|
|
||||||
static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 ");
|
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
|
||||||
|
N_("/File"),
|
||||||
|
N_("/File/Dialogs"),
|
||||||
|
N_("/Layers"),
|
||||||
|
N_("/Tools"),
|
||||||
|
N_("/Dialogs"),
|
||||||
|
N_("/View/Zoom") };
|
||||||
|
|
||||||
static void menus_init (void);
|
static void menus_init (void);
|
||||||
static gchar* menu_translate (const gchar *path,
|
static gchar* menu_translate (const gchar *path,
|
||||||
|
@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_sensitive (menupath, sensitive);
|
menus_set_sensitive (menupath, sensitive);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath,
|
||||||
{
|
{
|
||||||
gchar *menupath;
|
gchar *menupath;
|
||||||
|
|
||||||
menupath = g_strdup_printf ("%s%s", prepath, _(path));
|
menupath = g_strdup_printf ("%s%s", prepath, path);
|
||||||
menus_set_state (menupath, state);
|
menus_set_state (menupath, state);
|
||||||
g_free (menupath);
|
g_free (menupath);
|
||||||
}
|
}
|
||||||
|
@ -622,13 +628,14 @@ menus_last_opened_update_labels (void)
|
||||||
{
|
{
|
||||||
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str));
|
||||||
|
|
||||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
g_string_sprintf (path, N_("/File/MRU%02d"), i);
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||||
gtk_widget_show (widget);
|
if (widget != NULL) {
|
||||||
|
gtk_widget_show (widget);
|
||||||
|
|
||||||
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str);
|
||||||
|
}
|
||||||
filename_slist = filename_slist->next;
|
filename_slist = filename_slist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename)
|
||||||
|
|
||||||
if (num_entries == 0)
|
if (num_entries == 0)
|
||||||
{
|
{
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +710,7 @@ menus_init_mru (void)
|
||||||
last_opened_entries[i].callback_action = i;
|
last_opened_entries[i].callback_action = i;
|
||||||
last_opened_entries[i].item_type = NULL;
|
last_opened_entries[i].item_type = NULL;
|
||||||
|
|
||||||
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
|
g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1);
|
||||||
if (accelerator != NULL)
|
if (accelerator != NULL)
|
||||||
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
|
||||||
}
|
}
|
||||||
|
@ -718,7 +725,7 @@ menus_init_mru (void)
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path));
|
widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path);
|
||||||
gtk_widget_hide (widget);
|
gtk_widget_hide (widget);
|
||||||
|
|
||||||
g_free (paths);
|
g_free (paths);
|
||||||
|
|
|
@ -84,7 +84,7 @@ query ()
|
||||||
"Scott Goehring and Federico Mena Quintero",
|
"Scott Goehring and Federico Mena Quintero",
|
||||||
"Scott Goehring and Federico Mena Quintero",
|
"Scott Goehring and Federico Mena Quintero",
|
||||||
"1997",
|
"1997",
|
||||||
_("<Image>/Image/Colors/Auto-Stretch HSV"),
|
N_("<Image>/Image/Colors/Auto-Stretch HSV"),
|
||||||
"RGB*, INDEXED*",
|
"RGB*, INDEXED*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs, nreturn_vals,
|
nargs, nreturn_vals,
|
||||||
|
|
|
@ -231,7 +231,7 @@ query ()
|
||||||
"Peter Kirchgessner",
|
"Peter Kirchgessner",
|
||||||
"Peter Kirchgessner (peter@kirchgessner.net)",
|
"Peter Kirchgessner (peter@kirchgessner.net)",
|
||||||
"1997",
|
"1997",
|
||||||
_("<Image>/Image/Channel Ops/Compose"),
|
N_("<Image>/Image/Channel Ops/Compose"),
|
||||||
"GRAY*",
|
"GRAY*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs, nreturn_vals,
|
nargs, nreturn_vals,
|
||||||
|
|
|
@ -219,7 +219,7 @@ query ()
|
||||||
"Peter Kirchgessner",
|
"Peter Kirchgessner",
|
||||||
"Peter Kirchgessner (peter@kirchgessner.net)",
|
"Peter Kirchgessner (peter@kirchgessner.net)",
|
||||||
"1997",
|
"1997",
|
||||||
_("<Image>/Image/Channel Ops/Decompose"),
|
N_("<Image>/Image/Channel Ops/Decompose"),
|
||||||
"RGB*",
|
"RGB*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs, nreturn_vals,
|
nargs, nreturn_vals,
|
||||||
|
|
|
@ -214,7 +214,7 @@ query ()
|
||||||
"Adrian Likins, Reagan Blundell",
|
"Adrian Likins, Reagan Blundell",
|
||||||
"Adrian Likins, Reagan Blundell, Daniel Risacher, Spencer Kimball and Peter Mattis",
|
"Adrian Likins, Reagan Blundell, Daniel Risacher, Spencer Kimball and Peter Mattis",
|
||||||
"1995-1997",
|
"1995-1997",
|
||||||
_("<Image>/File/Mail image"),
|
N_("<Image>/File/Mail image"),
|
||||||
"RGB*, GRAY*, INDEXED*",
|
"RGB*, GRAY*, INDEXED*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs, nreturn_vals,
|
nargs, nreturn_vals,
|
||||||
|
|
|
@ -334,7 +334,7 @@ query(void)
|
||||||
"Michael Sweet <mike@easysw.com>",
|
"Michael Sweet <mike@easysw.com>",
|
||||||
"Copyright 1997-1998 by Michael Sweet",
|
"Copyright 1997-1998 by Michael Sweet",
|
||||||
PLUG_IN_VERSION,
|
PLUG_IN_VERSION,
|
||||||
_("<Image>/File/Print"),
|
N_("<Image>/File/Print"),
|
||||||
"RGB*,GRAY*,INDEXED*",
|
"RGB*,GRAY*,INDEXED*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs,
|
nargs,
|
||||||
|
|
|
@ -1105,7 +1105,8 @@ script_fu_interface (SFScript *script)
|
||||||
argc = 1;
|
argc = 1;
|
||||||
argv = g_new (gchar *, 1);
|
argv = g_new (gchar *, 1);
|
||||||
argv[0] = g_strdup ("script-fu");
|
argv[0] = g_strdup ("script-fu");
|
||||||
|
|
||||||
|
gtk_set_locale();
|
||||||
gtk_init (&argc, &argv);
|
gtk_init (&argc, &argv);
|
||||||
gtk_rc_parse (gimp_gtkrc ());
|
gtk_rc_parse (gimp_gtkrc ());
|
||||||
|
|
||||||
|
|
|
@ -1105,7 +1105,8 @@ script_fu_interface (SFScript *script)
|
||||||
argc = 1;
|
argc = 1;
|
||||||
argv = g_new (gchar *, 1);
|
argv = g_new (gchar *, 1);
|
||||||
argv[0] = g_strdup ("script-fu");
|
argv[0] = g_strdup ("script-fu");
|
||||||
|
|
||||||
|
gtk_set_locale();
|
||||||
gtk_init (&argc, &argv);
|
gtk_init (&argc, &argv);
|
||||||
gtk_rc_parse (gimp_gtkrc ());
|
gtk_rc_parse (gimp_gtkrc ());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue