mirror of https://github.com/GNOME/gimp.git
initial merge of the internationalization stuff. It's still broken in a
* initial merge of the internationalization stuff. It's still broken in a couple places, so you're probably better off running configure with --disable-nls (gimp-mgomulin-980727-0) -Yosh
This commit is contained in:
parent
a36ef3fcb9
commit
ecfa2b8362
|
@ -0,0 +1,225 @@
|
|||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do *not*
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
One advise in advance
|
||||
=====================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias or message inheritance) as the
|
||||
implementation here. It is also not possible to offer this additional
|
||||
functionality on top of a `catgets' implementation. Future versions of
|
||||
GNU `gettext' will very likely convey even more functionality. So it
|
||||
might be a good idea to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need not provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system provides
|
||||
usable `catgets' (if using this is selected by the installer) or
|
||||
`gettext' functions. If neither is available, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is *not* required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --with-catgets
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `catgets' or `gettext' to use
|
||||
the internationalizing routines provided within this package, enable
|
||||
the use of the `catgets' functions (if found on the locale system), or
|
||||
else, *totally* disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
By default the configuration process will not test for the `catgets'
|
||||
function and therefore they will not be used. The reasons are already
|
||||
given above: the emulation on top of `catgets' cannot provide all the
|
||||
extensions provided by the GNU `gettext' library. If you nevertheless
|
||||
want to use the `catgets' functions use
|
||||
|
||||
./configure --with-catgets
|
||||
|
||||
to enable the test for `catgets' (this causes no harm if `catgets' is
|
||||
not available on your system). If you really select this option we
|
||||
would like to hear about the reasons because we cannot think of any
|
||||
good one ourself.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
ISO 639 `LL' two-letter code prior to using the programs in the
|
||||
package. For example, let's suppose that you speak German. At the
|
||||
shell prompt, merely execute `setenv LANG de' (in `csh'),
|
||||
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
|
||||
can be done from your `.login' or `.profile' file, once and for all.
|
||||
|
||||
An operating system might already offer message localization for
|
||||
many of its programs, while other programs have been installed locally
|
||||
with the full capabilities of GNU `gettext'. Just using `gettext'
|
||||
extended syntax for `LANG' would break proper localization of already
|
||||
available operating system programs. In this case, users should set
|
||||
both `LANGUAGE' and `LANG' variables in their environment, as programs
|
||||
using GNU `gettext' give preference to `LANGUAGE'. For example, some
|
||||
Swedish users would rather read translations in German than English for
|
||||
when Swedish is not available. This is easily accomplished by setting
|
||||
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list, courtesy of Linux
|
||||
International. You may reach your translation team at the address
|
||||
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
|
||||
language. Language codes are *not* the same as the country codes given
|
||||
in ISO 3166. The following translation teams exist, as of August 1997:
|
||||
|
||||
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
|
||||
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
|
||||
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
|
||||
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
|
||||
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
|
||||
Swedish `sv', and Turkish `tr'.
|
||||
|
||||
For example, you may reach the Chinese translation team by writing to
|
||||
`zh@li.org'.
|
||||
|
||||
If you'd like to volunteer to *work* at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is *not* the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
*actively* in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of August
|
||||
1997. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination.
|
||||
|
||||
Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
|
||||
.-------------------------------------------------.
|
||||
bash | [] [] [] | 3
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] [] | 4
|
||||
cpio | [] [] [] [] [] | 5
|
||||
diffutils | [] [] [] [] [] | 5
|
||||
enscript | [] [] [] [] [] [] | 6
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
findutils | [] [] [] [] [] [] [] [] | 8
|
||||
flex | [] [] [] [] | 4
|
||||
gcal | [] [] [] [] [] | 5
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] | 11
|
||||
grep | [] [] [] [] [] [] [] [] [] | 9
|
||||
hello | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
id-utils | [] [] [] | 3
|
||||
indent | [] [] [] [] | 4
|
||||
libc | [] [] [] [] [] [] [] | 7
|
||||
m4 | [] [] [] [] [] | 5
|
||||
make | [] [] [] [] [] [] | 6
|
||||
music | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] [] | 8
|
||||
recode | [] [] [] [] [] [] [] [] [] | 9
|
||||
sh-utils | [] [] [] [] [] [] [] | 7
|
||||
sharutils | [] [] [] [] [] | 5
|
||||
tar | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
texinfo | [] | 1
|
||||
textutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`-------------------------------------------------'
|
||||
16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
|
||||
27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If August 1997 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
Wed Aug 5 16:29:05 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* initial merge of the internationalization stuff. It's still
|
||||
broken in a couple places, so you're probably better off running
|
||||
configure with --disable-nls (gimp-mgomulin-980727-0)
|
||||
|
||||
Wed Aug 5 23:31:54 MEST 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/*.scm (well, almost): Changed all
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = libgimp plug-ins app data
|
||||
SUBDIRS = po intl libgimp plug-ins app data
|
||||
|
||||
bin_SCRIPTS = gimptool
|
||||
|
||||
|
|
|
@ -14,9 +14,13 @@
|
|||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
#undef ENABLE_NLS
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_DOPRNT
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_NDIR_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
|
|
@ -326,6 +326,7 @@ CPPFLAGS = \
|
|||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/intl \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#include "about_dialog.h"
|
||||
#include "interface.h"
|
||||
|
||||
|
@ -139,12 +141,13 @@ about_dialog_create (int timeout)
|
|||
GtkWidget *alignment;
|
||||
gint max_width;
|
||||
gint i;
|
||||
gchar *label_text;
|
||||
|
||||
if (!about_dialog)
|
||||
{
|
||||
about_dialog = gtk_window_new (GTK_WINDOW_DIALOG);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (about_dialog), "about_dialog", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), "About the GIMP");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About the GIMP"));
|
||||
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
|
||||
gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
|
||||
|
@ -187,14 +190,18 @@ about_dialog_create (int timeout)
|
|||
|
||||
style = gtk_style_new ();
|
||||
gdk_font_unref (style->font);
|
||||
style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*");
|
||||
style->font = gdk_font_load (_("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"));
|
||||
gtk_widget_push_style (style);
|
||||
|
||||
label = gtk_label_new ("Version " GIMP_VERSION " brought to you by");
|
||||
label_text=g_malloc(strlen(_("Version ")) + strlen(GIMP_VERSION) +
|
||||
strlen(_(" brought to you by")) * sizeof(gchar));
|
||||
sprintf(label_text, "%s%s%s", _("Version "), GIMP_VERSION, _(" brought to you by"));
|
||||
label = gtk_label_new (label_text);
|
||||
g_free(label_text); label_text=NULL;
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new ("Spencer Kimball and Peter Mattis");
|
||||
label = gtk_label_new (_("Spencer Kimball and Peter Mattis"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -227,7 +234,7 @@ about_dialog_create (int timeout)
|
|||
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
|
||||
gtk_widget_show (scroll_area);
|
||||
|
||||
label = gtk_label_new ("Please visit http://www.gimp.org/ for more info");
|
||||
label = gtk_label_new (_("Please visit http://www.gimp.org/ for more info"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#include "about_dialog.h"
|
||||
#include "interface.h"
|
||||
|
||||
|
@ -139,12 +141,13 @@ about_dialog_create (int timeout)
|
|||
GtkWidget *alignment;
|
||||
gint max_width;
|
||||
gint i;
|
||||
gchar *label_text;
|
||||
|
||||
if (!about_dialog)
|
||||
{
|
||||
about_dialog = gtk_window_new (GTK_WINDOW_DIALOG);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (about_dialog), "about_dialog", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), "About the GIMP");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About the GIMP"));
|
||||
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
|
||||
gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
|
||||
|
@ -187,14 +190,18 @@ about_dialog_create (int timeout)
|
|||
|
||||
style = gtk_style_new ();
|
||||
gdk_font_unref (style->font);
|
||||
style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*");
|
||||
style->font = gdk_font_load (_("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"));
|
||||
gtk_widget_push_style (style);
|
||||
|
||||
label = gtk_label_new ("Version " GIMP_VERSION " brought to you by");
|
||||
label_text=g_malloc(strlen(_("Version ")) + strlen(GIMP_VERSION) +
|
||||
strlen(_(" brought to you by")) * sizeof(gchar));
|
||||
sprintf(label_text, "%s%s%s", _("Version "), GIMP_VERSION, _(" brought to you by"));
|
||||
label = gtk_label_new (label_text);
|
||||
g_free(label_text); label_text=NULL;
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new ("Spencer Kimball and Peter Mattis");
|
||||
label = gtk_label_new (_("Spencer Kimball and Peter Mattis"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -227,7 +234,7 @@ about_dialog_create (int timeout)
|
|||
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
|
||||
gtk_widget_show (scroll_area);
|
||||
|
||||
label = gtk_label_new ("Please visit http://www.gimp.org/ for more info");
|
||||
label = gtk_label_new (_("Please visit http://www.gimp.org/ for more info"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#include "about_dialog.h"
|
||||
#include "interface.h"
|
||||
|
||||
|
@ -139,12 +141,13 @@ about_dialog_create (int timeout)
|
|||
GtkWidget *alignment;
|
||||
gint max_width;
|
||||
gint i;
|
||||
gchar *label_text;
|
||||
|
||||
if (!about_dialog)
|
||||
{
|
||||
about_dialog = gtk_window_new (GTK_WINDOW_DIALOG);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (about_dialog), "about_dialog", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), "About the GIMP");
|
||||
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About the GIMP"));
|
||||
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
|
||||
gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
|
||||
|
@ -187,14 +190,18 @@ about_dialog_create (int timeout)
|
|||
|
||||
style = gtk_style_new ();
|
||||
gdk_font_unref (style->font);
|
||||
style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*");
|
||||
style->font = gdk_font_load (_("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"));
|
||||
gtk_widget_push_style (style);
|
||||
|
||||
label = gtk_label_new ("Version " GIMP_VERSION " brought to you by");
|
||||
label_text=g_malloc(strlen(_("Version ")) + strlen(GIMP_VERSION) +
|
||||
strlen(_(" brought to you by")) * sizeof(gchar));
|
||||
sprintf(label_text, "%s%s%s", _("Version "), GIMP_VERSION, _(" brought to you by"));
|
||||
label = gtk_label_new (label_text);
|
||||
g_free(label_text); label_text=NULL;
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new ("Spencer Kimball and Peter Mattis");
|
||||
label = gtk_label_new (_("Spencer Kimball and Peter Mattis"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -227,7 +234,7 @@ about_dialog_create (int timeout)
|
|||
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
|
||||
gtk_widget_show (scroll_area);
|
||||
|
||||
label = gtk_label_new ("Please visit http://www.gimp.org/ for more info");
|
||||
label = gtk_label_new (_("Please visit http://www.gimp.org/ for more info"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
|
366
app/gui/menus.c
366
app/gui/menus.c
|
@ -33,192 +33,197 @@
|
|||
#include "gdisplay.h"
|
||||
#include "docindex.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof ("/File/MRU00")
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof (N_("/File/MRU00"))
|
||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||
|
||||
static void menus_init (void);
|
||||
static GtkItemFactoryEntry * translate_entries (GtkItemFactoryEntry *, gint);
|
||||
static void free_translated_entries(GtkItemFactoryEntry *, gint);
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
static GtkItemFactoryEntry toolbox_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 0 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/About...", NULL, about_dialog_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/Tip of the day", NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Dialogs/Error Console...", NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 0 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/About..."), NULL, about_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/Tip of the day"), NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Tool Options..."), "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Document Index..."), NULL, raise_idea_callback, 0 },
|
||||
{ N_("/File/Dialogs/Error Console..."), NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
static GtkItemFactory *toolbox_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry file_menu_separator = { "/File/---", NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 };
|
||||
static GtkItemFactoryEntry file_menu_separator = { N_("/File/---"), NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 };
|
||||
|
||||
static GtkItemFactoryEntry image_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 1 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/Save", "<control>S", file_save_cmd_callback, 0 },
|
||||
{ "/File/Save as", NULL, file_save_as_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 1 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/Save"), "<control>S", file_save_cmd_callback, 0 },
|
||||
{ N_("/File/Save as"), NULL, file_save_as_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
|
||||
{ "/File/Close", "<control>W", file_close_cmd_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Close"), "<control>W", file_close_cmd_callback, 0 },
|
||||
{ N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Edit/Cut", "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy", "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste", "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Into", NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ "/Edit/Clear", "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ "/Edit/Fill", "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ "/Edit/Stroke", NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ "/Edit/Undo", "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ "/Edit/Redo", "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Edit/Cut Named", "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy Named", "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Named", "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut"), "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy"), "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste"), "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Into"), NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ N_("/Edit/Clear"), "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ N_("/Edit/Fill"), "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ N_("/Edit/Stroke"), NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ N_("/Edit/Undo"), "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ N_("/Edit/Redo"), "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut Named"), "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy Named"), "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Named"), "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Select/Toggle", "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ "/Select/Invert", "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ "/Select/All", "<control>A", select_all_cmd_callback, 0 },
|
||||
{ "/Select/None", "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ "/Select/Float", "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ "/Select/Sharpen", "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ "/Select/Border", "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ "/Select/Feather", "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ "/Select/Grow", NULL, select_grow_cmd_callback, 0 },
|
||||
{ "/Select/Shrink", NULL, select_shrink_cmd_callback, 0 },
|
||||
{ "/Select/Save To Channel", NULL, select_save_cmd_callback, 0 },
|
||||
{ N_("/Select/Toggle"), "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ N_("/Select/Invert"), "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ N_("/Select/All"), "<control>A", select_all_cmd_callback, 0 },
|
||||
{ N_("/Select/None"), "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ N_("/Select/Float"), "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ N_("/Select/Sharpen"), "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ N_("/Select/Border"), "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ N_("/Select/Feather"), "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ N_("/Select/Grow"), NULL, select_grow_cmd_callback, 0 },
|
||||
{ N_("/Select/Shrink"), NULL, select_shrink_cmd_callback, 0 },
|
||||
{ N_("/Select/Save To Channel"), NULL, select_save_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Select/By Color...", NULL, tools_select_cmd_callback, BY_COLOR_SELECT },
|
||||
*/
|
||||
{ "/View/Zoom In", "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ "/View/Zoom Out", "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ "/View/Zoom/16:1", NULL, view_zoom_16_1_callback, 0 },
|
||||
{ "/View/Zoom/8:1", NULL, view_zoom_8_1_callback, 0 },
|
||||
{ "/View/Zoom/4:1", NULL, view_zoom_4_1_callback, 0 },
|
||||
{ "/View/Zoom/2:1", NULL, view_zoom_2_1_callback, 0 },
|
||||
{ "/View/Zoom/1:1", "1", view_zoom_1_1_callback, 0 },
|
||||
{ "/View/Zoom/1:2", NULL, view_zoom_1_2_callback, 0 },
|
||||
{ "/View/Zoom/1:4", NULL, view_zoom_1_4_callback, 0 },
|
||||
{ "/View/Zoom/1:8", NULL, view_zoom_1_8_callback, 0 },
|
||||
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
|
||||
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/View/New View", NULL, view_new_view_cmd_callback, 0 },
|
||||
{ "/View/Shrink Wrap", "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom/16:1"), NULL, view_zoom_16_1_callback, 0 },
|
||||
{ N_("/View/Zoom/8:1"), NULL, view_zoom_8_1_callback, 0 },
|
||||
{ N_("/View/Zoom/4:1"), NULL, view_zoom_4_1_callback, 0 },
|
||||
{ N_("/View/Zoom/2:1"), NULL, view_zoom_2_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:1"), "1", view_zoom_1_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:2"), NULL, view_zoom_1_2_callback, 0 },
|
||||
{ N_("/View/Zoom/1:4"), NULL, view_zoom_1_4_callback, 0 },
|
||||
{ N_("/View/Zoom/1:8"), NULL, view_zoom_1_8_callback, 0 },
|
||||
{ N_("/View/Zoom/1:16"), NULL, view_zoom_1_16_callback, 0 },
|
||||
{ N_("/View/Window Info..."), "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ N_("/View/Toggle Rulers"), "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Statusbar"), "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Guides"), "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Snap To Guides"), NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/View/New View"), NULL, view_new_view_cmd_callback, 0 },
|
||||
{ N_("/View/Shrink Wrap"), "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/Colors/Equalize", NULL, image_equalize_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Invert", NULL, image_invert_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Equalize"), NULL, image_equalize_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Invert"), NULL, image_invert_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Image/Colors/Posterize", NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ "/Image/Colors/Threshold", NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Color Balance", NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ "/Image/Colors/Brightness-Contrast", NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ "/Image/Colors/Hue-Saturation", NULL, tools_select_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Curves", NULL, tools_select_cmd_callback, CURVES },
|
||||
{ "/Image/Colors/Levels", NULL, tools_select_cmd_callback, LEVELS },
|
||||
{ N_("/Image/Colors/Posterize"), NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ N_("/Image/Colors/Threshold"), NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Color Balance"), NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ N_("/Image/Colors/Brightness-Contrast"), NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ N_("/Image/Colors/Hue-Saturation"), NULL, tools_select_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Curves"), NULL, tools_select_cmd_callback, CURVES },
|
||||
{ N_("/Image/Colors/Levels"), NULL, tools_select_cmd_callback, LEVELS },
|
||||
*/
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Desaturate", NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Duplicate", "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Offset", "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ "/Image/Alpha/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Desaturate"), NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Duplicate"), "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Offset"), "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ N_("/Image/Alpha/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/RGB", NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ "/Image/Grayscale", NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ "/Image/Indexed", NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Resize", NULL, image_resize_cmd_callback, 0 },
|
||||
{ "/Image/Scale", NULL, image_scale_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { "/Image/Histogram", NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/RGB"), NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ N_("/Image/Grayscale"), NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ N_("/Image/Indexed"), NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Resize"), NULL, image_resize_cmd_callback, 0 },
|
||||
{ N_("/Image/Scale"), NULL, image_scale_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Image/Histogram"), NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Layers/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Layers/Raise Layer", "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ "/Layers/Lower Layer", "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ "/Layers/Anchor Layer", "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ "/Layers/Merge Visible Layers", "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ "/Layers/Flatten Image", NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ "/Layers/Alpha To Selection", NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ "/Layers/Mask To Selection", NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ "/Layers/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Layers/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Layers/Raise Layer"), "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ N_("/Layers/Lower Layer"), "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ N_("/Layers/Anchor Layer"), "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ N_("/Layers/Merge Visible Layers"), "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ N_("/Layers/Flatten Image"), NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ N_("/Layers/Alpha To Selection"), NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Mask To Selection"), NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
/* { "/Tools/Rect Select", "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ "/Tools/Ellipse Select", "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ "/Tools/Free Select", "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ "/Tools/Fuzzy Select", "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ "/Tools/Bezier Select", "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ "/Tools/Intelligent Scissors", "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ "/Tools/Move", "M", tools_select_cmd_callback, MOVE },
|
||||
{ "/Tools/Magnify", "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ "/Tools/Crop", "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ "/Tools/Transform", "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ "/Tools/Flip", "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ "/Tools/Text", "T", tools_select_cmd_callback, TEXT },
|
||||
{ "/Tools/Color Picker", "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ "/Tools/Bucket Fill", "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ "/Tools/Blend", "L", tools_select_cmd_callback, BLEND },
|
||||
{ "/Tools/Paintbrush", "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ "/Tools/Pencil", "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ "/Tools/Eraser", "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ "/Tools/Airbrush", "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ "/Tools/Clone", "C", tools_select_cmd_callback, CLONE },
|
||||
{ "/Tools/Convolve", "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ "/Tools/Ink", "K", tools_select_cmd_callback, INK },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ "/Tools/Toolbox", NULL, toolbox_raise_callback, 0 },
|
||||
{ "/Tools/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ "/Filters/", NULL, NULL, 0 },
|
||||
{ "/Filters/Repeat last", "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ "/Filters/Re-show last", "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ "/Filters/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Tools/Rect Select"), "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ N_("/Tools/Ellipse Select"), "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ N_("/Tools/Free Select"), "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ N_("/Tools/Fuzzy Select"), "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ N_("/Tools/Bezier Select"), "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ N_("/Tools/Intelligent Scissors"), "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ N_("/Tools/Move"), "M", tools_select_cmd_callback, MOVE },
|
||||
{ N_("/Tools/Magnify"), "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ N_("/Tools/Crop"), "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ N_("/Tools/Transform"), "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ N_("/Tools/Flip"), "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ N_("/Tools/Text"), "T", tools_select_cmd_callback, TEXT },
|
||||
{ N_("/Tools/Color Picker"), "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ N_("/Tools/Bucket Fill"), "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ N_("/Tools/Blend"), "L", tools_select_cmd_callback, BLEND },
|
||||
{ N_("/Tools/Paintbrush"), "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ N_("/Tools/Pencil"), "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ N_("/Tools/Eraser"), "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ N_("/Tools/Airbrush"), "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ N_("/Tools/Clone"), "C", tools_select_cmd_callback, CLONE },
|
||||
{ N_("/Tools/Convolve"), "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ N_("/Tools/Ink"), "K", tools_select_cmd_callback, INK },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ N_("/Tools/Toolbox"), NULL, toolbox_raise_callback, 0 },
|
||||
{ N_("/Tools/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ N_("/Filters/"), NULL, NULL, 0 },
|
||||
{ N_("/Filters/Repeat last"), "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ N_("/Filters/Re-show last"), "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ N_("/Filters/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Script-Fu/", NULL, NULL, 0 },
|
||||
{ N_("/Script-Fu/"), NULL, NULL, 0 },
|
||||
|
||||
{ "/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Dialogs/Indexed Palette...", NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Tool Options...", NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Indexed Palette..."), NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Tool Options..."), NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_image_entries = sizeof (image_entries) / sizeof (image_entries[0]);
|
||||
static GtkItemFactory *image_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry load_entries[] =
|
||||
{
|
||||
{ "/Automatic", NULL, file_load_by_extension_callback, 0 },
|
||||
{ N_("/Automatic"), NULL, file_load_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_load_entries = sizeof (load_entries) / sizeof (load_entries[0]);
|
||||
|
@ -226,7 +231,7 @@ static GtkItemFactory *load_factory = NULL;
|
|||
|
||||
static GtkItemFactoryEntry save_entries[] =
|
||||
{
|
||||
{ "/By extension", NULL, file_save_by_extension_callback, 0 },
|
||||
{ N_("/By extension"), NULL, file_save_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_save_entries = sizeof (save_entries) / sizeof (save_entries[0]);
|
||||
|
@ -339,7 +344,7 @@ menus_set_sensitive (char *path,
|
|||
gtk_widget_set_sensitive (widget, sensitive);
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set sensitivity for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set sensitivity for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -364,7 +369,7 @@ menus_set_state (char *path,
|
|||
widget = NULL;
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set state for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set state for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -406,7 +411,7 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
|
|||
filename = prune_filename (raw_filename);
|
||||
|
||||
if (!file_open(raw_filename, filename))
|
||||
g_message ("Error opening file: %s\n", raw_filename);
|
||||
g_message (_("Error opening file: %s\n"), raw_filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -428,7 +433,7 @@ menus_last_opened_update_labels ()
|
|||
{
|
||||
g_string_sprintf (entry_filename, "%d. %s", i, prune_filename (((GString *) filename_slist->data)->str));
|
||||
|
||||
g_string_sprintf (path, "/File/MRU%02d", i);
|
||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
||||
|
||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||
gtk_widget_show (widget);
|
||||
|
@ -498,7 +503,7 @@ menus_init_mru ()
|
|||
last_opened_entries[i].callback_action = i;
|
||||
last_opened_entries[i].item_type = NULL;
|
||||
|
||||
sprintf (path, "/File/MRU%02d", i + 1);
|
||||
sprintf (path, _("/File/MRU%02d"), i + 1);
|
||||
sprintf (accelerator, "<control>%d", i + 1);
|
||||
}
|
||||
|
||||
|
@ -527,16 +532,51 @@ menus_init_mru ()
|
|||
void
|
||||
menus_init_toolbox ()
|
||||
{
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
toolbox_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<Toolbox>", NULL);
|
||||
translated_entries=translate_entries(toolbox_entries, n_toolbox_entries);
|
||||
gtk_item_factory_create_items_ac (toolbox_factory, n_toolbox_entries,
|
||||
toolbox_entries, NULL, 2);
|
||||
translated_entries, NULL, 2);
|
||||
free_translated_entries(translated_entries, n_toolbox_entries);
|
||||
menus_init_mru ();
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry *
|
||||
translate_entries (GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
GtkItemFactoryEntry *ret;
|
||||
|
||||
ret=g_malloc( sizeof(GtkItemFactoryEntry) * n );
|
||||
for (i=0; i<n; i++) {
|
||||
/* Translation. Note the explicit use of gettext(). */
|
||||
ret[i].path=g_strdup( gettext(entries[i].path) );
|
||||
/* accelerator and item_type are not duped, only referenced */
|
||||
ret[i].accelerator=entries[i].accelerator;
|
||||
ret[i].callback=entries[i].callback;
|
||||
ret[i].callback_action=entries[i].callback_action;
|
||||
ret[i].item_type=entries[i].item_type;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
free_translated_entries(GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i=0; i<n; i++)
|
||||
g_free(entries[i].path);
|
||||
g_free(entries);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
menus_init ()
|
||||
{
|
||||
int i;
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
if (initialize)
|
||||
{
|
||||
|
@ -547,20 +587,26 @@ menus_init ()
|
|||
menus_init_toolbox ();
|
||||
|
||||
image_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Image>", NULL);
|
||||
translated_entries=translate_entries(image_entries, n_image_entries);
|
||||
gtk_item_factory_create_items_ac (image_factory,
|
||||
n_image_entries,
|
||||
image_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_image_entries);
|
||||
load_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Load>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_load_entries);
|
||||
gtk_item_factory_create_items_ac (load_factory,
|
||||
n_load_entries,
|
||||
load_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_load_entries);
|
||||
save_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Save>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_save_entries);
|
||||
gtk_item_factory_create_items_ac (save_factory,
|
||||
n_save_entries,
|
||||
save_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_save_entries);
|
||||
for (i = 0; i < num_tools; i++)
|
||||
{
|
||||
/* FIXME this need to use access functions to check a flag */
|
||||
|
|
68
app/main.c
68
app/main.c
|
@ -36,6 +36,8 @@
|
|||
#include "errors.h"
|
||||
#include "install.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
static RETSIGTYPE on_signal (int);
|
||||
static RETSIGTYPE on_sig_child (int);
|
||||
static void init (void);
|
||||
|
@ -97,6 +99,14 @@ main (int argc, char **argv)
|
|||
/* Initialize Gtk toolkit */
|
||||
gtk_set_locale ();
|
||||
setlocale(LC_NUMERIC, "C"); /* must use dot, not comma, as decimal separator */
|
||||
/* Initialize i18n support */
|
||||
|
||||
#ifdef HAVE_LC_MESSAGES
|
||||
setlocale(LC_MESSAGES, "");
|
||||
#endif
|
||||
bindtextdomain("gimp", LOCALEDIR);
|
||||
textdomain("gimp");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
#ifdef HAVE_LIBGLE
|
||||
|
@ -224,28 +234,28 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
if (show_version)
|
||||
g_print ("GIMP version " GIMP_VERSION "\n");
|
||||
g_print ( "%s %s\n", _("GIMP version"), GIMP_VERSION);
|
||||
|
||||
if (show_help)
|
||||
{
|
||||
g_print ("\007Usage: %s [option ...] [files ...]\n", argv[0]);
|
||||
g_print ("Valid options are:\n");
|
||||
g_print (" -h --help Output this help.\n");
|
||||
g_print (" -v --version Output version info.\n");
|
||||
g_print (" -b --batch <commands> Run in batch mode.\n");
|
||||
g_print (" -g --gimprc <gimprc> Use an alternate gimprc file.\n");
|
||||
g_print (" -n --no-interface Run without a user interface.\n");
|
||||
g_print (" -r --restore-session Try to restore saved session.\n");
|
||||
g_print (" --no-data Do not load patterns, gradients, palettes, brushes.\n");
|
||||
g_print (" --verbose Show startup messages.\n");
|
||||
g_print (" --no-splash Do not show the startup window.\n");
|
||||
g_print (" --no-splash-image Do not add an image to the startup window.\n");
|
||||
g_print (" --no-shm Do not use shared memory between GIMP and its plugins.\n");
|
||||
g_print (" --no-xshm Do not use the X Shared Memory extension.\n");
|
||||
g_print (" --console-messages Display warnings to console instead of a dialog box.\n");
|
||||
g_print (" --debug-handlers Enable debugging signal handlers.\n");
|
||||
g_print (" --display <display> Use the designated X display.\n\n");
|
||||
g_print (" --system-gimprc <gimprc> Use an alternate system gimprc file.\n");
|
||||
g_print (_("\007Usage: %s [option ...] [files ...]\n"), argv[0]);
|
||||
g_print (_("Valid options are:\n"));
|
||||
g_print (_(" -h --help Output this help.\n"));
|
||||
g_print (_(" -v --version Output version info.\n"));
|
||||
g_print (_(" -b --batch <commands> Run in batch mode.\n"));
|
||||
g_print (_(" -g --gimprc <gimprc> Use an alternate gimprc file.\n"));
|
||||
g_print (_(" -n --no-interface Run without a user interface.\n"));
|
||||
g_print (_(" -r --restore-session Try to restore saved session.\n"));
|
||||
g_print (_(" --no-data Do not load patterns, gradients, palettes, brushes.\n"));
|
||||
g_print (_(" --verbose Show startup messages.\n"));
|
||||
g_print (_(" --no-splash Do not show the startup window.\n"));
|
||||
g_print (_(" --no-splash-image Do not add an image to the startup window.\n"));
|
||||
g_print (_(" --no-shm Do not use shared memory between GIMP and its plugins.\n"));
|
||||
g_print (_(" --no-xshm Do not use the X Shared Memory extension.\n"));
|
||||
g_print (_(" --console-messages Display warnings to console instead of a dialog box.\n"));
|
||||
g_print (_(" --debug-handlers Enable debugging signal handlers.\n"));
|
||||
g_print (_(" --display <display> Use the designated X display.\n\n"));
|
||||
g_print (_(" --system-gimprc <gimprc> Use an alternate system gimprc file.\n"));
|
||||
}
|
||||
|
||||
if (show_version || show_help)
|
||||
|
@ -301,34 +311,34 @@ on_signal (int sig_num)
|
|||
switch (sig_num)
|
||||
{
|
||||
case SIGHUP:
|
||||
terminate ("sighup caught");
|
||||
terminate (_("sighup caught"));
|
||||
break;
|
||||
case SIGINT:
|
||||
terminate ("sigint caught");
|
||||
terminate (_("sigint caught"));
|
||||
break;
|
||||
case SIGQUIT:
|
||||
terminate ("sigquit caught");
|
||||
terminate (_("sigquit caught"));
|
||||
break;
|
||||
case SIGABRT:
|
||||
terminate ("sigabrt caught");
|
||||
terminate (_("sigabrt caught"));
|
||||
break;
|
||||
case SIGBUS:
|
||||
fatal_error ("sigbus caught");
|
||||
fatal_error (_("sigbus caught"));
|
||||
break;
|
||||
case SIGSEGV:
|
||||
fatal_error ("sigsegv caught");
|
||||
fatal_error (_("sigsegv caught"));
|
||||
break;
|
||||
case SIGPIPE:
|
||||
terminate ("sigpipe caught");
|
||||
terminate (_("sigpipe caught"));
|
||||
break;
|
||||
case SIGTERM:
|
||||
terminate ("sigterm caught");
|
||||
terminate (_("sigterm caught"));
|
||||
break;
|
||||
case SIGFPE:
|
||||
fatal_error ("sigfpe caught");
|
||||
fatal_error (_("sigfpe caught"));
|
||||
break;
|
||||
default:
|
||||
fatal_error ("unknown signal");
|
||||
fatal_error (_("unknown signal"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
366
app/menus.c
366
app/menus.c
|
@ -33,192 +33,197 @@
|
|||
#include "gdisplay.h"
|
||||
#include "docindex.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof ("/File/MRU00")
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof (N_("/File/MRU00"))
|
||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||
|
||||
static void menus_init (void);
|
||||
static GtkItemFactoryEntry * translate_entries (GtkItemFactoryEntry *, gint);
|
||||
static void free_translated_entries(GtkItemFactoryEntry *, gint);
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
static GtkItemFactoryEntry toolbox_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 0 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/About...", NULL, about_dialog_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/Tip of the day", NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Dialogs/Error Console...", NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 0 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/About..."), NULL, about_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/Tip of the day"), NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Tool Options..."), "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Document Index..."), NULL, raise_idea_callback, 0 },
|
||||
{ N_("/File/Dialogs/Error Console..."), NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
static GtkItemFactory *toolbox_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry file_menu_separator = { "/File/---", NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 };
|
||||
static GtkItemFactoryEntry file_menu_separator = { N_("/File/---"), NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 };
|
||||
|
||||
static GtkItemFactoryEntry image_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 1 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/Save", "<control>S", file_save_cmd_callback, 0 },
|
||||
{ "/File/Save as", NULL, file_save_as_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 1 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/Save"), "<control>S", file_save_cmd_callback, 0 },
|
||||
{ N_("/File/Save as"), NULL, file_save_as_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
|
||||
{ "/File/Close", "<control>W", file_close_cmd_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Close"), "<control>W", file_close_cmd_callback, 0 },
|
||||
{ N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Edit/Cut", "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy", "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste", "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Into", NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ "/Edit/Clear", "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ "/Edit/Fill", "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ "/Edit/Stroke", NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ "/Edit/Undo", "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ "/Edit/Redo", "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Edit/Cut Named", "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy Named", "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Named", "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut"), "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy"), "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste"), "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Into"), NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ N_("/Edit/Clear"), "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ N_("/Edit/Fill"), "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ N_("/Edit/Stroke"), NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ N_("/Edit/Undo"), "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ N_("/Edit/Redo"), "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut Named"), "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy Named"), "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Named"), "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Select/Toggle", "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ "/Select/Invert", "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ "/Select/All", "<control>A", select_all_cmd_callback, 0 },
|
||||
{ "/Select/None", "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ "/Select/Float", "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ "/Select/Sharpen", "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ "/Select/Border", "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ "/Select/Feather", "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ "/Select/Grow", NULL, select_grow_cmd_callback, 0 },
|
||||
{ "/Select/Shrink", NULL, select_shrink_cmd_callback, 0 },
|
||||
{ "/Select/Save To Channel", NULL, select_save_cmd_callback, 0 },
|
||||
{ N_("/Select/Toggle"), "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ N_("/Select/Invert"), "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ N_("/Select/All"), "<control>A", select_all_cmd_callback, 0 },
|
||||
{ N_("/Select/None"), "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ N_("/Select/Float"), "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ N_("/Select/Sharpen"), "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ N_("/Select/Border"), "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ N_("/Select/Feather"), "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ N_("/Select/Grow"), NULL, select_grow_cmd_callback, 0 },
|
||||
{ N_("/Select/Shrink"), NULL, select_shrink_cmd_callback, 0 },
|
||||
{ N_("/Select/Save To Channel"), NULL, select_save_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Select/By Color...", NULL, tools_select_cmd_callback, BY_COLOR_SELECT },
|
||||
*/
|
||||
{ "/View/Zoom In", "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ "/View/Zoom Out", "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ "/View/Zoom/16:1", NULL, view_zoom_16_1_callback, 0 },
|
||||
{ "/View/Zoom/8:1", NULL, view_zoom_8_1_callback, 0 },
|
||||
{ "/View/Zoom/4:1", NULL, view_zoom_4_1_callback, 0 },
|
||||
{ "/View/Zoom/2:1", NULL, view_zoom_2_1_callback, 0 },
|
||||
{ "/View/Zoom/1:1", "1", view_zoom_1_1_callback, 0 },
|
||||
{ "/View/Zoom/1:2", NULL, view_zoom_1_2_callback, 0 },
|
||||
{ "/View/Zoom/1:4", NULL, view_zoom_1_4_callback, 0 },
|
||||
{ "/View/Zoom/1:8", NULL, view_zoom_1_8_callback, 0 },
|
||||
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
|
||||
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/View/New View", NULL, view_new_view_cmd_callback, 0 },
|
||||
{ "/View/Shrink Wrap", "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom/16:1"), NULL, view_zoom_16_1_callback, 0 },
|
||||
{ N_("/View/Zoom/8:1"), NULL, view_zoom_8_1_callback, 0 },
|
||||
{ N_("/View/Zoom/4:1"), NULL, view_zoom_4_1_callback, 0 },
|
||||
{ N_("/View/Zoom/2:1"), NULL, view_zoom_2_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:1"), "1", view_zoom_1_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:2"), NULL, view_zoom_1_2_callback, 0 },
|
||||
{ N_("/View/Zoom/1:4"), NULL, view_zoom_1_4_callback, 0 },
|
||||
{ N_("/View/Zoom/1:8"), NULL, view_zoom_1_8_callback, 0 },
|
||||
{ N_("/View/Zoom/1:16"), NULL, view_zoom_1_16_callback, 0 },
|
||||
{ N_("/View/Window Info..."), "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ N_("/View/Toggle Rulers"), "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Statusbar"), "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Guides"), "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Snap To Guides"), NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/View/New View"), NULL, view_new_view_cmd_callback, 0 },
|
||||
{ N_("/View/Shrink Wrap"), "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/Colors/Equalize", NULL, image_equalize_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Invert", NULL, image_invert_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Equalize"), NULL, image_equalize_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Invert"), NULL, image_invert_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Image/Colors/Posterize", NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ "/Image/Colors/Threshold", NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Color Balance", NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ "/Image/Colors/Brightness-Contrast", NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ "/Image/Colors/Hue-Saturation", NULL, tools_select_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Curves", NULL, tools_select_cmd_callback, CURVES },
|
||||
{ "/Image/Colors/Levels", NULL, tools_select_cmd_callback, LEVELS },
|
||||
{ N_("/Image/Colors/Posterize"), NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ N_("/Image/Colors/Threshold"), NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Color Balance"), NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ N_("/Image/Colors/Brightness-Contrast"), NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ N_("/Image/Colors/Hue-Saturation"), NULL, tools_select_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Curves"), NULL, tools_select_cmd_callback, CURVES },
|
||||
{ N_("/Image/Colors/Levels"), NULL, tools_select_cmd_callback, LEVELS },
|
||||
*/
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Desaturate", NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Duplicate", "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Offset", "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ "/Image/Alpha/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Desaturate"), NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Duplicate"), "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Offset"), "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ N_("/Image/Alpha/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/RGB", NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ "/Image/Grayscale", NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ "/Image/Indexed", NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Resize", NULL, image_resize_cmd_callback, 0 },
|
||||
{ "/Image/Scale", NULL, image_scale_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { "/Image/Histogram", NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/RGB"), NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ N_("/Image/Grayscale"), NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ N_("/Image/Indexed"), NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Resize"), NULL, image_resize_cmd_callback, 0 },
|
||||
{ N_("/Image/Scale"), NULL, image_scale_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Image/Histogram"), NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Layers/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Layers/Raise Layer", "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ "/Layers/Lower Layer", "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ "/Layers/Anchor Layer", "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ "/Layers/Merge Visible Layers", "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ "/Layers/Flatten Image", NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ "/Layers/Alpha To Selection", NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ "/Layers/Mask To Selection", NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ "/Layers/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Layers/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Layers/Raise Layer"), "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ N_("/Layers/Lower Layer"), "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ N_("/Layers/Anchor Layer"), "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ N_("/Layers/Merge Visible Layers"), "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ N_("/Layers/Flatten Image"), NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ N_("/Layers/Alpha To Selection"), NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Mask To Selection"), NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
/* { "/Tools/Rect Select", "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ "/Tools/Ellipse Select", "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ "/Tools/Free Select", "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ "/Tools/Fuzzy Select", "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ "/Tools/Bezier Select", "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ "/Tools/Intelligent Scissors", "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ "/Tools/Move", "M", tools_select_cmd_callback, MOVE },
|
||||
{ "/Tools/Magnify", "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ "/Tools/Crop", "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ "/Tools/Transform", "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ "/Tools/Flip", "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ "/Tools/Text", "T", tools_select_cmd_callback, TEXT },
|
||||
{ "/Tools/Color Picker", "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ "/Tools/Bucket Fill", "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ "/Tools/Blend", "L", tools_select_cmd_callback, BLEND },
|
||||
{ "/Tools/Paintbrush", "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ "/Tools/Pencil", "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ "/Tools/Eraser", "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ "/Tools/Airbrush", "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ "/Tools/Clone", "C", tools_select_cmd_callback, CLONE },
|
||||
{ "/Tools/Convolve", "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ "/Tools/Ink", "K", tools_select_cmd_callback, INK },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ "/Tools/Toolbox", NULL, toolbox_raise_callback, 0 },
|
||||
{ "/Tools/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ "/Filters/", NULL, NULL, 0 },
|
||||
{ "/Filters/Repeat last", "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ "/Filters/Re-show last", "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ "/Filters/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Tools/Rect Select"), "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ N_("/Tools/Ellipse Select"), "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ N_("/Tools/Free Select"), "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ N_("/Tools/Fuzzy Select"), "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ N_("/Tools/Bezier Select"), "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ N_("/Tools/Intelligent Scissors"), "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ N_("/Tools/Move"), "M", tools_select_cmd_callback, MOVE },
|
||||
{ N_("/Tools/Magnify"), "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ N_("/Tools/Crop"), "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ N_("/Tools/Transform"), "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ N_("/Tools/Flip"), "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ N_("/Tools/Text"), "T", tools_select_cmd_callback, TEXT },
|
||||
{ N_("/Tools/Color Picker"), "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ N_("/Tools/Bucket Fill"), "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ N_("/Tools/Blend"), "L", tools_select_cmd_callback, BLEND },
|
||||
{ N_("/Tools/Paintbrush"), "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ N_("/Tools/Pencil"), "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ N_("/Tools/Eraser"), "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ N_("/Tools/Airbrush"), "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ N_("/Tools/Clone"), "C", tools_select_cmd_callback, CLONE },
|
||||
{ N_("/Tools/Convolve"), "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ N_("/Tools/Ink"), "K", tools_select_cmd_callback, INK },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ N_("/Tools/Toolbox"), NULL, toolbox_raise_callback, 0 },
|
||||
{ N_("/Tools/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ N_("/Filters/"), NULL, NULL, 0 },
|
||||
{ N_("/Filters/Repeat last"), "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ N_("/Filters/Re-show last"), "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ N_("/Filters/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Script-Fu/", NULL, NULL, 0 },
|
||||
{ N_("/Script-Fu/"), NULL, NULL, 0 },
|
||||
|
||||
{ "/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Dialogs/Indexed Palette...", NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Tool Options...", NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Indexed Palette..."), NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Tool Options..."), NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_image_entries = sizeof (image_entries) / sizeof (image_entries[0]);
|
||||
static GtkItemFactory *image_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry load_entries[] =
|
||||
{
|
||||
{ "/Automatic", NULL, file_load_by_extension_callback, 0 },
|
||||
{ N_("/Automatic"), NULL, file_load_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_load_entries = sizeof (load_entries) / sizeof (load_entries[0]);
|
||||
|
@ -226,7 +231,7 @@ static GtkItemFactory *load_factory = NULL;
|
|||
|
||||
static GtkItemFactoryEntry save_entries[] =
|
||||
{
|
||||
{ "/By extension", NULL, file_save_by_extension_callback, 0 },
|
||||
{ N_("/By extension"), NULL, file_save_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_save_entries = sizeof (save_entries) / sizeof (save_entries[0]);
|
||||
|
@ -339,7 +344,7 @@ menus_set_sensitive (char *path,
|
|||
gtk_widget_set_sensitive (widget, sensitive);
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set sensitivity for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set sensitivity for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -364,7 +369,7 @@ menus_set_state (char *path,
|
|||
widget = NULL;
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set state for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set state for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -406,7 +411,7 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
|
|||
filename = prune_filename (raw_filename);
|
||||
|
||||
if (!file_open(raw_filename, filename))
|
||||
g_message ("Error opening file: %s\n", raw_filename);
|
||||
g_message (_("Error opening file: %s\n"), raw_filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -428,7 +433,7 @@ menus_last_opened_update_labels ()
|
|||
{
|
||||
g_string_sprintf (entry_filename, "%d. %s", i, prune_filename (((GString *) filename_slist->data)->str));
|
||||
|
||||
g_string_sprintf (path, "/File/MRU%02d", i);
|
||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
||||
|
||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||
gtk_widget_show (widget);
|
||||
|
@ -498,7 +503,7 @@ menus_init_mru ()
|
|||
last_opened_entries[i].callback_action = i;
|
||||
last_opened_entries[i].item_type = NULL;
|
||||
|
||||
sprintf (path, "/File/MRU%02d", i + 1);
|
||||
sprintf (path, _("/File/MRU%02d"), i + 1);
|
||||
sprintf (accelerator, "<control>%d", i + 1);
|
||||
}
|
||||
|
||||
|
@ -527,16 +532,51 @@ menus_init_mru ()
|
|||
void
|
||||
menus_init_toolbox ()
|
||||
{
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
toolbox_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<Toolbox>", NULL);
|
||||
translated_entries=translate_entries(toolbox_entries, n_toolbox_entries);
|
||||
gtk_item_factory_create_items_ac (toolbox_factory, n_toolbox_entries,
|
||||
toolbox_entries, NULL, 2);
|
||||
translated_entries, NULL, 2);
|
||||
free_translated_entries(translated_entries, n_toolbox_entries);
|
||||
menus_init_mru ();
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry *
|
||||
translate_entries (GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
GtkItemFactoryEntry *ret;
|
||||
|
||||
ret=g_malloc( sizeof(GtkItemFactoryEntry) * n );
|
||||
for (i=0; i<n; i++) {
|
||||
/* Translation. Note the explicit use of gettext(). */
|
||||
ret[i].path=g_strdup( gettext(entries[i].path) );
|
||||
/* accelerator and item_type are not duped, only referenced */
|
||||
ret[i].accelerator=entries[i].accelerator;
|
||||
ret[i].callback=entries[i].callback;
|
||||
ret[i].callback_action=entries[i].callback_action;
|
||||
ret[i].item_type=entries[i].item_type;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
free_translated_entries(GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i=0; i<n; i++)
|
||||
g_free(entries[i].path);
|
||||
g_free(entries);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
menus_init ()
|
||||
{
|
||||
int i;
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
if (initialize)
|
||||
{
|
||||
|
@ -547,20 +587,26 @@ menus_init ()
|
|||
menus_init_toolbox ();
|
||||
|
||||
image_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Image>", NULL);
|
||||
translated_entries=translate_entries(image_entries, n_image_entries);
|
||||
gtk_item_factory_create_items_ac (image_factory,
|
||||
n_image_entries,
|
||||
image_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_image_entries);
|
||||
load_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Load>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_load_entries);
|
||||
gtk_item_factory_create_items_ac (load_factory,
|
||||
n_load_entries,
|
||||
load_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_load_entries);
|
||||
save_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Save>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_save_entries);
|
||||
gtk_item_factory_create_items_ac (save_factory,
|
||||
n_save_entries,
|
||||
save_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_save_entries);
|
||||
for (i = 0; i < num_tools; i++)
|
||||
{
|
||||
/* FIXME this need to use access functions to check a flag */
|
||||
|
|
|
@ -33,192 +33,197 @@
|
|||
#include "gdisplay.h"
|
||||
#include "docindex.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof ("/File/MRU00")
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof (N_("/File/MRU00"))
|
||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||
|
||||
static void menus_init (void);
|
||||
static GtkItemFactoryEntry * translate_entries (GtkItemFactoryEntry *, gint);
|
||||
static void free_translated_entries(GtkItemFactoryEntry *, gint);
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
static GtkItemFactoryEntry toolbox_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 0 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/About...", NULL, about_dialog_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/Tip of the day", NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Dialogs/Error Console...", NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 0 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/About..."), NULL, about_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/Tip of the day"), NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Tool Options..."), "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Document Index..."), NULL, raise_idea_callback, 0 },
|
||||
{ N_("/File/Dialogs/Error Console..."), NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
static GtkItemFactory *toolbox_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry file_menu_separator = { "/File/---", NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 };
|
||||
static GtkItemFactoryEntry file_menu_separator = { N_("/File/---"), NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 };
|
||||
|
||||
static GtkItemFactoryEntry image_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 1 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/Save", "<control>S", file_save_cmd_callback, 0 },
|
||||
{ "/File/Save as", NULL, file_save_as_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 1 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/Save"), "<control>S", file_save_cmd_callback, 0 },
|
||||
{ N_("/File/Save as"), NULL, file_save_as_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
|
||||
{ "/File/Close", "<control>W", file_close_cmd_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Close"), "<control>W", file_close_cmd_callback, 0 },
|
||||
{ N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Edit/Cut", "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy", "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste", "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Into", NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ "/Edit/Clear", "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ "/Edit/Fill", "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ "/Edit/Stroke", NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ "/Edit/Undo", "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ "/Edit/Redo", "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Edit/Cut Named", "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy Named", "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Named", "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut"), "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy"), "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste"), "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Into"), NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ N_("/Edit/Clear"), "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ N_("/Edit/Fill"), "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ N_("/Edit/Stroke"), NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ N_("/Edit/Undo"), "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ N_("/Edit/Redo"), "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut Named"), "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy Named"), "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Named"), "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Select/Toggle", "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ "/Select/Invert", "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ "/Select/All", "<control>A", select_all_cmd_callback, 0 },
|
||||
{ "/Select/None", "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ "/Select/Float", "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ "/Select/Sharpen", "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ "/Select/Border", "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ "/Select/Feather", "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ "/Select/Grow", NULL, select_grow_cmd_callback, 0 },
|
||||
{ "/Select/Shrink", NULL, select_shrink_cmd_callback, 0 },
|
||||
{ "/Select/Save To Channel", NULL, select_save_cmd_callback, 0 },
|
||||
{ N_("/Select/Toggle"), "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ N_("/Select/Invert"), "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ N_("/Select/All"), "<control>A", select_all_cmd_callback, 0 },
|
||||
{ N_("/Select/None"), "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ N_("/Select/Float"), "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ N_("/Select/Sharpen"), "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ N_("/Select/Border"), "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ N_("/Select/Feather"), "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ N_("/Select/Grow"), NULL, select_grow_cmd_callback, 0 },
|
||||
{ N_("/Select/Shrink"), NULL, select_shrink_cmd_callback, 0 },
|
||||
{ N_("/Select/Save To Channel"), NULL, select_save_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Select/By Color...", NULL, tools_select_cmd_callback, BY_COLOR_SELECT },
|
||||
*/
|
||||
{ "/View/Zoom In", "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ "/View/Zoom Out", "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ "/View/Zoom/16:1", NULL, view_zoom_16_1_callback, 0 },
|
||||
{ "/View/Zoom/8:1", NULL, view_zoom_8_1_callback, 0 },
|
||||
{ "/View/Zoom/4:1", NULL, view_zoom_4_1_callback, 0 },
|
||||
{ "/View/Zoom/2:1", NULL, view_zoom_2_1_callback, 0 },
|
||||
{ "/View/Zoom/1:1", "1", view_zoom_1_1_callback, 0 },
|
||||
{ "/View/Zoom/1:2", NULL, view_zoom_1_2_callback, 0 },
|
||||
{ "/View/Zoom/1:4", NULL, view_zoom_1_4_callback, 0 },
|
||||
{ "/View/Zoom/1:8", NULL, view_zoom_1_8_callback, 0 },
|
||||
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
|
||||
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/View/New View", NULL, view_new_view_cmd_callback, 0 },
|
||||
{ "/View/Shrink Wrap", "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom/16:1"), NULL, view_zoom_16_1_callback, 0 },
|
||||
{ N_("/View/Zoom/8:1"), NULL, view_zoom_8_1_callback, 0 },
|
||||
{ N_("/View/Zoom/4:1"), NULL, view_zoom_4_1_callback, 0 },
|
||||
{ N_("/View/Zoom/2:1"), NULL, view_zoom_2_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:1"), "1", view_zoom_1_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:2"), NULL, view_zoom_1_2_callback, 0 },
|
||||
{ N_("/View/Zoom/1:4"), NULL, view_zoom_1_4_callback, 0 },
|
||||
{ N_("/View/Zoom/1:8"), NULL, view_zoom_1_8_callback, 0 },
|
||||
{ N_("/View/Zoom/1:16"), NULL, view_zoom_1_16_callback, 0 },
|
||||
{ N_("/View/Window Info..."), "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ N_("/View/Toggle Rulers"), "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Statusbar"), "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Guides"), "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Snap To Guides"), NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/View/New View"), NULL, view_new_view_cmd_callback, 0 },
|
||||
{ N_("/View/Shrink Wrap"), "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/Colors/Equalize", NULL, image_equalize_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Invert", NULL, image_invert_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Equalize"), NULL, image_equalize_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Invert"), NULL, image_invert_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Image/Colors/Posterize", NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ "/Image/Colors/Threshold", NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Color Balance", NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ "/Image/Colors/Brightness-Contrast", NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ "/Image/Colors/Hue-Saturation", NULL, tools_select_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Curves", NULL, tools_select_cmd_callback, CURVES },
|
||||
{ "/Image/Colors/Levels", NULL, tools_select_cmd_callback, LEVELS },
|
||||
{ N_("/Image/Colors/Posterize"), NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ N_("/Image/Colors/Threshold"), NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Color Balance"), NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ N_("/Image/Colors/Brightness-Contrast"), NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ N_("/Image/Colors/Hue-Saturation"), NULL, tools_select_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Curves"), NULL, tools_select_cmd_callback, CURVES },
|
||||
{ N_("/Image/Colors/Levels"), NULL, tools_select_cmd_callback, LEVELS },
|
||||
*/
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Desaturate", NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Duplicate", "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Offset", "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ "/Image/Alpha/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Desaturate"), NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Duplicate"), "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Offset"), "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ N_("/Image/Alpha/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/RGB", NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ "/Image/Grayscale", NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ "/Image/Indexed", NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Resize", NULL, image_resize_cmd_callback, 0 },
|
||||
{ "/Image/Scale", NULL, image_scale_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { "/Image/Histogram", NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/RGB"), NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ N_("/Image/Grayscale"), NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ N_("/Image/Indexed"), NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Resize"), NULL, image_resize_cmd_callback, 0 },
|
||||
{ N_("/Image/Scale"), NULL, image_scale_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Image/Histogram"), NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Layers/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Layers/Raise Layer", "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ "/Layers/Lower Layer", "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ "/Layers/Anchor Layer", "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ "/Layers/Merge Visible Layers", "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ "/Layers/Flatten Image", NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ "/Layers/Alpha To Selection", NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ "/Layers/Mask To Selection", NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ "/Layers/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Layers/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Layers/Raise Layer"), "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ N_("/Layers/Lower Layer"), "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ N_("/Layers/Anchor Layer"), "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ N_("/Layers/Merge Visible Layers"), "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ N_("/Layers/Flatten Image"), NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ N_("/Layers/Alpha To Selection"), NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Mask To Selection"), NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
/* { "/Tools/Rect Select", "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ "/Tools/Ellipse Select", "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ "/Tools/Free Select", "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ "/Tools/Fuzzy Select", "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ "/Tools/Bezier Select", "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ "/Tools/Intelligent Scissors", "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ "/Tools/Move", "M", tools_select_cmd_callback, MOVE },
|
||||
{ "/Tools/Magnify", "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ "/Tools/Crop", "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ "/Tools/Transform", "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ "/Tools/Flip", "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ "/Tools/Text", "T", tools_select_cmd_callback, TEXT },
|
||||
{ "/Tools/Color Picker", "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ "/Tools/Bucket Fill", "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ "/Tools/Blend", "L", tools_select_cmd_callback, BLEND },
|
||||
{ "/Tools/Paintbrush", "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ "/Tools/Pencil", "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ "/Tools/Eraser", "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ "/Tools/Airbrush", "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ "/Tools/Clone", "C", tools_select_cmd_callback, CLONE },
|
||||
{ "/Tools/Convolve", "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ "/Tools/Ink", "K", tools_select_cmd_callback, INK },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ "/Tools/Toolbox", NULL, toolbox_raise_callback, 0 },
|
||||
{ "/Tools/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ "/Filters/", NULL, NULL, 0 },
|
||||
{ "/Filters/Repeat last", "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ "/Filters/Re-show last", "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ "/Filters/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Tools/Rect Select"), "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ N_("/Tools/Ellipse Select"), "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ N_("/Tools/Free Select"), "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ N_("/Tools/Fuzzy Select"), "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ N_("/Tools/Bezier Select"), "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ N_("/Tools/Intelligent Scissors"), "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ N_("/Tools/Move"), "M", tools_select_cmd_callback, MOVE },
|
||||
{ N_("/Tools/Magnify"), "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ N_("/Tools/Crop"), "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ N_("/Tools/Transform"), "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ N_("/Tools/Flip"), "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ N_("/Tools/Text"), "T", tools_select_cmd_callback, TEXT },
|
||||
{ N_("/Tools/Color Picker"), "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ N_("/Tools/Bucket Fill"), "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ N_("/Tools/Blend"), "L", tools_select_cmd_callback, BLEND },
|
||||
{ N_("/Tools/Paintbrush"), "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ N_("/Tools/Pencil"), "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ N_("/Tools/Eraser"), "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ N_("/Tools/Airbrush"), "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ N_("/Tools/Clone"), "C", tools_select_cmd_callback, CLONE },
|
||||
{ N_("/Tools/Convolve"), "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ N_("/Tools/Ink"), "K", tools_select_cmd_callback, INK },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ N_("/Tools/Toolbox"), NULL, toolbox_raise_callback, 0 },
|
||||
{ N_("/Tools/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ N_("/Filters/"), NULL, NULL, 0 },
|
||||
{ N_("/Filters/Repeat last"), "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ N_("/Filters/Re-show last"), "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ N_("/Filters/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Script-Fu/", NULL, NULL, 0 },
|
||||
{ N_("/Script-Fu/"), NULL, NULL, 0 },
|
||||
|
||||
{ "/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Dialogs/Indexed Palette...", NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Tool Options...", NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Indexed Palette..."), NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Tool Options..."), NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_image_entries = sizeof (image_entries) / sizeof (image_entries[0]);
|
||||
static GtkItemFactory *image_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry load_entries[] =
|
||||
{
|
||||
{ "/Automatic", NULL, file_load_by_extension_callback, 0 },
|
||||
{ N_("/Automatic"), NULL, file_load_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_load_entries = sizeof (load_entries) / sizeof (load_entries[0]);
|
||||
|
@ -226,7 +231,7 @@ static GtkItemFactory *load_factory = NULL;
|
|||
|
||||
static GtkItemFactoryEntry save_entries[] =
|
||||
{
|
||||
{ "/By extension", NULL, file_save_by_extension_callback, 0 },
|
||||
{ N_("/By extension"), NULL, file_save_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_save_entries = sizeof (save_entries) / sizeof (save_entries[0]);
|
||||
|
@ -339,7 +344,7 @@ menus_set_sensitive (char *path,
|
|||
gtk_widget_set_sensitive (widget, sensitive);
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set sensitivity for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set sensitivity for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -364,7 +369,7 @@ menus_set_state (char *path,
|
|||
widget = NULL;
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set state for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set state for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -406,7 +411,7 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
|
|||
filename = prune_filename (raw_filename);
|
||||
|
||||
if (!file_open(raw_filename, filename))
|
||||
g_message ("Error opening file: %s\n", raw_filename);
|
||||
g_message (_("Error opening file: %s\n"), raw_filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -428,7 +433,7 @@ menus_last_opened_update_labels ()
|
|||
{
|
||||
g_string_sprintf (entry_filename, "%d. %s", i, prune_filename (((GString *) filename_slist->data)->str));
|
||||
|
||||
g_string_sprintf (path, "/File/MRU%02d", i);
|
||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
||||
|
||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||
gtk_widget_show (widget);
|
||||
|
@ -498,7 +503,7 @@ menus_init_mru ()
|
|||
last_opened_entries[i].callback_action = i;
|
||||
last_opened_entries[i].item_type = NULL;
|
||||
|
||||
sprintf (path, "/File/MRU%02d", i + 1);
|
||||
sprintf (path, _("/File/MRU%02d"), i + 1);
|
||||
sprintf (accelerator, "<control>%d", i + 1);
|
||||
}
|
||||
|
||||
|
@ -527,16 +532,51 @@ menus_init_mru ()
|
|||
void
|
||||
menus_init_toolbox ()
|
||||
{
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
toolbox_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<Toolbox>", NULL);
|
||||
translated_entries=translate_entries(toolbox_entries, n_toolbox_entries);
|
||||
gtk_item_factory_create_items_ac (toolbox_factory, n_toolbox_entries,
|
||||
toolbox_entries, NULL, 2);
|
||||
translated_entries, NULL, 2);
|
||||
free_translated_entries(translated_entries, n_toolbox_entries);
|
||||
menus_init_mru ();
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry *
|
||||
translate_entries (GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
GtkItemFactoryEntry *ret;
|
||||
|
||||
ret=g_malloc( sizeof(GtkItemFactoryEntry) * n );
|
||||
for (i=0; i<n; i++) {
|
||||
/* Translation. Note the explicit use of gettext(). */
|
||||
ret[i].path=g_strdup( gettext(entries[i].path) );
|
||||
/* accelerator and item_type are not duped, only referenced */
|
||||
ret[i].accelerator=entries[i].accelerator;
|
||||
ret[i].callback=entries[i].callback;
|
||||
ret[i].callback_action=entries[i].callback_action;
|
||||
ret[i].item_type=entries[i].item_type;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
free_translated_entries(GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i=0; i<n; i++)
|
||||
g_free(entries[i].path);
|
||||
g_free(entries);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
menus_init ()
|
||||
{
|
||||
int i;
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
if (initialize)
|
||||
{
|
||||
|
@ -547,20 +587,26 @@ menus_init ()
|
|||
menus_init_toolbox ();
|
||||
|
||||
image_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Image>", NULL);
|
||||
translated_entries=translate_entries(image_entries, n_image_entries);
|
||||
gtk_item_factory_create_items_ac (image_factory,
|
||||
n_image_entries,
|
||||
image_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_image_entries);
|
||||
load_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Load>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_load_entries);
|
||||
gtk_item_factory_create_items_ac (load_factory,
|
||||
n_load_entries,
|
||||
load_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_load_entries);
|
||||
save_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Save>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_save_entries);
|
||||
gtk_item_factory_create_items_ac (save_factory,
|
||||
n_save_entries,
|
||||
save_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_save_entries);
|
||||
for (i = 0; i < num_tools; i++)
|
||||
{
|
||||
/* FIXME this need to use access functions to check a flag */
|
||||
|
|
|
@ -33,192 +33,197 @@
|
|||
#include "gdisplay.h"
|
||||
#include "docindex.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof ("/File/MRU00")
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define MRU_MENU_ENTRY_SIZE sizeof (N_("/File/MRU00"))
|
||||
#define MRU_MENU_ACCEL_SIZE sizeof ("<control>0")
|
||||
|
||||
static void menus_init (void);
|
||||
static GtkItemFactoryEntry * translate_entries (GtkItemFactoryEntry *, gint);
|
||||
static void free_translated_entries(GtkItemFactoryEntry *, gint);
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
static GtkItemFactoryEntry toolbox_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 0 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/About...", NULL, about_dialog_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/Tip of the day", NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Dialogs/Error Console...", NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 0 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/About..."), NULL, about_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/Tip of the day"), NULL, tips_dialog_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Tool Options..."), "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/File/Dialogs/Document Index..."), NULL, raise_idea_callback, 0 },
|
||||
{ N_("/File/Dialogs/Error Console..."), NULL, dialogs_error_console_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
static GtkItemFactory *toolbox_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry file_menu_separator = { "/File/---", NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 };
|
||||
static GtkItemFactoryEntry file_menu_separator = { N_("/File/---"), NULL, NULL, 0, "<Separator>" };
|
||||
static GtkItemFactoryEntry toolbox_end = { N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 };
|
||||
|
||||
static GtkItemFactoryEntry image_entries[] =
|
||||
{
|
||||
{ "/File/New", "<control>N", file_new_cmd_callback, 1 },
|
||||
{ "/File/Open", "<control>O", file_open_cmd_callback, 0 },
|
||||
{ "/File/Save", "<control>S", file_save_cmd_callback, 0 },
|
||||
{ "/File/Save as", NULL, file_save_as_cmd_callback, 0 },
|
||||
{ "/File/Preferences...", NULL, file_pref_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/New"), "<control>N", file_new_cmd_callback, 1 },
|
||||
{ N_("/File/Open"), "<control>O", file_open_cmd_callback, 0 },
|
||||
{ N_("/File/Save"), "<control>S", file_save_cmd_callback, 0 },
|
||||
{ N_("/File/Save as"), NULL, file_save_as_cmd_callback, 0 },
|
||||
{ N_("/File/Preferences..."), NULL, file_pref_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
|
||||
{ "/File/Close", "<control>W", file_close_cmd_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/File/Close"), "<control>W", file_close_cmd_callback, 0 },
|
||||
{ N_("/File/Quit"), "<control>Q", file_quit_cmd_callback, 0 },
|
||||
{ N_("/File/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Edit/Cut", "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy", "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste", "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Into", NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ "/Edit/Clear", "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ "/Edit/Fill", "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ "/Edit/Stroke", NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ "/Edit/Undo", "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ "/Edit/Redo", "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Edit/Cut Named", "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ "/Edit/Copy Named", "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ "/Edit/Paste Named", "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ "/Edit/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut"), "<control>X", edit_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy"), "<control>C", edit_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste"), "<control>V", edit_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Into"), NULL, edit_paste_into_cmd_callback, 0 },
|
||||
{ N_("/Edit/Clear"), "<control>K", edit_clear_cmd_callback, 0 },
|
||||
{ N_("/Edit/Fill"), "<control>period", edit_fill_cmd_callback, 0 },
|
||||
{ N_("/Edit/Stroke"), NULL, edit_stroke_cmd_callback, 0 },
|
||||
{ N_("/Edit/Undo"), "<control>Z", edit_undo_cmd_callback, 0 },
|
||||
{ N_("/Edit/Redo"), "<control>R", edit_redo_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Edit/Cut Named"), "<control><shift>X", edit_named_cut_cmd_callback, 0 },
|
||||
{ N_("/Edit/Copy Named"), "<control><shift>C", edit_named_copy_cmd_callback, 0 },
|
||||
{ N_("/Edit/Paste Named"), "<control><shift>V", edit_named_paste_cmd_callback, 0 },
|
||||
{ N_("/Edit/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Select/Toggle", "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ "/Select/Invert", "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ "/Select/All", "<control>A", select_all_cmd_callback, 0 },
|
||||
{ "/Select/None", "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ "/Select/Float", "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ "/Select/Sharpen", "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ "/Select/Border", "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ "/Select/Feather", "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ "/Select/Grow", NULL, select_grow_cmd_callback, 0 },
|
||||
{ "/Select/Shrink", NULL, select_shrink_cmd_callback, 0 },
|
||||
{ "/Select/Save To Channel", NULL, select_save_cmd_callback, 0 },
|
||||
{ N_("/Select/Toggle"), "<control>T", select_toggle_cmd_callback, 0 },
|
||||
{ N_("/Select/Invert"), "<control>I", select_invert_cmd_callback, 0 },
|
||||
{ N_("/Select/All"), "<control>A", select_all_cmd_callback, 0 },
|
||||
{ N_("/Select/None"), "<control><shift>A", select_none_cmd_callback, 0 },
|
||||
{ N_("/Select/Float"), "<control><shift>L", select_float_cmd_callback, 0 },
|
||||
{ N_("/Select/Sharpen"), "<control><shift>H", select_sharpen_cmd_callback, 0 },
|
||||
{ N_("/Select/Border"), "<control><shift>B", select_border_cmd_callback, 0 },
|
||||
{ N_("/Select/Feather"), "<control><shift>F", select_feather_cmd_callback, 0 },
|
||||
{ N_("/Select/Grow"), NULL, select_grow_cmd_callback, 0 },
|
||||
{ N_("/Select/Shrink"), NULL, select_shrink_cmd_callback, 0 },
|
||||
{ N_("/Select/Save To Channel"), NULL, select_save_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Select/By Color...", NULL, tools_select_cmd_callback, BY_COLOR_SELECT },
|
||||
*/
|
||||
{ "/View/Zoom In", "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ "/View/Zoom Out", "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ "/View/Zoom/16:1", NULL, view_zoom_16_1_callback, 0 },
|
||||
{ "/View/Zoom/8:1", NULL, view_zoom_8_1_callback, 0 },
|
||||
{ "/View/Zoom/4:1", NULL, view_zoom_4_1_callback, 0 },
|
||||
{ "/View/Zoom/2:1", NULL, view_zoom_2_1_callback, 0 },
|
||||
{ "/View/Zoom/1:1", "1", view_zoom_1_1_callback, 0 },
|
||||
{ "/View/Zoom/1:2", NULL, view_zoom_1_2_callback, 0 },
|
||||
{ "/View/Zoom/1:4", NULL, view_zoom_1_4_callback, 0 },
|
||||
{ "/View/Zoom/1:8", NULL, view_zoom_1_8_callback, 0 },
|
||||
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
|
||||
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ "/View/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/View/New View", NULL, view_new_view_cmd_callback, 0 },
|
||||
{ "/View/Shrink Wrap", "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
|
||||
{ N_("/View/Zoom/16:1"), NULL, view_zoom_16_1_callback, 0 },
|
||||
{ N_("/View/Zoom/8:1"), NULL, view_zoom_8_1_callback, 0 },
|
||||
{ N_("/View/Zoom/4:1"), NULL, view_zoom_4_1_callback, 0 },
|
||||
{ N_("/View/Zoom/2:1"), NULL, view_zoom_2_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:1"), "1", view_zoom_1_1_callback, 0 },
|
||||
{ N_("/View/Zoom/1:2"), NULL, view_zoom_1_2_callback, 0 },
|
||||
{ N_("/View/Zoom/1:4"), NULL, view_zoom_1_4_callback, 0 },
|
||||
{ N_("/View/Zoom/1:8"), NULL, view_zoom_1_8_callback, 0 },
|
||||
{ N_("/View/Zoom/1:16"), NULL, view_zoom_1_16_callback, 0 },
|
||||
{ N_("/View/Window Info..."), "<control><shift>I", view_window_info_cmd_callback, 0 },
|
||||
{ N_("/View/Toggle Rulers"), "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Statusbar"), "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Toggle Guides"), "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/Snap To Guides"), NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
||||
{ N_("/View/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/View/New View"), NULL, view_new_view_cmd_callback, 0 },
|
||||
{ N_("/View/Shrink Wrap"), "<control>E", view_shrink_wrap_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/Colors/Equalize", NULL, image_equalize_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Invert", NULL, image_invert_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Equalize"), NULL, image_equalize_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Invert"), NULL, image_invert_cmd_callback, 0 },
|
||||
/*
|
||||
{ "/Image/Colors/Posterize", NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ "/Image/Colors/Threshold", NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Color Balance", NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ "/Image/Colors/Brightness-Contrast", NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ "/Image/Colors/Hue-Saturation", NULL, tools_select_cmd_callback, 0 },
|
||||
{ "/Image/Colors/Curves", NULL, tools_select_cmd_callback, CURVES },
|
||||
{ "/Image/Colors/Levels", NULL, tools_select_cmd_callback, LEVELS },
|
||||
{ N_("/Image/Colors/Posterize"), NULL, tools_select_cmd_callback, POSTERIZE },
|
||||
{ N_("/Image/Colors/Threshold"), NULL, tools_select_cmd_callback, THRESHOLD },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Color Balance"), NULL, tools_select_cmd_callback, COLOR_BALANCE },
|
||||
{ N_("/Image/Colors/Brightness-Contrast"), NULL, tools_select_cmd_callback, BRIGHTNESS_CONTRAST },
|
||||
{ N_("/Image/Colors/Hue-Saturation"), NULL, tools_select_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/Curves"), NULL, tools_select_cmd_callback, CURVES },
|
||||
{ N_("/Image/Colors/Levels"), NULL, tools_select_cmd_callback, LEVELS },
|
||||
*/
|
||||
{ "/Image/Colors/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Colors/Desaturate", NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Duplicate", "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ "/Image/Channel Ops/Offset", "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ "/Image/Alpha/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Image/Colors/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Colors/Desaturate"), NULL, image_desaturate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Duplicate"), "<control>D", channel_ops_duplicate_cmd_callback, 0 },
|
||||
{ N_("/Image/Channel Ops/Offset"), "<control><shift>O", channel_ops_offset_cmd_callback, 0 },
|
||||
{ N_("/Image/Alpha/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/RGB", NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ "/Image/Grayscale", NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ "/Image/Indexed", NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Image/Resize", NULL, image_resize_cmd_callback, 0 },
|
||||
{ "/Image/Scale", NULL, image_scale_cmd_callback, 0 },
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { "/Image/Histogram", NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ "/Image/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/RGB"), NULL, image_convert_rgb_cmd_callback, 0 },
|
||||
{ N_("/Image/Grayscale"), NULL, image_convert_grayscale_cmd_callback, 0 },
|
||||
{ N_("/Image/Indexed"), NULL, image_convert_indexed_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Image/Resize"), NULL, image_resize_cmd_callback, 0 },
|
||||
{ N_("/Image/Scale"), NULL, image_scale_cmd_callback, 0 },
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Image/Histogram"), NULL, tools_select_cmd_callback, HISTOGRAM}, */
|
||||
{ N_("/Image/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Layers/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Layers/Raise Layer", "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ "/Layers/Lower Layer", "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ "/Layers/Anchor Layer", "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ "/Layers/Merge Visible Layers", "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ "/Layers/Flatten Image", NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ "/Layers/Alpha To Selection", NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ "/Layers/Mask To Selection", NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ "/Layers/Add Alpha Channel", NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
{ N_("/Layers/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Layers/Raise Layer"), "<control>F", layers_raise_cmd_callback, 0 },
|
||||
{ N_("/Layers/Lower Layer"), "<control>B", layers_lower_cmd_callback, 0 },
|
||||
{ N_("/Layers/Anchor Layer"), "<control>H", layers_anchor_cmd_callback, 0 },
|
||||
{ N_("/Layers/Merge Visible Layers"), "<control>M", layers_merge_cmd_callback, 0 },
|
||||
{ N_("/Layers/Flatten Image"), NULL, layers_flatten_cmd_callback, 0 },
|
||||
{ N_("/Layers/Alpha To Selection"), NULL, layers_alpha_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Mask To Selection"), NULL, layers_mask_select_cmd_callback, 0 },
|
||||
{ N_("/Layers/Add Alpha Channel"), NULL, layers_add_alpha_channel_cmd_callback, 0 },
|
||||
|
||||
/* { "/Tools/Rect Select", "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ "/Tools/Ellipse Select", "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ "/Tools/Free Select", "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ "/Tools/Fuzzy Select", "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ "/Tools/Bezier Select", "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ "/Tools/Intelligent Scissors", "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ "/Tools/Move", "M", tools_select_cmd_callback, MOVE },
|
||||
{ "/Tools/Magnify", "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ "/Tools/Crop", "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ "/Tools/Transform", "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ "/Tools/Flip", "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ "/Tools/Text", "T", tools_select_cmd_callback, TEXT },
|
||||
{ "/Tools/Color Picker", "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ "/Tools/Bucket Fill", "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ "/Tools/Blend", "L", tools_select_cmd_callback, BLEND },
|
||||
{ "/Tools/Paintbrush", "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ "/Tools/Pencil", "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ "/Tools/Eraser", "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ "/Tools/Airbrush", "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ "/Tools/Clone", "C", tools_select_cmd_callback, CLONE },
|
||||
{ "/Tools/Convolve", "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ "/Tools/Ink", "K", tools_select_cmd_callback, INK },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ "/Tools/Toolbox", NULL, toolbox_raise_callback, 0 },
|
||||
{ "/Tools/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/Tools/Default Colors", "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ "/Tools/Swap Colors", "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ "/Filters/", NULL, NULL, 0 },
|
||||
{ "/Filters/Repeat last", "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ "/Filters/Re-show last", "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ "/Filters/---", NULL, NULL, 0, "<Separator>" },
|
||||
/* { N_("/Tools/Rect Select"), "R", tools_select_cmd_callback, RECT_SELECT },
|
||||
{ N_("/Tools/Ellipse Select"), "E", tools_select_cmd_callback, ELLIPSE_SELECT },
|
||||
{ N_("/Tools/Free Select"), "F", tools_select_cmd_callback, FREE_SELECT },
|
||||
{ N_("/Tools/Fuzzy Select"), "Z", tools_select_cmd_callback, FUZZY_SELECT },
|
||||
{ N_("/Tools/Bezier Select"), "B", tools_select_cmd_callback, BEZIER_SELECT },
|
||||
{ N_("/Tools/Intelligent Scissors"), "I", tools_select_cmd_callback, ISCISSORS },
|
||||
{ N_("/Tools/Move"), "M", tools_select_cmd_callback, MOVE },
|
||||
{ N_("/Tools/Magnify"), "<shift>M", tools_select_cmd_callback, MAGNIFY },
|
||||
{ N_("/Tools/Crop"), "<shift>C", tools_select_cmd_callback, CROP },
|
||||
{ N_("/Tools/Transform"), "<shift>T", tools_select_cmd_callback, ROTATE },
|
||||
{ N_("/Tools/Flip"), "<shift>F", tools_select_cmd_callback, FLIP_HORZ },
|
||||
{ N_("/Tools/Text"), "T", tools_select_cmd_callback, TEXT },
|
||||
{ N_("/Tools/Color Picker"), "O", tools_select_cmd_callback, COLOR_PICKER },
|
||||
{ N_("/Tools/Bucket Fill"), "<shift>B", tools_select_cmd_callback, BUCKET_FILL },
|
||||
{ N_("/Tools/Blend"), "L", tools_select_cmd_callback, BLEND },
|
||||
{ N_("/Tools/Paintbrush"), "P", tools_select_cmd_callback, PAINTBRUSH },
|
||||
{ N_("/Tools/Pencil"), "<shift>P", tools_select_cmd_callback, PENCIL },
|
||||
{ N_("/Tools/Eraser"), "<shift>E", tools_select_cmd_callback, ERASER },
|
||||
{ N_("/Tools/Airbrush"), "A", tools_select_cmd_callback, AIRBRUSH },
|
||||
{ N_("/Tools/Clone"), "C", tools_select_cmd_callback, CLONE },
|
||||
{ N_("/Tools/Convolve"), "V", tools_select_cmd_callback, CONVOLVE },
|
||||
{ N_("/Tools/Ink"), "K", tools_select_cmd_callback, INK },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 }, */
|
||||
{ N_("/Tools/Toolbox"), NULL, toolbox_raise_callback, 0 },
|
||||
{ N_("/Tools/---"), NULL, NULL, 0, "<Separator>" },
|
||||
{ N_("/Tools/Default Colors"), "D", tools_default_colors_cmd_callback, 0 },
|
||||
{ N_("/Tools/Swap Colors"), "X", tools_swap_colors_cmd_callback, 0 },
|
||||
{ N_("/Filters/"), NULL, NULL, 0 },
|
||||
{ N_("/Filters/Repeat last"), "<alt>F", filters_repeat_cmd_callback, 0x0 },
|
||||
{ N_("/Filters/Re-show last"), "<alt><shift>F", filters_repeat_cmd_callback, 0x1 },
|
||||
{ N_("/Filters/---"), NULL, NULL, 0, "<Separator>" },
|
||||
|
||||
{ "/Script-Fu/", NULL, NULL, 0 },
|
||||
{ N_("/Script-Fu/"), NULL, NULL, 0 },
|
||||
|
||||
{ "/Dialogs/Brushes...", "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ "/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ "/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ "/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ "/Dialogs/Indexed Palette...", NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ "/Dialogs/Tool Options...", NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ "/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Brushes..."), "<control><shift>B", dialogs_brushes_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Patterns..."), "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Palette..."), "<control>P", dialogs_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Gradient Editor..."), "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Layers & Channels..."), "<control>L", dialogs_lc_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Indexed Palette..."), NULL, dialogs_indexed_palette_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Tool Options..."), NULL, dialogs_tools_options_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Input Devices..."), NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ N_("/Dialogs/Device Status..."), NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_image_entries = sizeof (image_entries) / sizeof (image_entries[0]);
|
||||
static GtkItemFactory *image_factory = NULL;
|
||||
|
||||
static GtkItemFactoryEntry load_entries[] =
|
||||
{
|
||||
{ "/Automatic", NULL, file_load_by_extension_callback, 0 },
|
||||
{ N_("/Automatic"), NULL, file_load_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_load_entries = sizeof (load_entries) / sizeof (load_entries[0]);
|
||||
|
@ -226,7 +231,7 @@ static GtkItemFactory *load_factory = NULL;
|
|||
|
||||
static GtkItemFactoryEntry save_entries[] =
|
||||
{
|
||||
{ "/By extension", NULL, file_save_by_extension_callback, 0 },
|
||||
{ N_("/By extension"), NULL, file_save_by_extension_callback, 0 },
|
||||
{ "/---", NULL, NULL, 0, "<Separator>" },
|
||||
};
|
||||
static guint n_save_entries = sizeof (save_entries) / sizeof (save_entries[0]);
|
||||
|
@ -339,7 +344,7 @@ menus_set_sensitive (char *path,
|
|||
gtk_widget_set_sensitive (widget, sensitive);
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set sensitivity for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set sensitivity for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -364,7 +369,7 @@ menus_set_state (char *path,
|
|||
widget = NULL;
|
||||
}
|
||||
if (!ifactory || !widget)
|
||||
printf ("Unable to set state for menu which doesn't exist:\n%s", path);
|
||||
printf (_("Unable to set state for menu which doesn't exist:\n%s"), path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -406,7 +411,7 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
|
|||
filename = prune_filename (raw_filename);
|
||||
|
||||
if (!file_open(raw_filename, filename))
|
||||
g_message ("Error opening file: %s\n", raw_filename);
|
||||
g_message (_("Error opening file: %s\n"), raw_filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -428,7 +433,7 @@ menus_last_opened_update_labels ()
|
|||
{
|
||||
g_string_sprintf (entry_filename, "%d. %s", i, prune_filename (((GString *) filename_slist->data)->str));
|
||||
|
||||
g_string_sprintf (path, "/File/MRU%02d", i);
|
||||
g_string_sprintf (path, _("/File/MRU%02d"), i);
|
||||
|
||||
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
||||
gtk_widget_show (widget);
|
||||
|
@ -498,7 +503,7 @@ menus_init_mru ()
|
|||
last_opened_entries[i].callback_action = i;
|
||||
last_opened_entries[i].item_type = NULL;
|
||||
|
||||
sprintf (path, "/File/MRU%02d", i + 1);
|
||||
sprintf (path, _("/File/MRU%02d"), i + 1);
|
||||
sprintf (accelerator, "<control>%d", i + 1);
|
||||
}
|
||||
|
||||
|
@ -527,16 +532,51 @@ menus_init_mru ()
|
|||
void
|
||||
menus_init_toolbox ()
|
||||
{
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
toolbox_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<Toolbox>", NULL);
|
||||
translated_entries=translate_entries(toolbox_entries, n_toolbox_entries);
|
||||
gtk_item_factory_create_items_ac (toolbox_factory, n_toolbox_entries,
|
||||
toolbox_entries, NULL, 2);
|
||||
translated_entries, NULL, 2);
|
||||
free_translated_entries(translated_entries, n_toolbox_entries);
|
||||
menus_init_mru ();
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry *
|
||||
translate_entries (GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
GtkItemFactoryEntry *ret;
|
||||
|
||||
ret=g_malloc( sizeof(GtkItemFactoryEntry) * n );
|
||||
for (i=0; i<n; i++) {
|
||||
/* Translation. Note the explicit use of gettext(). */
|
||||
ret[i].path=g_strdup( gettext(entries[i].path) );
|
||||
/* accelerator and item_type are not duped, only referenced */
|
||||
ret[i].accelerator=entries[i].accelerator;
|
||||
ret[i].callback=entries[i].callback;
|
||||
ret[i].callback_action=entries[i].callback_action;
|
||||
ret[i].item_type=entries[i].item_type;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
free_translated_entries(GtkItemFactoryEntry *entries, gint n)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i=0; i<n; i++)
|
||||
g_free(entries[i].path);
|
||||
g_free(entries);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
menus_init ()
|
||||
{
|
||||
int i;
|
||||
GtkItemFactoryEntry *translated_entries;
|
||||
|
||||
if (initialize)
|
||||
{
|
||||
|
@ -547,20 +587,26 @@ menus_init ()
|
|||
menus_init_toolbox ();
|
||||
|
||||
image_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Image>", NULL);
|
||||
translated_entries=translate_entries(image_entries, n_image_entries);
|
||||
gtk_item_factory_create_items_ac (image_factory,
|
||||
n_image_entries,
|
||||
image_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_image_entries);
|
||||
load_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Load>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_load_entries);
|
||||
gtk_item_factory_create_items_ac (load_factory,
|
||||
n_load_entries,
|
||||
load_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_load_entries);
|
||||
save_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<Save>", NULL);
|
||||
translated_entries=translate_entries(load_entries, n_save_entries);
|
||||
gtk_item_factory_create_items_ac (save_factory,
|
||||
n_save_entries,
|
||||
save_entries,
|
||||
translated_entries,
|
||||
NULL, 2);
|
||||
free_translated_entries(translated_entries, n_save_entries);
|
||||
for (i = 0; i < num_tools; i++)
|
||||
{
|
||||
/* FIXME this need to use access functions to check a flag */
|
||||
|
|
|
@ -49,9 +49,13 @@
|
|||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
#undef ENABLE_NLS
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_DOPRNT
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_NDIR_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
|
17
configure.in
17
configure.in
|
@ -54,12 +54,18 @@ fi
|
|||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CPP
|
||||
|
||||
dnl i18n stuff
|
||||
ALL_LINGUAS=""
|
||||
AM_GNU_GETTEXT
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
|
||||
dnl Check for GTK+
|
||||
AM_PATH_GTK(1.1.0,,
|
||||
AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
|
||||
|
@ -450,12 +456,14 @@ AC_SUBST(THREAD_LIBS)
|
|||
|
||||
dnl Output the Makefiles
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
AC_OUTPUT([
|
||||
gimprc
|
||||
gimprc_user
|
||||
gimptool
|
||||
libgimp/gimpfeatures.h
|
||||
Makefile
|
||||
po/Makefile.in
|
||||
intl/Makefile
|
||||
libgimp/Makefile
|
||||
plug-ins/Makefile
|
||||
plug-ins/libgck/Makefile
|
||||
|
@ -597,6 +605,7 @@ data/Makefile
|
|||
data/brushes/Makefile
|
||||
data/gradients/Makefile
|
||||
data/palettes/Makefile
|
||||
data/patterns/Makefile,
|
||||
chmod +x gimptool
|
||||
data/patterns/Makefile],
|
||||
[chmod +x gimptool
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]
|
||||
)
|
||||
|
|
|
@ -42,7 +42,8 @@ gimpinclude_HEADERS = \
|
|||
gimpenums.h \
|
||||
gimpfeatures.h \
|
||||
gimpmenu.h \
|
||||
gimpui.h
|
||||
gimpui.h \
|
||||
gimpintl.h
|
||||
|
||||
libgimp_1_1_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
libgimpui_1_1_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
@ -52,11 +53,14 @@ CPPFLAGS = \
|
|||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/intl \
|
||||
-I../intl \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
libgimpui_1_1_la_INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/intl \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __GIMPINTL_H__
|
||||
#define __GIMPINTL_H__
|
||||
|
||||
#define LOCALEDIR LIBDIR "/locale"
|
||||
|
||||
/* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com> */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include<libintl.h>
|
||||
#define _(String) gettext(String)
|
||||
#ifdef gettext_noop
|
||||
#define N_(String) gettext_noop(String)
|
||||
#else
|
||||
#define N_(String) (String)
|
||||
#endif
|
||||
#else /* NLS is disabled */
|
||||
#define _(String) (String)
|
||||
#define N_(String) (String)
|
||||
#define textdomain(String) (String)
|
||||
#define gettext(String) (String)
|
||||
#define dgettext(Domain,String) (String)
|
||||
#define dcgettext(Domain,String,Type) (String)
|
||||
#define bindtextdomain(Domain,Directory) (Domain)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
*.gmo
|
||||
*.mo
|
||||
Makefile
|
||||
Makefile.in
|
||||
POTFILES
|
||||
cat-id-tbl.c
|
||||
gimp.pot
|
||||
stamp-cat-id
|
Loading…
Reference in New Issue