1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2001-08-06 00:08:19 +08:00
|
|
|
#include <stdio.h>
|
1997-11-25 06:05:25 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2000-04-28 01:27:28 +08:00
|
|
|
|
2000-12-17 05:37:03 +08:00
|
|
|
#include <gtk/gtk.h>
|
1999-10-03 21:50:19 +08:00
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
|
2001-05-22 04:30:16 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2001-09-26 07:23:09 +08:00
|
|
|
#include "gui-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimplist.h"
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "core/gimptoolinfo.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
|
2001-09-26 07:23:09 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "tools/gimpbrightnesscontrasttool.h"
|
|
|
|
#include "tools/gimpcolorbalancetool.h"
|
|
|
|
#include "tools/gimpcurvestool.h"
|
|
|
|
#include "tools/gimphuesaturationtool.h"
|
|
|
|
#include "tools/gimplevelstool.h"
|
|
|
|
#include "tools/gimpposterizetool.h"
|
|
|
|
#include "tools/gimpthresholdtool.h"
|
2001-02-21 20:18:09 +08:00
|
|
|
#include "tools/tool_manager.h"
|
|
|
|
|
2001-04-21 10:11:12 +08:00
|
|
|
#include "channels-commands.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "commands.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "data-commands.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "dialogs-commands.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "edit-commands.h"
|
|
|
|
#include "file-commands.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "gradients-commands.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "image-commands.h"
|
2001-04-21 00:27:44 +08:00
|
|
|
#include "layers-commands.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "menus.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "palettes-commands.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "paths-dialog.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "select-commands.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "test-commands.h"
|
2001-06-30 03:25:03 +08:00
|
|
|
#include "tools-commands.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "view-commands.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "app_procs.h"
|
2000-12-29 23:22:01 +08:00
|
|
|
#include "gimphelp.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "gimprc.h"
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
/* local function prototypes */
|
|
|
|
|
|
|
|
static void menus_create_item (GtkItemFactory *item_factory,
|
|
|
|
GimpItemFactoryEntry *entry,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_type,
|
|
|
|
gboolean create_tearoff,
|
|
|
|
gboolean static_entry);
|
|
|
|
static void menus_create_items (GtkItemFactory *item_factory,
|
|
|
|
guint n_entries,
|
|
|
|
GimpItemFactoryEntry *entries,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_type,
|
|
|
|
gboolean create_tearoff,
|
|
|
|
gboolean static_entries);
|
2001-08-07 20:42:23 +08:00
|
|
|
static GtkItemFactory * menus_item_factory_new
|
|
|
|
(GtkType container_type,
|
|
|
|
const gchar *path,
|
|
|
|
const gchar *factory_path,
|
|
|
|
guint n_entries,
|
|
|
|
GimpItemFactoryEntry *entries,
|
|
|
|
gpointer callback_data,
|
|
|
|
gboolean create_tearoff);
|
2001-07-10 01:58:56 +08:00
|
|
|
static void menus_create_branches (GtkItemFactory *item_factory,
|
|
|
|
GimpItemFactoryEntry *entry);
|
|
|
|
static void menus_init (void);
|
1999-12-08 02:56:12 +08:00
|
|
|
|
|
|
|
#ifdef ENABLE_NLS
|
2001-07-10 01:58:56 +08:00
|
|
|
static gchar * menus_menu_translate_func (const gchar *path,
|
|
|
|
gpointer data);
|
1999-12-08 02:56:12 +08:00
|
|
|
#else
|
2001-07-10 01:58:56 +08:00
|
|
|
#define menus_menu_translate_func (NULL)
|
1999-12-08 02:56:12 +08:00
|
|
|
#endif
|
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
static void menus_tearoff_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer data,
|
|
|
|
guint action);
|
2001-02-24 10:42:09 +08:00
|
|
|
|
2000-10-23 17:05:45 +08:00
|
|
|
#ifdef ENABLE_DEBUG_ENTRY
|
2001-07-10 01:58:56 +08:00
|
|
|
static void menus_debug_recurse_menu (GtkWidget *menu,
|
|
|
|
gint depth,
|
|
|
|
gchar *path);
|
|
|
|
static void menus_debug_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer data,
|
|
|
|
guint action);
|
2000-10-23 17:05:45 +08:00
|
|
|
#endif /* ENABLE_DEBUG_ENTRY */
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-02-24 10:42:09 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
GSList *last_opened_raw_filenames = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
#define SEPARATOR(path) \
|
|
|
|
{ { (path), NULL, NULL, 0, "<Separator>" }, NULL, NULL, NULL }
|
|
|
|
|
|
|
|
#define BRANCH(path) \
|
|
|
|
{ { (path), NULL, NULL, 0, "<Branch>" }, NULL, NULL, NULL }
|
1998-07-12 13:18:17 +08:00
|
|
|
|
2001-02-24 10:42:09 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Toolbox> *****/
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
static GimpItemFactoryEntry toolbox_entries[] =
|
|
|
|
{
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Toolbox>/File */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/_File")),
|
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
{ { N_("/File/New..."), "<control>N",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_new_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/file_new.html", NULL },
|
2001-07-10 01:58:56 +08:00
|
|
|
{ { N_("/File/Open..."), "<control>O",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_open_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_OPEN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-09-28 22:09:26 +08:00
|
|
|
"file/dialogs/file_open.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Toolbox>/File/Acquire */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/File/Acquire")),
|
|
|
|
|
|
|
|
SEPARATOR ("/File/---"),
|
|
|
|
|
|
|
|
{ { N_("/File/Preferences..."), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PREFERENCES },
|
2001-06-30 03:25:03 +08:00
|
|
|
"gimp:preferences-dialog",
|
1999-10-04 16:40:33 +08:00
|
|
|
"file/dialogs/preferences/preferences.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Toolbox>/File/Dialogs */
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---"),
|
|
|
|
|
|
|
|
{ { N_("/File/Dialogs/Layers, Channels & Paths..."), "<control>L",
|
|
|
|
dialogs_create_lc_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"file/dialogs/layers_and_channels.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Dialogs/Tool Options..."), "<control><shift>T",
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:tool-options-dialog",
|
1999-11-20 20:12:41 +08:00
|
|
|
"file/dialogs/tool_options.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/Dialogs/---"),
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { "/File/Dialogs/Old + Testing/Brushes...", NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:brush-select-dialog",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/brush_selection.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { "/File/Dialogs/Old + Testing/Patterns...", NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:pattern-select-dialog",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/pattern_selection.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { "/File/Dialogs/Old + Testing/Gradients...", NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:gradient-select-dialog",
|
1999-11-20 20:12:41 +08:00
|
|
|
"file/dialogs/gradient_selection.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { "/File/Dialogs/Old + Testing/Palette...", NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
2001-07-10 01:58:56 +08:00
|
|
|
"gimp:palette-select-dialog",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/palette_selection.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/File/Dialogs/Old + Testing/---"),
|
|
|
|
|
|
|
|
{ { "/File/Dialogs/Old + Testing/Multi List...", NULL,
|
|
|
|
test_multi_container_list_view_cmd_callback, 0 },
|
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { "/File/Dialogs/Old + Testing/Multi Grid...", NULL,
|
|
|
|
test_multi_container_grid_view_cmd_callback, 0 },
|
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
{ { N_("/File/Dialogs/Brushes..."), "<control><shift>B",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:brush-grid",
|
|
|
|
"file/dialogs/brush_selection.html", NULL },
|
|
|
|
{ { N_("/File/Dialogs/Patterns..."), "<control><shift>P",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:pattern-grid",
|
|
|
|
"file/dialogs/pattern_selection.html", NULL },
|
|
|
|
{ { N_("/File/Dialogs/Gradients..."), "<control>G",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:gradient-list",
|
|
|
|
"file/dialogs/gradient_selection.html", NULL },
|
|
|
|
{ { N_("/File/Dialogs/Palettes..."), "<control>P",
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-07-15 22:32:44 +08:00
|
|
|
"gimp:palette-list",
|
|
|
|
"file/dialogs/palette_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Dialogs/Indexed Palette..."), NULL,
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-07-15 22:32:44 +08:00
|
|
|
"gimp:indexed-palette",
|
1999-10-16 21:07:15 +08:00
|
|
|
"file/dialogs/indexed_palette.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { N_("/File/Dialogs/Buffers..."), NULL,
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:buffer-list",
|
|
|
|
NULL, NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/Dialogs/---"),
|
|
|
|
|
|
|
|
{ { N_("/File/Dialogs/Input Devices..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:input-devices-dialog",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/input_devices.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Dialogs/Device Status..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:device-status-dialog",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/device_status.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/Dialogs/---"),
|
|
|
|
|
2001-10-23 01:27:46 +08:00
|
|
|
{ { N_("/File/Dialogs/Document History..."), NULL,
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:document-history",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/document_index.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Dialogs/Error Console..."), NULL,
|
2001-08-07 08:06:06 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:error-console",
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/error_console.html", NULL },
|
2000-12-25 04:27:04 +08:00
|
|
|
#ifdef DISPLAY_FILTERS
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Dialogs/Display Filters..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:display-filters-dialog",
|
1999-10-04 16:40:33 +08:00
|
|
|
"file/dialogs/display_filters/display_filters.html", NULL },
|
2000-12-25 04:27:04 +08:00
|
|
|
#endif /* DISPLAY_FILTERS */
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---"),
|
1999-12-02 21:00:18 +08:00
|
|
|
|
|
|
|
/* MRU entries are inserted here */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---MRU"),
|
|
|
|
|
|
|
|
{ { N_("/File/Quit"), "<control>Q",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_quit_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_QUIT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-12-02 21:00:18 +08:00
|
|
|
"file/quit.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Toolbox>/Xtns */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/_Xtns")),
|
|
|
|
|
|
|
|
{ { N_("/Xtns/Module Browser..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:module-browser-dialog",
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/module_browser.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Xtns/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Toolbox>/Help */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/_Help")),
|
|
|
|
|
|
|
|
{ { N_("/Help/Help..."), "F1",
|
2001-08-04 22:10:58 +08:00
|
|
|
help_help_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_HELP },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"help/dialogs/help.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Help/Context Help..."), "<shift>F1",
|
|
|
|
help_context_help_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"help/context_help.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Help/Tip of the Day..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:tips-dialog",
|
1999-11-20 20:12:41 +08:00
|
|
|
"help/dialogs/tip_of_the_day.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Help/About..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:about-dialog",
|
1999-11-20 20:12:41 +08:00
|
|
|
"help/dialogs/about.html", NULL },
|
2001-08-04 03:43:19 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/Help/---"),
|
|
|
|
|
|
|
|
{ { N_("/Help/Mem Profile"), NULL,
|
|
|
|
mem_profile_cmd_callback, 0 },
|
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
2000-10-23 17:05:45 +08:00
|
|
|
#ifdef ENABLE_DEBUG_ENTRY
|
2001-07-20 18:07:51 +08:00
|
|
|
{ { "/Help/Dump Items (Debug)", NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
menus_debug_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
NULL, NULL }
|
2000-10-23 17:05:45 +08:00
|
|
|
#endif
|
1998-06-07 21:55:36 +08:00
|
|
|
};
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Image> *****/
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
static GimpItemFactoryEntry image_entries[] =
|
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
{ { "/tearoff1", NULL, menus_tearoff_cmd_callback, 0, "<Tearoff>" },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
NULL, NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/File */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/New..."), "<control>N",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_new_cmd_callback, 1,
|
|
|
|
"<StockItem>", GTK_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/dialogs/file_new.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Open..."), "<control>O",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_open_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_OPEN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-09-28 22:09:26 +08:00
|
|
|
"file/dialogs/file_open.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Save"), "<control>S",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_save_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SAVE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-09-28 22:09:26 +08:00
|
|
|
"file/dialogs/file_save.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Save as..."), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
file_save_as_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SAVE_AS },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2001-01-02 07:55:45 +08:00
|
|
|
"file/dialogs/file_save.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Save a Copy as..."), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
file_save_a_copy_as_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SAVE_AS },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-09-28 22:09:26 +08:00
|
|
|
"file/dialogs/file_save.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Revert..."), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
file_revert_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_REVERT_TO_SAVED },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/revert.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---"),
|
|
|
|
|
|
|
|
{ { N_( "/File/Close"), "<control>W",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_close_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CLOSE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"file/close.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/File/Quit"), "<control>Q",
|
2001-08-04 22:10:58 +08:00
|
|
|
file_quit_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_QUIT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"file/quit.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/File/---moved"),
|
1999-10-03 21:50:19 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Edit */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Undo"), "<control>Z",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_undo_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_UNDO },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"edit/undo.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Redo"), "<control>R",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_redo_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_REDO },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"edit/redo.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Edit/---"),
|
|
|
|
|
|
|
|
{ { N_("/Edit/Cut"), "<control>X",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_cut_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/cut.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Copy"), "<control>C",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_copy_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_COPY },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/copy.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Paste"), "<control>V",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_paste_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PASTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/paste.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Paste Into"), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_paste_into_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PASTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/paste_into.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Paste as New"), NULL,
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_paste_as_new_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PASTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/paste_as_new.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Edit/Buffer */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_named_cut_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"edit/dialogs/cut_named.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Buffer/Copy Named..."), "<control><shift>C",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_named_copy_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_COPY },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"edit/dialogs/copy_named.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Buffer/Paste Named..."), "<control><shift>V",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_named_paste_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PASTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"edit/dialogs/paste_named.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Edit/---"),
|
|
|
|
|
|
|
|
{ { N_("/Edit/Clear"), "<control>K",
|
2001-08-04 22:10:58 +08:00
|
|
|
edit_clear_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CLEAR },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/clear.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Fill with FG Color"), "<control>comma",
|
2001-08-07 20:42:23 +08:00
|
|
|
edit_fill_cmd_callback, (guint) FOREGROUND_FILL,
|
|
|
|
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-03-24 22:54:59 +08:00
|
|
|
"edit/fill.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Fill with BG Color"), "<control>period",
|
2001-08-07 20:42:23 +08:00
|
|
|
edit_fill_cmd_callback, (guint) BACKGROUND_FILL,
|
|
|
|
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/fill.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Edit/Stroke"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
edit_stroke_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_STROKE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"edit/stroke.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Edit/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Select */
|
1998-06-07 21:55:36 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Invert"), "<control>I",
|
|
|
|
select_invert_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/invert.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/All"), "<control>A",
|
|
|
|
select_all_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/all.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/None"), "<control><shift>A",
|
|
|
|
select_none_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/none.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Float"), "<control><shift>L",
|
|
|
|
select_float_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/float.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Select/---"),
|
|
|
|
|
|
|
|
{ { N_("/Select/Feather..."), "<control><shift>F",
|
|
|
|
select_feather_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/dialogs/feather_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Sharpen"), "<control><shift>H",
|
|
|
|
select_sharpen_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/sharpen.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Shrink..."), NULL,
|
|
|
|
select_shrink_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/dialogs/shrink_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Grow..."), NULL,
|
|
|
|
select_grow_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/dialogs/grow_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Select/Border..."), "<control><shift>B",
|
|
|
|
select_border_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/dialogs/border_selection.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Select/---"),
|
|
|
|
|
|
|
|
{ { N_("/Select/Save to Channel"), NULL,
|
|
|
|
select_save_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"select/save_to_channel.html", NULL },
|
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/View */
|
|
|
|
|
2001-08-04 22:10:58 +08:00
|
|
|
{ { N_("/View/Zoom In"), "equal",
|
|
|
|
view_zoomin_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_IN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-04 22:10:58 +08:00
|
|
|
{ { N_("/View/Zoom Out"), "minus",
|
|
|
|
view_zoomout_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/View/Zoom */
|
|
|
|
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/16:1"), NULL,
|
|
|
|
view_zoom_cmd_callback, 1601,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_IN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/8:1"), NULL,
|
|
|
|
view_zoom_cmd_callback, 801,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_IN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/4:1"), NULL,
|
|
|
|
view_zoom_cmd_callback, 401,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_IN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/2:1"), NULL,
|
|
|
|
view_zoom_cmd_callback, 201,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_IN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-04 22:10:58 +08:00
|
|
|
{ { N_("/View/Zoom/1:1"), "1",
|
|
|
|
view_zoom_cmd_callback, 101,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_100 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/1:2"), NULL,
|
|
|
|
view_zoom_cmd_callback, 102,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/1:4"), NULL,
|
|
|
|
view_zoom_cmd_callback, 104,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/1:8"), NULL,
|
|
|
|
view_zoom_cmd_callback, 108,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
2001-08-07 20:42:23 +08:00
|
|
|
{ { N_("/View/Zoom/1:16"), NULL,
|
|
|
|
view_zoom_cmd_callback, 116,
|
|
|
|
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/zoom.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Dot for Dot"), NULL,
|
|
|
|
view_dot_for_dot_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/dot_for_dot.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/View/---"),
|
|
|
|
|
|
|
|
{ { N_("/View/Info Window..."), "<control><shift>I",
|
2001-08-07 20:42:23 +08:00
|
|
|
view_info_window_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_HELP },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/dialogs/info_window.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Nav. Window..."), "<control><shift>N",
|
2001-08-07 20:42:23 +08:00
|
|
|
view_nav_window_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TOOL_MOVE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/dialogs/navigation_window.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/View/---"),
|
|
|
|
|
|
|
|
{ { N_("/View/Toggle Selection"), "<control>T",
|
|
|
|
view_toggle_selection_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/toggle_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Toggle Rulers"), "<control><shift>R",
|
|
|
|
view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/toggle_rulers.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Toggle Statusbar"), "<control><shift>S",
|
|
|
|
view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/toggle_statusbar.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Toggle Guides"), "<control><shift>T",
|
|
|
|
view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/toggle_guides.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Snap to Guides"), NULL,
|
|
|
|
view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/snap_to_guides.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/View/---"),
|
|
|
|
|
|
|
|
{ { N_("/View/New View"), NULL,
|
2001-08-07 20:42:23 +08:00
|
|
|
view_new_view_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/new_view.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/View/Shrink Wrap"), "<control>E",
|
|
|
|
view_shrink_wrap_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"view/shrink_wrap.html", NULL },
|
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Image/Mode */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Mode/RGB"), "<alt>R",
|
2001-08-04 22:10:58 +08:00
|
|
|
image_convert_rgb_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CONVERT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"image/mode/convert_to_rgb.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Mode/Grayscale"), "<alt>G",
|
2001-08-04 22:10:58 +08:00
|
|
|
image_convert_grayscale_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CONVERT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"image/mode/convert_to_grayscale.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Mode/Indexed..."), "<alt>I",
|
2001-08-04 22:10:58 +08:00
|
|
|
image_convert_indexed_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CONVERT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"image/mode/dialogs/convert_to_indexed.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Image/Mode/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Image/Colors */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Colors/Desaturate"), NULL,
|
|
|
|
image_desaturate_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"image/colors/desaturate.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Colors/Invert"), NULL,
|
|
|
|
image_invert_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"image/colors/invert.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Image/Colors/---"),
|
1999-10-03 21:50:19 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Image/Colors/Auto */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Colors/Auto/Equalize"), NULL,
|
|
|
|
image_equalize_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"image/colors/auto/equalize.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Image/Colors/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Image/Alpha */
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Alpha/Add Alpha Channel"), NULL,
|
|
|
|
layers_add_alpha_channel_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"layers/add_alpha_channel.html", NULL },
|
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Image/Transforms */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Transforms/Offset..."), "<control><shift>O",
|
|
|
|
image_offset_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"image/transforms/dialogs/offset.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/Image/Transforms/Rotate")),
|
|
|
|
|
|
|
|
SEPARATOR ("/Image/Transforms/---"),
|
|
|
|
|
|
|
|
SEPARATOR ("/Image/---"),
|
|
|
|
|
|
|
|
{ { N_("/Image/Canvas Size..."), NULL,
|
|
|
|
image_resize_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-12-18 00:37:50 +08:00
|
|
|
"image/dialogs/set_canvas_size.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Scale Image..."), NULL,
|
2001-08-07 20:42:23 +08:00
|
|
|
image_scale_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TOOL_SCALE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"image/dialogs/scale_image.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Image/Duplicate"), "<control>D",
|
2001-08-07 08:06:06 +08:00
|
|
|
image_duplicate_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"image/duplicate.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Image/---"),
|
1999-10-03 21:50:19 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Layers */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Layers, Channels & Paths..."), "<control>L",
|
|
|
|
dialogs_create_lc_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/layers_and_channels.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/Layers/---"),
|
|
|
|
|
|
|
|
{ { N_("/Layers/Layer to Imagesize"), NULL,
|
|
|
|
layers_resize_to_image_cmd_callback, 0 },
|
|
|
|
NULL,
|
2000-03-09 04:57:49 +08:00
|
|
|
"layers/layer_to_image_size.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Layers/Stack */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Previous Layer"), "Prior",
|
|
|
|
layers_previous_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#previous_layer", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Next Layer"), "Next",
|
|
|
|
layers_next_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#next_layer", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Raise Layer"), "<shift>Prior",
|
2001-08-04 22:10:58 +08:00
|
|
|
layers_raise_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_RAISE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#raise_layer", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Lower Layer"), "<shift>Next",
|
2001-08-04 22:10:58 +08:00
|
|
|
layers_lower_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_LOWER },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#lower_layer", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Layer to Top"), "<control>Prior",
|
2001-08-04 22:10:58 +08:00
|
|
|
layers_raise_to_top_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_RAISE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#layer_to_top", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Stack/Layer to Bottom"), "<control>Next",
|
2001-08-04 22:10:58 +08:00
|
|
|
layers_lower_to_bottom_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_LOWER },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/stack/stack.html#layer_to_bottom", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/Layers/Stack/---"),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Image>/Layers/Rotate */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/Layers/Rotate")),
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Layers/---"),
|
|
|
|
|
|
|
|
{ { N_("/Layers/Anchor Layer"), "<control>H",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_anchor_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_ANCHOR },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"layers/anchor_layer.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Merge Visible Layers..."), "<control>M",
|
|
|
|
layers_merge_layers_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"layers/dialogs/merge_visible_layers.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Flatten Image"), NULL,
|
|
|
|
layers_flatten_image_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"layers/flatten_image.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Layers/---"),
|
|
|
|
|
|
|
|
{ { N_("/Layers/Mask to Selection"), NULL,
|
|
|
|
layers_mask_select_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"layers/mask_to_selection.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Layers/---"),
|
|
|
|
|
|
|
|
{ { N_("/Layers/Add Alpha Channel"), NULL,
|
|
|
|
layers_add_alpha_channel_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"layers/add_alpha_channel.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Layers/Alpha to Selection"), NULL,
|
|
|
|
layers_alpha_select_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"layers/alpha_to_selection.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Layers/---"),
|
1999-10-04 16:40:33 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Tools */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Tools/Toolbox"), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:toolbox",
|
1999-10-04 16:40:33 +08:00
|
|
|
"toolbox/toolbox.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Tools/Default Colors"), "D",
|
|
|
|
tools_default_colors_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"toolbox/toolbox.html#default_colors", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Tools/Swap Colors"), "X",
|
|
|
|
tools_swap_colors_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"toolbox/toolbox.html#swap_colors", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Tools/Swap Contexts"), "<shift>X",
|
|
|
|
tools_swap_contexts_cmd_callback, 0 },
|
|
|
|
NULL,
|
2001-02-23 11:29:53 +08:00
|
|
|
"toolbox/toolbox.html#swap_colors", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/Tools/---"),
|
1999-01-19 08:03:00 +08:00
|
|
|
|
2001-08-06 04:34:10 +08:00
|
|
|
BRANCH (N_("/Tools/Selection Tools")),
|
|
|
|
BRANCH (N_("/Tools/Paint Tools")),
|
|
|
|
BRANCH (N_("/Tools/Transform Tools")),
|
|
|
|
|
1999-12-20 01:45:04 +08:00
|
|
|
/* <Image>/Dialogs */
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Layers, Channels & Paths..."), "<control>L",
|
|
|
|
dialogs_create_lc_cmd_callback, 0 },
|
|
|
|
NULL,
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/layers_and_channels.html", NULL },
|
2001-04-18 00:00:27 +08:00
|
|
|
{ { N_("/Dialogs/Tool Options..."), NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:tool-options-dialog",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/tool_options.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Dialogs/---"),
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { N_("/Dialogs/Brushes..."), "<control><shift>B",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:brush-grid",
|
|
|
|
"dialogs/brush_selection.html", NULL },
|
|
|
|
{ { N_("/Dialogs/Patterns..."), "<control><shift>P",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:pattern-grid",
|
|
|
|
"dialogs/pattern_selection.html", NULL },
|
|
|
|
{ { N_("/Dialogs/Gradients..."), "<control>G",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:gradient-list",
|
|
|
|
"dialogs/gradient_selection.html", NULL },
|
|
|
|
{ { N_("/Dialogs/Palettes..."), "<control>P",
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-07-15 22:32:44 +08:00
|
|
|
"gimp:palette-list",
|
|
|
|
"dialogs/palette_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Indexed Palette..."), NULL,
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-07-15 22:32:44 +08:00
|
|
|
"gimp:indexed-palette",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/indexed_palette.html", NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { N_("/Dialogs/Buffers..."), "<control>P",
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:buffer-list",
|
|
|
|
NULL, NULL },
|
1999-12-20 01:45:04 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Dialogs/---"),
|
|
|
|
|
|
|
|
{ { N_("/Dialogs/Input Devices..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:input-devices-dialog",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/input_devices.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Device Status..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:device-status-dialog",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/device_status.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Dialogs/---"),
|
|
|
|
|
2001-10-23 01:27:46 +08:00
|
|
|
{ { N_("/Dialogs/Document History..."), NULL,
|
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:document-history",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/document_index.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Error Console..."), NULL,
|
2001-08-07 08:06:06 +08:00
|
|
|
dialogs_create_dockable_cmd_callback, 0 },
|
|
|
|
"gimp:error-console",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/error_console.html", NULL },
|
2000-12-25 04:27:04 +08:00
|
|
|
#ifdef DISPLAY_FILTERS
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Display Filters..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:display-filters-dialogs",
|
1999-12-20 01:45:04 +08:00
|
|
|
"dialogs/display_filters/display_filters.html", NULL },
|
2000-12-25 04:27:04 +08:00
|
|
|
#endif /* DISPLAY_FILTERS */
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Dialogs/Undo History..."), NULL,
|
|
|
|
dialogs_create_toplevel_cmd_callback, 0 },
|
|
|
|
"gimp:undo-history-dialog",
|
2000-03-10 03:58:23 +08:00
|
|
|
"dialogs/undo_history.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
1999-12-20 01:45:04 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/* <Image>/Filters */
|
1999-06-22 06:12:07 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Filters/Repeat Last"), "<alt>F",
|
2001-08-04 22:10:58 +08:00
|
|
|
filters_repeat_cmd_callback, (guint) FALSE,
|
|
|
|
"<StockItem>", GTK_STOCK_EXECUTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"filters/repeat_last.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Filters/Re-Show Last"), "<alt><shift>F",
|
2001-08-04 22:10:58 +08:00
|
|
|
filters_repeat_cmd_callback, (guint) TRUE,
|
|
|
|
"<StockItem>", GTK_STOCK_EXECUTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"filters/reshow_last.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Filters/---"),
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/Filters/Blur")),
|
|
|
|
BRANCH (N_("/Filters/Colors")),
|
|
|
|
BRANCH (N_("/Filters/Noise")),
|
|
|
|
BRANCH (N_("/Filters/Edge-Detect")),
|
|
|
|
BRANCH (N_("/Filters/Enhance")),
|
|
|
|
BRANCH (N_("/Filters/Generic")),
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Filters/---"),
|
2000-12-16 07:28:15 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
BRANCH (N_("/Filters/Glass Effects")),
|
|
|
|
BRANCH (N_("/Filters/Light Effects")),
|
|
|
|
BRANCH (N_("/Filters/Distorts")),
|
|
|
|
BRANCH (N_("/Filters/Artistic")),
|
|
|
|
BRANCH (N_("/Filters/Map")),
|
|
|
|
BRANCH (N_("/Filters/Render")),
|
|
|
|
BRANCH (N_("/Filters/Text")),
|
|
|
|
BRANCH (N_("/Filters/Web")),
|
|
|
|
|
|
|
|
SEPARATOR ("/Filters/---INSERT"),
|
|
|
|
|
|
|
|
BRANCH (N_("/Filters/Animation")),
|
|
|
|
BRANCH (N_("/Filters/Combine")),
|
|
|
|
|
|
|
|
SEPARATOR ("/Filters/---"),
|
|
|
|
|
|
|
|
BRANCH (N_("/Filters/Toys"))
|
1998-06-07 21:55:36 +08:00
|
|
|
};
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Load> *****/
|
|
|
|
|
1999-10-04 00:54:17 +08:00
|
|
|
static GimpItemFactoryEntry load_entries[] =
|
1998-06-07 21:55:36 +08:00
|
|
|
{
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Automatic"), NULL,
|
2001-07-10 01:58:56 +08:00
|
|
|
file_open_by_extension_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"open_by_extension.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---")
|
1998-06-07 21:55:36 +08:00
|
|
|
};
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1998-01-25 10:18:54 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Save> *****/
|
|
|
|
|
1999-10-04 00:54:17 +08:00
|
|
|
static GimpItemFactoryEntry save_entries[] =
|
1998-06-07 21:55:36 +08:00
|
|
|
{
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/By Extension"), NULL,
|
2001-07-10 01:58:56 +08:00
|
|
|
file_save_by_extension_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"save_by_extension.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---")
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Layers> *****/
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
static GimpItemFactoryEntry layers_entries[] =
|
|
|
|
{
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/New Layer..."), "<control>N",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_new_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/new_layer.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
/* <Layers>/Stack */
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Stack/Raise Layer"), "<control>F",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_raise_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_RAISE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"stack/stack.html#raise_layer", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Stack/Lower Layer"), "<control>B",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_lower_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_LOWER },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"stack/stack.html#lower_layer", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Stack/Layer to Top"), "<shift><control>F",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_raise_to_top_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_RAISE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"stack/stack.html#later_to_top", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Stack/Layer to Bottom"), "<shift><control>B",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_lower_to_bottom_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_LOWER },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"stack/stack.html#layer_to_bottom", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Duplicate Layer"), "<control>C",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_duplicate_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"duplicate_layer.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Anchor Layer"), "<control>H",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_anchor_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_ANCHOR },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"anchor_layer.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Delete Layer"), "<control>X",
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_delete_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"delete_layer.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Layer Boundary Size..."), "<control>R",
|
|
|
|
layers_resize_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
"dialogs/layer_boundary_size.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Layer to Imagesize"), NULL,
|
|
|
|
layers_resize_to_image_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-12-18 00:37:50 +08:00
|
|
|
"layer_to_image_size.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Scale Layer..."), "<control>S",
|
2001-08-07 20:42:23 +08:00
|
|
|
layers_scale_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TOOL_SCALE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-18 05:07:28 +08:00
|
|
|
"dialogs/scale_layer.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Merge Visible Layers..."), "<control>M",
|
|
|
|
layers_merge_layers_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/merge_visible_layers.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Merge Down"), "<control><shift>M",
|
|
|
|
layers_merge_down_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"merge_down.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Flatten Image"), NULL,
|
|
|
|
layers_flatten_image_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"flatten_image.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Add Layer Mask..."), NULL,
|
|
|
|
layers_add_layer_mask_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
"dialogs/add_layer_mask.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Apply Layer Mask"), NULL,
|
|
|
|
layers_apply_layer_mask_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-03-01 07:19:14 +08:00
|
|
|
"apply_mask.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Delete Layer Mask"), NULL,
|
|
|
|
layers_delete_layer_mask_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-03-01 07:19:14 +08:00
|
|
|
"delete_mask.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Mask to Selection"), NULL,
|
|
|
|
layers_mask_select_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"mask_to_selection.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Add Alpha Channel"), NULL,
|
|
|
|
layers_add_alpha_channel_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-11-20 20:12:41 +08:00
|
|
|
"add_alpha_channel.html", NULL },
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Alpha to Selection"), NULL,
|
|
|
|
layers_alpha_select_cmd_callback, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"alpha_to_selection.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 00:27:44 +08:00
|
|
|
{ { N_("/Edit Layer Attributes..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
layers_edit_attributes_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"dialogs/edit_layer_attributes.html", NULL }
|
1999-06-07 01:26:51 +08:00
|
|
|
};
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Channels> *****/
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
static GimpItemFactoryEntry channels_entries[] =
|
1999-06-07 01:26:51 +08:00
|
|
|
{
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/New Channel..."), "<control>N",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_new_channel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/new_channel.html", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Raise Channel"), "<control>F",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_raise_channel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_RAISE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"raise_channel.html", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Lower Channel"), "<control>B",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_lower_channel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_LOWER },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"lower_channel.html", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Duplicate Channel"), "<control>C",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_duplicate_channel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"duplicate_channel.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Channel to Selection"), "<control>S",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_channel_to_sel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_SELECTION },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"channel_to_selection.html", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Add to Selection"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_add_channel_to_sel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_SELECTION },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"channel_to_selection.html#add", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Subtract from Selection"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_sub_channel_from_sel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_SELECTION },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"channel_to_selection.html#subtract", NULL },
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Intersect with Selection"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_intersect_channel_with_sel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_SELECTION },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"channel_to_selection.html#intersect", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Delete Channel"), "<control>X",
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_delete_channel_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"delete_channel.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
2001-04-21 10:11:12 +08:00
|
|
|
{ { N_("/Edit Channel Attributes..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
channels_edit_channel_attributes_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"dialogs/edit_channel_attributes.html", NULL }
|
1999-06-07 01:26:51 +08:00
|
|
|
};
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
/***** <Paths> *****/
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
static GimpItemFactoryEntry paths_entries[] =
|
1999-06-07 01:26:51 +08:00
|
|
|
{
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/New Path"), "<control>N",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_new_path_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"new_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Duplicate Path"), "<control>U",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_dup_path_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"duplicate_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Path to Selection"), "<control>S",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_path_to_sel_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_SELECTION },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"path_to_selection.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Selection to Path"), "<control>P",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_sel_to_path_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_TO_PATH },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-12-18 00:37:50 +08:00
|
|
|
"filters/sel2path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Stroke Path"), "<control>T",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_stroke_path_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_STROKE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"stroke_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Delete Path"), "<control>X",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_delete_path_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"delete_path.html", NULL },
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Copy Path"), "<control>C",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_copy_path_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_COPY },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"copy_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Paste Path"), "<control>V",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_paste_path_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_PASTE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-03 21:50:19 +08:00
|
|
|
"paste_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Import Path..."), "<control>I",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_import_path_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_OPEN },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
1999-10-04 16:40:33 +08:00
|
|
|
"dialogs/import_path.html", NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Export Path..."), "<control>E",
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_export_path_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SAVE },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"dialogs/export_path.html", NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Edit Path Attributes..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
paths_dialog_edit_path_attributes_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2000-02-01 06:59:22 +08:00
|
|
|
"dialogs/edit_path_attributes.html", NULL }
|
1999-06-07 01:26:51 +08:00
|
|
|
};
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
/***** <Dialogs> *****/
|
|
|
|
|
|
|
|
static GimpItemFactoryEntry dialogs_entries[] =
|
|
|
|
{
|
2001-04-15 00:37:28 +08:00
|
|
|
{ { N_("/Select Tab"), NULL, NULL, 0 },
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL,
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Layer List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:layer-list",
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Channel List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:channel-list",
|
2001-04-15 00:37:28 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Path List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:path-list",
|
2001-05-12 01:02:30 +08:00
|
|
|
NULL, NULL },
|
2001-07-15 22:32:44 +08:00
|
|
|
{ { N_("/Add Tab/Indexed Palette..."), NULL,
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_add_tab_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-07-15 22:32:44 +08:00
|
|
|
"gimp:indexed-palette",
|
|
|
|
NULL, NULL },
|
2001-08-11 15:47:35 +08:00
|
|
|
{ { N_("/Add Tab/Document History..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:document-history",
|
|
|
|
NULL, NULL },
|
2001-08-07 08:06:06 +08:00
|
|
|
{ { N_("/Add Tab/Error Console..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:error-console",
|
|
|
|
NULL, NULL },
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Brush List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:brush-list",
|
2001-04-15 00:37:28 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Brush Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:brush-grid",
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Pattern List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:pattern-list",
|
2001-05-11 23:17:39 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Pattern Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:pattern-grid",
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Gradient List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:gradient-list",
|
2001-05-11 23:17:39 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Gradient Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:gradient-grid",
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Palette List..."), NULL,
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_add_tab_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-06-30 03:25:03 +08:00
|
|
|
"gimp:palette-list",
|
2001-05-11 23:17:39 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Palette Grid..."), NULL,
|
2001-08-10 00:39:08 +08:00
|
|
|
dialogs_add_tab_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
2001-06-30 03:25:03 +08:00
|
|
|
"gimp:palette-grid",
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL, NULL },
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-05-11 23:17:39 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Tool List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:tool-list",
|
2001-05-11 23:17:39 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Tool Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:tool-grid",
|
2001-04-15 00:37:28 +08:00
|
|
|
NULL, NULL },
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/Add Tab/---"),
|
|
|
|
|
|
|
|
{ { N_("/Add Tab/Image List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:image-list",
|
2001-04-20 10:30:43 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Image Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:image-grid",
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/Add Tab/---"),
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Buffer List..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:buffer-list",
|
2001-04-20 10:30:43 +08:00
|
|
|
NULL, NULL },
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Add Tab/Buffer Grid..."), NULL,
|
|
|
|
dialogs_add_tab_cmd_callback, 0 },
|
|
|
|
"gimp:buffer-grid",
|
2001-06-26 20:09:43 +08:00
|
|
|
NULL, NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
{ { N_("/Remove Tab"), NULL,
|
|
|
|
dialogs_remove_tab_cmd_callback, 0 },
|
|
|
|
NULL,
|
2001-06-26 20:09:43 +08:00
|
|
|
NULL, NULL },
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Show Image Menu"), NULL,
|
|
|
|
dialogs_toggle_image_menu_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
2001-06-26 20:09:43 +08:00
|
|
|
NULL, NULL },
|
2001-07-02 22:58:02 +08:00
|
|
|
{ { N_("/Auto Follow Active Image"), NULL,
|
|
|
|
dialogs_toggle_auto_cmd_callback, 0, "<ToggleItem>" },
|
|
|
|
NULL,
|
|
|
|
NULL, NULL }
|
2001-06-30 03:25:03 +08:00
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-07-09 05:44:52 +08:00
|
|
|
/***** <Brushes> *****/
|
|
|
|
|
|
|
|
static GimpItemFactoryEntry brushes_entries[] =
|
|
|
|
{
|
|
|
|
{ { N_("/New Brush"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_new_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Duplicate Brush"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_duplicate_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Edit Brush..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_edit_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Delete Brush..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_delete_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Refresh Brushes"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_refresh_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_REFRESH },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/***** <Patterns> *****/
|
|
|
|
|
|
|
|
static GimpItemFactoryEntry patterns_entries[] =
|
|
|
|
{
|
|
|
|
{ { N_("/New Pattern"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_new_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Duplicate Pattern"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_duplicate_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Edit Pattern..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_edit_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Delete Pattern..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_delete_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Refresh Patterns"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_refresh_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_REFRESH },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/***** <Gradients> *****/
|
|
|
|
|
|
|
|
static GimpItemFactoryEntry gradients_entries[] =
|
|
|
|
{
|
|
|
|
{ { N_("/New Gradient"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_new_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Duplicate Gradient"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_duplicate_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Edit Gradient..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_edit_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Delete Gradient..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_delete_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Refresh Gradients"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_refresh_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_REFRESH },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Save as POV-Ray..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
gradients_save_as_pov_ray_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_SAVE_AS },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/***** <Palettes> *****/
|
|
|
|
|
|
|
|
static GimpItemFactoryEntry palettes_entries[] =
|
|
|
|
{
|
|
|
|
{ { N_("/New Palette"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_new_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_NEW },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Duplicate Palette"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_duplicate_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Edit Palette..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_edit_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_EDIT },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Delete Palette..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_delete_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_DELETE },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Refresh Palettes"), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
data_refresh_data_cmd_callback, 0,
|
|
|
|
"<StockItem>", GIMP_STOCK_REFRESH },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
|
|
|
|
SEPARATOR ("/---"),
|
|
|
|
|
|
|
|
{ { N_("/Import Palette..."), NULL,
|
2001-08-05 04:38:54 +08:00
|
|
|
palettes_import_palette_cmd_callback, 0,
|
|
|
|
"<StockItem>", GTK_STOCK_CONVERT },
|
2001-07-09 05:44:52 +08:00
|
|
|
NULL,
|
|
|
|
NULL, NULL },
|
|
|
|
{ { N_("/Merge Palettes..."), NULL,
|
|
|
|
palettes_merge_palettes_cmd_callback, 0 },
|
|
|
|
NULL,
|
|
|
|
NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
static gboolean menus_initialized = FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
|
2001-08-07 20:42:23 +08:00
|
|
|
static GtkItemFactory *toolbox_factory = NULL;
|
|
|
|
static GtkItemFactory *image_factory = NULL;
|
|
|
|
static GtkItemFactory *load_factory = NULL;
|
|
|
|
static GtkItemFactory *save_factory = NULL;
|
|
|
|
static GtkItemFactory *layers_factory = NULL;
|
|
|
|
static GtkItemFactory *channels_factory = NULL;
|
|
|
|
static GtkItemFactory *paths_factory = NULL;
|
|
|
|
static GtkItemFactory *dialogs_factory = NULL;
|
|
|
|
static GtkItemFactory *brushes_factory = NULL;
|
|
|
|
static GtkItemFactory *patterns_factory = NULL;
|
|
|
|
static GtkItemFactory *gradients_factory = NULL;
|
|
|
|
static GtkItemFactory *palettes_factory = NULL;
|
|
|
|
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_toolbox_factory (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! toolbox_factory)
|
|
|
|
{
|
|
|
|
GimpItemFactoryEntry *last_opened_entries;
|
|
|
|
GtkWidget *menu_item;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
toolbox_factory = menus_item_factory_new (GTK_TYPE_MENU_BAR,
|
|
|
|
"<Toolbox>", "toolbox",
|
|
|
|
G_N_ELEMENTS (toolbox_entries),
|
|
|
|
toolbox_entries,
|
|
|
|
NULL,
|
|
|
|
TRUE);
|
|
|
|
|
|
|
|
last_opened_entries = g_new (GimpItemFactoryEntry,
|
|
|
|
gimprc.last_opened_size);
|
|
|
|
|
|
|
|
for (i = 0; i < gimprc.last_opened_size; i++)
|
|
|
|
{
|
|
|
|
last_opened_entries[i].entry.path =
|
|
|
|
g_strdup_printf ("/File/MRU%02d", i + 1);
|
|
|
|
|
|
|
|
if (i < 9)
|
|
|
|
last_opened_entries[i].entry.accelerator =
|
|
|
|
g_strdup_printf ("<control>%d", i + 1);
|
|
|
|
else
|
|
|
|
last_opened_entries[i].entry.accelerator = NULL;
|
|
|
|
|
|
|
|
last_opened_entries[i].entry.callback = file_last_opened_cmd_callback;
|
|
|
|
last_opened_entries[i].entry.callback_action = i;
|
|
|
|
last_opened_entries[i].entry.item_type = "<StockItem>";
|
|
|
|
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
|
|
|
|
last_opened_entries[i].quark_string = NULL;
|
|
|
|
last_opened_entries[i].help_page = "file/last_opened.html";
|
|
|
|
last_opened_entries[i].description = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
menus_create_items (toolbox_factory, gimprc.last_opened_size,
|
|
|
|
last_opened_entries, NULL, 2, TRUE, FALSE);
|
|
|
|
|
|
|
|
for (i = 0; i < gimprc.last_opened_size; i++)
|
|
|
|
{
|
|
|
|
menu_item =
|
|
|
|
gtk_item_factory_get_widget (toolbox_factory,
|
|
|
|
last_opened_entries[i].entry.path);
|
|
|
|
gtk_widget_hide (menu_item);
|
|
|
|
}
|
|
|
|
|
|
|
|
menu_item = gtk_item_factory_get_widget (toolbox_factory, "/File/---MRU");
|
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
|
|
|
gtk_widget_hide (menu_item);
|
|
|
|
|
|
|
|
menu_item = gtk_item_factory_get_widget (toolbox_factory, "/File/Quit");
|
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
|
|
|
|
|
|
|
for (i = 0; i < gimprc.last_opened_size; i++)
|
|
|
|
{
|
|
|
|
g_free (last_opened_entries[i].entry.path);
|
|
|
|
g_free (last_opened_entries[i].entry.accelerator);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (last_opened_entries);
|
|
|
|
}
|
2001-04-16 02:01:57 +08:00
|
|
|
|
|
|
|
return toolbox_factory;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_image_factory (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! image_factory)
|
|
|
|
{
|
|
|
|
image_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Image>", "image",
|
|
|
|
G_N_ELEMENTS (image_entries),
|
|
|
|
image_entries,
|
|
|
|
NULL,
|
|
|
|
TRUE);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return image_factory;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_load_factory (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! load_factory)
|
|
|
|
{
|
|
|
|
load_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Load>", "open",
|
|
|
|
G_N_ELEMENTS (load_entries),
|
|
|
|
load_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return load_factory;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_save_factory (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! save_factory)
|
|
|
|
{
|
|
|
|
save_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Save>", "save",
|
|
|
|
G_N_ELEMENTS (save_entries),
|
|
|
|
save_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return save_factory;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_layers_factory (void)
|
1999-06-07 01:26:51 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! layers_factory)
|
|
|
|
{
|
|
|
|
layers_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Layers>", "layers",
|
|
|
|
G_N_ELEMENTS (layers_entries),
|
|
|
|
layers_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
1999-06-07 01:26:51 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return layers_factory;
|
1999-06-07 01:26:51 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_channels_factory (void)
|
1999-06-07 01:26:51 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! channels_factory)
|
|
|
|
{
|
|
|
|
channels_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Channels>", "channels",
|
|
|
|
G_N_ELEMENTS (channels_entries),
|
|
|
|
channels_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
1999-06-07 01:26:51 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return channels_factory;
|
1999-06-07 01:26:51 +08:00
|
|
|
}
|
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_paths_factory (void)
|
1999-06-07 01:26:51 +08:00
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! paths_factory)
|
|
|
|
{
|
|
|
|
paths_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Paths>", "paths",
|
|
|
|
G_N_ELEMENTS (paths_entries),
|
|
|
|
paths_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
1999-06-07 01:26:51 +08:00
|
|
|
|
2001-04-16 02:01:57 +08:00
|
|
|
return paths_factory;
|
1999-06-07 01:26:51 +08:00
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_dialogs_factory (void)
|
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! dialogs_factory)
|
|
|
|
{
|
|
|
|
dialogs_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Dialogs>", "dialogs",
|
|
|
|
G_N_ELEMENTS (dialogs_entries),
|
|
|
|
dialogs_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_factory;
|
|
|
|
}
|
|
|
|
|
2001-07-09 05:44:52 +08:00
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_brushes_factory (void)
|
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! brushes_factory)
|
|
|
|
{
|
|
|
|
brushes_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Brushes>", "brushes",
|
|
|
|
G_N_ELEMENTS (brushes_entries),
|
|
|
|
brushes_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
2001-07-09 05:44:52 +08:00
|
|
|
|
|
|
|
return brushes_factory;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_patterns_factory (void)
|
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! patterns_factory)
|
|
|
|
{
|
|
|
|
patterns_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Patterns>", "patterns",
|
|
|
|
G_N_ELEMENTS (patterns_entries),
|
|
|
|
patterns_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
2001-07-09 05:44:52 +08:00
|
|
|
|
|
|
|
return patterns_factory;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_gradients_factory (void)
|
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! gradients_factory)
|
|
|
|
{
|
|
|
|
gradients_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Gradients>", "gradients",
|
|
|
|
G_N_ELEMENTS (gradients_entries),
|
|
|
|
gradients_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
2001-07-09 05:44:52 +08:00
|
|
|
|
|
|
|
return gradients_factory;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkItemFactory *
|
|
|
|
menus_get_palettes_factory (void)
|
|
|
|
{
|
2001-08-07 20:42:23 +08:00
|
|
|
if (! palettes_factory)
|
|
|
|
{
|
|
|
|
palettes_factory = menus_item_factory_new (GTK_TYPE_MENU,
|
|
|
|
"<Palettes>", "palettes",
|
|
|
|
G_N_ELEMENTS (palettes_entries),
|
|
|
|
palettes_entries,
|
|
|
|
NULL,
|
|
|
|
FALSE);
|
|
|
|
}
|
2001-07-09 05:44:52 +08:00
|
|
|
|
|
|
|
return palettes_factory;
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
1999-10-04 00:54:17 +08:00
|
|
|
menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
|
2000-02-24 04:25:24 +08:00
|
|
|
gchar *domain_name,
|
1999-10-04 00:54:17 +08:00
|
|
|
gpointer callback_data)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
1999-11-25 19:35:48 +08:00
|
|
|
GtkItemFactory *item_factory;
|
2001-01-14 23:18:37 +08:00
|
|
|
gchar *path;
|
|
|
|
|
|
|
|
g_return_if_fail (entry != NULL);
|
1999-02-25 16:24:51 +08:00
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
if (!menus_initialized)
|
1997-11-25 06:05:25 +08:00
|
|
|
menus_init ();
|
|
|
|
|
1999-11-25 19:35:48 +08:00
|
|
|
path = entry->entry.path;
|
2001-01-14 23:18:37 +08:00
|
|
|
|
|
|
|
if (!path)
|
|
|
|
return;
|
|
|
|
|
1999-11-25 19:35:48 +08:00
|
|
|
item_factory = gtk_item_factory_from_path (path);
|
1999-02-25 16:24:51 +08:00
|
|
|
|
1999-11-25 19:35:48 +08:00
|
|
|
if (!item_factory)
|
1999-10-04 00:54:17 +08:00
|
|
|
{
|
1999-11-25 19:35:48 +08:00
|
|
|
g_warning ("entry refers to unknown item factory: \"%s\"", path);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2001-07-28 03:41:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (item_factory), "textdomain", domain_name);
|
2000-02-24 04:25:24 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
while (*path != '>')
|
|
|
|
path++;
|
|
|
|
path++;
|
1999-11-24 03:11:29 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
entry->entry.path = path;
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
menus_create_item (item_factory, entry, callback_data, 2, TRUE, FALSE);
|
2000-03-09 04:57:49 +08:00
|
|
|
}
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
static void
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
menus_create_branches (GtkItemFactory *item_factory,
|
|
|
|
GimpItemFactoryEntry *entry)
|
2000-03-09 04:57:49 +08:00
|
|
|
{
|
|
|
|
GString *tearoff_path;
|
2001-01-02 10:33:43 +08:00
|
|
|
gint factory_length;
|
|
|
|
gchar *p;
|
|
|
|
gchar *path;
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2001-01-14 23:18:37 +08:00
|
|
|
if (! entry->entry.path)
|
|
|
|
return;
|
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
tearoff_path = g_string_new ("");
|
1999-11-24 03:11:29 +08:00
|
|
|
|
2000-03-11 21:49:16 +08:00
|
|
|
path = entry->entry.path;
|
2000-03-09 04:57:49 +08:00
|
|
|
p = strchr (path, '/');
|
|
|
|
factory_length = p - path;
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
/* skip the first slash */
|
|
|
|
if (p)
|
|
|
|
p = strchr (p + 1, '/');
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
while (p)
|
|
|
|
{
|
|
|
|
g_string_assign (tearoff_path, path + factory_length);
|
|
|
|
g_string_truncate (tearoff_path, p - path - factory_length);
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
if (!gtk_item_factory_get_widget (item_factory, tearoff_path->str))
|
|
|
|
{
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
GimpItemFactoryEntry branch_entry =
|
|
|
|
{
|
|
|
|
{ NULL, NULL, NULL, 0, "<Branch>" },
|
2000-03-09 04:57:49 +08:00
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
branch_entry.entry.path = tearoff_path->str;
|
2001-07-28 03:41:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (item_factory), "complete", path);
|
2001-06-30 03:25:03 +08:00
|
|
|
menus_create_item (item_factory, &branch_entry, NULL, 2, TRUE, FALSE);
|
2001-07-28 03:41:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (item_factory), "complete", NULL);
|
2000-03-11 21:49:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
g_string_append (tearoff_path, "/tearoff1");
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
if (! gtk_item_factory_get_widget (item_factory, tearoff_path->str))
|
2000-03-11 21:49:16 +08:00
|
|
|
{
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
GimpItemFactoryEntry tearoff_entry =
|
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
{ NULL, NULL, menus_tearoff_cmd_callback, 0, "<Tearoff>" },
|
2000-03-11 21:49:16 +08:00
|
|
|
NULL,
|
2001-06-30 03:25:03 +08:00
|
|
|
NULL, NULL
|
2000-03-11 21:49:16 +08:00
|
|
|
};
|
2000-03-09 04:57:49 +08:00
|
|
|
|
|
|
|
tearoff_entry.entry.path = tearoff_path->str;
|
2001-07-10 01:58:56 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
menus_create_item (item_factory, &tearoff_entry, NULL, 2, TRUE, FALSE);
|
2000-03-09 04:57:49 +08:00
|
|
|
}
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
p = strchr (p + 1, '/');
|
|
|
|
}
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2000-03-09 04:57:49 +08:00
|
|
|
g_string_free (tearoff_path, TRUE);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
1999-11-22 20:02:46 +08:00
|
|
|
static void
|
|
|
|
menus_filters_subdirs_to_top (GtkMenu *menu)
|
|
|
|
{
|
|
|
|
GtkMenuItem *menu_item;
|
2001-02-24 10:42:09 +08:00
|
|
|
GList *list;
|
|
|
|
gboolean submenus_passed = FALSE;
|
|
|
|
gint pos;
|
|
|
|
gint items;
|
1999-11-22 20:02:46 +08:00
|
|
|
|
2001-02-24 10:42:09 +08:00
|
|
|
pos = 1;
|
2000-03-09 04:57:49 +08:00
|
|
|
items = 0;
|
1999-11-22 20:02:46 +08:00
|
|
|
|
|
|
|
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
|
|
{
|
|
|
|
menu_item = GTK_MENU_ITEM (list->data);
|
2000-03-09 04:57:49 +08:00
|
|
|
items++;
|
|
|
|
|
1999-11-22 20:02:46 +08:00
|
|
|
if (menu_item->submenu)
|
|
|
|
{
|
1999-11-25 19:35:48 +08:00
|
|
|
if (submenus_passed)
|
|
|
|
{
|
|
|
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
2000-03-09 04:57:49 +08:00
|
|
|
gtk_menu_reorder_child (menu, GTK_WIDGET (menu_item), pos++);
|
1999-11-25 19:35:48 +08:00
|
|
|
}
|
1999-11-22 20:02:46 +08:00
|
|
|
}
|
1999-11-25 19:35:48 +08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
submenus_passed = TRUE;
|
|
|
|
}
|
1999-11-22 20:02:46 +08:00
|
|
|
}
|
|
|
|
|
2000-03-11 21:49:16 +08:00
|
|
|
if (pos > 1 && items > pos)
|
1999-11-22 20:02:46 +08:00
|
|
|
{
|
|
|
|
GtkWidget *separator;
|
|
|
|
|
|
|
|
separator = gtk_menu_item_new ();
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), separator, pos);
|
1999-11-22 20:02:46 +08:00
|
|
|
gtk_widget_show (separator);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1998-06-22 04:17:21 +08:00
|
|
|
void
|
1999-11-20 20:12:41 +08:00
|
|
|
menus_reorder_plugins (void)
|
|
|
|
{
|
1999-11-24 05:02:54 +08:00
|
|
|
static gchar *rotate_plugins[] = { "90 degrees",
|
|
|
|
"180 degrees",
|
|
|
|
"270 degrees" };
|
|
|
|
static gint n_rotate_plugins = (sizeof (rotate_plugins) /
|
|
|
|
sizeof (rotate_plugins[0]));
|
|
|
|
|
1999-11-25 19:35:48 +08:00
|
|
|
static gchar *image_file_entries[] = { "---moved",
|
|
|
|
"Close",
|
|
|
|
"Quit" };
|
|
|
|
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
|
|
|
sizeof (image_file_entries[0]));
|
|
|
|
|
2000-03-11 21:49:16 +08:00
|
|
|
static gchar *reorder_submenus[] = { "<Image>/Video",
|
|
|
|
"<Image>/Script-Fu" };
|
1999-11-26 18:17:19 +08:00
|
|
|
static gint n_reorder_submenus = (sizeof (reorder_submenus) /
|
|
|
|
sizeof (reorder_submenus[0]));
|
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
static gchar *reorder_subsubmenus[] = { "<Image>/Filters",
|
|
|
|
"<Toolbox>/Xtns" };
|
|
|
|
static gint n_reorder_subsubmenus = (sizeof (reorder_subsubmenus) /
|
|
|
|
sizeof (reorder_subsubmenus[0]));
|
|
|
|
|
1999-11-26 18:17:19 +08:00
|
|
|
GtkItemFactory *item_factory;
|
1999-11-20 20:12:41 +08:00
|
|
|
GtkWidget *menu_item;
|
1999-11-26 18:17:19 +08:00
|
|
|
GtkWidget *menu;
|
2001-01-23 04:46:50 +08:00
|
|
|
GList *list;
|
|
|
|
gchar *path;
|
|
|
|
gint i, pos;
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2000-02-12 23:01:33 +08:00
|
|
|
/* Move all menu items under "<Toolbox>/Xtns" which are not submenus or
|
|
|
|
* separators to the top of the menu
|
|
|
|
*/
|
|
|
|
pos = 1;
|
|
|
|
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
|
|
"/Xtns/Module Browser...");
|
|
|
|
if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent))
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
2000-02-12 23:01:33 +08:00
|
|
|
menu = menu_item->parent;
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2000-02-12 23:01:33 +08:00
|
|
|
for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list;
|
|
|
|
list = g_list_next (list))
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
2000-02-12 23:01:33 +08:00
|
|
|
menu_item = GTK_WIDGET (list->data);
|
|
|
|
|
|
|
|
if (! GTK_MENU_ITEM (menu_item)->submenu &&
|
|
|
|
GTK_IS_LABEL (GTK_BIN (menu_item)->child))
|
|
|
|
{
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent),
|
|
|
|
menu_item, pos);
|
|
|
|
list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos);
|
|
|
|
pos++;
|
|
|
|
}
|
1999-11-20 20:12:41 +08:00
|
|
|
}
|
|
|
|
}
|
1999-11-20 23:10:26 +08:00
|
|
|
|
2000-05-08 06:04:51 +08:00
|
|
|
/* Move all menu items under "<Image>/Filters" which are not submenus or
|
|
|
|
* separators to the top of the menu
|
|
|
|
*/
|
|
|
|
pos = 3;
|
1999-11-20 23:10:26 +08:00
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory,
|
|
|
|
"/Filters/Filter all Layers...");
|
2000-05-08 06:04:51 +08:00
|
|
|
if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent))
|
|
|
|
{
|
|
|
|
menu = menu_item->parent;
|
|
|
|
|
|
|
|
for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list;
|
|
|
|
list = g_list_next (list))
|
|
|
|
{
|
|
|
|
menu_item = GTK_WIDGET (list->data);
|
|
|
|
|
|
|
|
if (! GTK_MENU_ITEM (menu_item)->submenu &&
|
|
|
|
GTK_IS_LABEL (GTK_BIN (menu_item)->child))
|
|
|
|
{
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent),
|
|
|
|
menu_item, pos);
|
|
|
|
list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos);
|
|
|
|
pos++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-11-22 20:02:46 +08:00
|
|
|
|
1999-11-24 05:02:54 +08:00
|
|
|
/* Reorder Rotate plugin menu entries */
|
|
|
|
pos = 2;
|
|
|
|
for (i = 0; i < n_rotate_plugins; i++)
|
|
|
|
{
|
|
|
|
path = g_strconcat ("/Image/Transforms/Rotate/", rotate_plugins[i], NULL);
|
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory, path);
|
1999-11-25 19:35:48 +08:00
|
|
|
g_free (path);
|
|
|
|
|
1999-11-24 05:02:54 +08:00
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
{
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
|
|
|
|
pos++;
|
|
|
|
}
|
|
|
|
}
|
1999-11-25 19:35:48 +08:00
|
|
|
|
1999-11-24 05:02:54 +08:00
|
|
|
pos = 2;
|
|
|
|
for (i = 0; i < n_rotate_plugins; i++)
|
|
|
|
{
|
|
|
|
path = g_strconcat ("/Layers/Rotate/", rotate_plugins[i], NULL);
|
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory, path);
|
1999-11-25 19:35:48 +08:00
|
|
|
g_free (path);
|
|
|
|
|
1999-11-24 05:02:54 +08:00
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
{
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
|
|
|
|
pos++;
|
|
|
|
}
|
1999-11-25 19:35:48 +08:00
|
|
|
}
|
|
|
|
|
1999-12-04 21:08:45 +08:00
|
|
|
/* Reorder "<Image>/File" */
|
1999-11-25 19:35:48 +08:00
|
|
|
for (i = 0; i < n_image_file_entries; i++)
|
|
|
|
{
|
|
|
|
path = g_strconcat ("/File/", image_file_entries[i], NULL);
|
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory, path);
|
1999-11-24 05:02:54 +08:00
|
|
|
g_free (path);
|
1999-11-25 19:35:48 +08:00
|
|
|
|
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
|
|
|
}
|
|
|
|
|
1999-11-26 18:17:19 +08:00
|
|
|
/* Reorder menus where plugins registered submenus */
|
|
|
|
for (i = 0; i < n_reorder_submenus; i++)
|
1999-11-25 19:35:48 +08:00
|
|
|
{
|
1999-11-26 18:17:19 +08:00
|
|
|
item_factory = gtk_item_factory_from_path (reorder_submenus[i]);
|
|
|
|
menu = gtk_item_factory_get_widget (item_factory,
|
|
|
|
reorder_submenus[i]);
|
1999-11-25 19:35:48 +08:00
|
|
|
|
1999-11-26 18:17:19 +08:00
|
|
|
if (menu && GTK_IS_MENU (menu))
|
|
|
|
{
|
|
|
|
menus_filters_subdirs_to_top (GTK_MENU (menu));
|
|
|
|
}
|
1999-11-25 19:35:48 +08:00
|
|
|
}
|
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
for (i = 0; i < n_reorder_subsubmenus; i++)
|
1999-11-25 19:35:48 +08:00
|
|
|
{
|
1999-12-02 21:00:18 +08:00
|
|
|
item_factory = gtk_item_factory_from_path (reorder_subsubmenus[i]);
|
1999-11-26 18:17:19 +08:00
|
|
|
menu = gtk_item_factory_get_widget (item_factory,
|
1999-12-02 21:00:18 +08:00
|
|
|
reorder_subsubmenus[i]);
|
1999-11-25 19:35:48 +08:00
|
|
|
|
1999-11-26 18:17:19 +08:00
|
|
|
if (menu && GTK_IS_MENU (menu))
|
|
|
|
{
|
|
|
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
|
|
|
list = g_list_next (list))
|
|
|
|
{
|
|
|
|
GtkMenuItem *menu_item;
|
|
|
|
|
|
|
|
menu_item = GTK_MENU_ITEM (list->data);
|
|
|
|
|
|
|
|
if (menu_item->submenu)
|
|
|
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
|
|
|
}
|
|
|
|
}
|
1999-11-24 05:02:54 +08:00
|
|
|
}
|
1999-12-02 21:00:18 +08:00
|
|
|
|
2000-12-16 07:28:15 +08:00
|
|
|
/* Move all submenus which registered after "<Image>/Filters/Toys"
|
1999-12-04 21:08:45 +08:00
|
|
|
* before the separator after "<Image>/Filters/Web"
|
|
|
|
*/
|
1999-12-02 21:00:18 +08:00
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory,
|
|
|
|
"/Filters/---INSERT");
|
|
|
|
|
|
|
|
if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent))
|
|
|
|
{
|
|
|
|
menu = menu_item->parent;
|
|
|
|
pos = g_list_index (GTK_MENU_SHELL (menu)->children, menu_item);
|
|
|
|
|
1999-12-04 21:08:45 +08:00
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory,
|
2000-12-16 07:28:15 +08:00
|
|
|
"/Filters/Toys");
|
1999-12-04 21:08:45 +08:00
|
|
|
|
|
|
|
if (menu_item && GTK_IS_MENU (menu_item))
|
1999-12-02 21:00:18 +08:00
|
|
|
{
|
|
|
|
GList *list;
|
1999-12-04 21:08:45 +08:00
|
|
|
gint index = 1;
|
|
|
|
|
|
|
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
|
|
|
list = g_list_next (list))
|
|
|
|
{
|
|
|
|
if (GTK_MENU_ITEM (list->data)->submenu == menu_item)
|
|
|
|
break;
|
1999-12-02 21:00:18 +08:00
|
|
|
|
1999-12-04 21:08:45 +08:00
|
|
|
index++;
|
|
|
|
}
|
1999-12-02 21:00:18 +08:00
|
|
|
|
1999-12-04 21:08:45 +08:00
|
|
|
while ((menu_item = g_list_nth_data (GTK_MENU_SHELL (menu)->children,
|
|
|
|
index)))
|
1999-12-02 21:00:18 +08:00
|
|
|
{
|
1999-12-04 21:08:45 +08:00
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu), menu_item, pos);
|
|
|
|
|
|
|
|
pos++;
|
|
|
|
index++;
|
1999-12-02 21:00:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-11-20 20:12:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-02-21 20:18:09 +08:00
|
|
|
menus_tools_create (GimpToolInfo *tool_info)
|
1998-06-22 04:17:21 +08:00
|
|
|
{
|
2001-08-06 00:08:19 +08:00
|
|
|
GimpItemFactoryEntry entry;
|
2001-02-21 20:18:09 +08:00
|
|
|
|
2000-05-08 06:04:51 +08:00
|
|
|
if (tool_info->menu_path == NULL)
|
|
|
|
return;
|
|
|
|
|
2001-02-24 10:42:09 +08:00
|
|
|
entry.entry.path = tool_info->menu_path;
|
1999-10-28 23:05:49 +08:00
|
|
|
entry.entry.accelerator = tool_info->menu_accel;
|
|
|
|
entry.entry.callback = tools_select_cmd_callback;
|
2001-02-24 10:42:09 +08:00
|
|
|
entry.entry.callback_action = tool_info->tool_type;
|
2001-08-06 00:08:19 +08:00
|
|
|
entry.entry.item_type = "<StockItem>";
|
|
|
|
entry.entry.extra_data = tool_info->stock_id;
|
2001-06-30 03:25:03 +08:00
|
|
|
entry.quark_string = NULL;
|
2001-02-14 12:55:21 +08:00
|
|
|
entry.help_page = tool_info->help_data;
|
1999-10-28 23:05:49 +08:00
|
|
|
entry.description = NULL;
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-08-06 00:08:19 +08:00
|
|
|
menus_create_item (image_factory,
|
|
|
|
&entry, tool_info,
|
|
|
|
2,
|
|
|
|
TRUE, FALSE);
|
1998-06-22 04:17:21 +08:00
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
1999-10-04 00:54:17 +08:00
|
|
|
menus_set_sensitive (gchar *path,
|
|
|
|
gboolean sensitive)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
1998-06-07 21:55:36 +08:00
|
|
|
GtkItemFactory *ifactory;
|
2001-01-23 04:46:50 +08:00
|
|
|
GtkWidget *widget = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-01-14 23:18:37 +08:00
|
|
|
if (! path)
|
|
|
|
return;
|
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
if (!menus_initialized)
|
1997-11-25 06:05:25 +08:00
|
|
|
menus_init ();
|
|
|
|
|
1998-06-07 21:55:36 +08:00
|
|
|
ifactory = gtk_item_factory_from_path (path);
|
|
|
|
|
|
|
|
if (ifactory)
|
|
|
|
{
|
|
|
|
widget = gtk_item_factory_get_widget (ifactory, path);
|
1999-06-22 06:12:07 +08:00
|
|
|
|
1999-11-24 03:11:29 +08:00
|
|
|
if (widget)
|
|
|
|
gtk_widget_set_sensitive (widget, sensitive);
|
1998-06-07 21:55:36 +08:00
|
|
|
}
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2000-12-18 00:05:41 +08:00
|
|
|
if ((!ifactory || !widget) && ! strstr (path, "Script-Fu"))
|
1999-10-04 00:54:17 +08:00
|
|
|
g_warning ("Unable to set sensitivity for menu which doesn't exist:\n%s",
|
|
|
|
path);
|
1999-06-22 06:12:07 +08:00
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-06-07 05:58:48 +08:00
|
|
|
void
|
1999-10-04 00:54:17 +08:00
|
|
|
menus_set_state (gchar *path,
|
|
|
|
gboolean state)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
1998-06-07 21:55:36 +08:00
|
|
|
GtkItemFactory *ifactory;
|
2001-01-23 04:46:50 +08:00
|
|
|
GtkWidget *widget = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
if (!menus_initialized)
|
1997-11-25 06:05:25 +08:00
|
|
|
menus_init ();
|
|
|
|
|
1998-06-07 21:55:36 +08:00
|
|
|
ifactory = gtk_item_factory_from_path (path);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-06-07 21:55:36 +08:00
|
|
|
if (ifactory)
|
|
|
|
{
|
|
|
|
widget = gtk_item_factory_get_widget (ifactory, path);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-06-07 21:55:36 +08:00
|
|
|
if (widget && GTK_IS_CHECK_MENU_ITEM (widget))
|
1999-01-21 09:05:24 +08:00
|
|
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget), state);
|
1998-06-07 21:55:36 +08:00
|
|
|
else
|
|
|
|
widget = NULL;
|
|
|
|
}
|
1999-11-24 03:11:29 +08:00
|
|
|
|
2000-12-18 00:05:41 +08:00
|
|
|
if ((!ifactory || !widget) && ! strstr (path, "Script-Fu"))
|
2001-02-24 10:42:09 +08:00
|
|
|
g_warning ("Unable to set state for menu which doesn't exist:\n%s",
|
1999-10-04 00:54:17 +08:00
|
|
|
path);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-10-04 00:54:17 +08:00
|
|
|
menus_destroy (gchar *path)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2000-10-29 21:28:48 +08:00
|
|
|
if (!menus_initialized)
|
1997-11-25 06:05:25 +08:00
|
|
|
menus_init ();
|
|
|
|
|
1998-06-07 21:55:36 +08:00
|
|
|
gtk_item_factories_path_delete (NULL, path);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
static void
|
1999-06-05 10:11:16 +08:00
|
|
|
menus_last_opened_update_labels (void)
|
1998-07-12 13:18:17 +08:00
|
|
|
{
|
1999-06-22 06:12:07 +08:00
|
|
|
GSList *filename_slist;
|
2000-04-08 04:04:00 +08:00
|
|
|
GString *entry_filename;
|
|
|
|
GString *path;
|
1999-06-22 06:12:07 +08:00
|
|
|
GtkWidget *widget;
|
|
|
|
gint i;
|
|
|
|
guint num_entries;
|
1998-07-12 13:18:17 +08:00
|
|
|
|
|
|
|
entry_filename = g_string_new ("");
|
|
|
|
path = g_string_new ("");
|
|
|
|
|
|
|
|
filename_slist = last_opened_raw_filenames;
|
2001-07-10 01:58:56 +08:00
|
|
|
num_entries = g_slist_length (last_opened_raw_filenames);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
|
|
|
for (i = 1; i <= num_entries; i++)
|
|
|
|
{
|
2001-08-30 01:48:28 +08:00
|
|
|
gchar *basename;
|
|
|
|
|
|
|
|
basename = g_path_get_basename (((GString *) filename_slist->data)->str);
|
|
|
|
|
|
|
|
g_string_printf (entry_filename, "%d. %s", i, basename);
|
|
|
|
|
|
|
|
g_free (basename);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
2001-08-01 08:35:59 +08:00
|
|
|
g_string_printf (path, "/File/MRU%02d", i);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
|
|
|
widget = gtk_item_factory_get_widget (toolbox_factory, path->str);
|
1999-12-02 21:00:18 +08:00
|
|
|
if (widget)
|
|
|
|
{
|
|
|
|
gtk_widget_show (widget);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
2000-08-28 08:42:32 +08:00
|
|
|
gtk_label_set_text (GTK_LABEL (GTK_BIN (widget)->child),
|
|
|
|
entry_filename->str);
|
2001-07-10 01:58:56 +08:00
|
|
|
gimp_help_set_help_data (widget,
|
|
|
|
((GString *) filename_slist->data)->str,
|
|
|
|
NULL);
|
1999-12-02 21:00:18 +08:00
|
|
|
}
|
2001-07-10 01:58:56 +08:00
|
|
|
|
1998-07-12 13:18:17 +08:00
|
|
|
filename_slist = filename_slist->next;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_string_free (entry_filename, TRUE);
|
|
|
|
g_string_free (path, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-07-29 22:09:50 +08:00
|
|
|
menus_last_opened_add (const gchar *filename)
|
1998-07-12 13:18:17 +08:00
|
|
|
{
|
1999-06-22 06:12:07 +08:00
|
|
|
GString *raw_filename;
|
1999-11-25 19:35:48 +08:00
|
|
|
GSList *list;
|
1999-12-02 21:00:18 +08:00
|
|
|
GtkWidget *menu_item;
|
1999-06-22 06:12:07 +08:00
|
|
|
guint num_entries;
|
1998-07-14 06:31:45 +08:00
|
|
|
|
2001-01-14 23:18:37 +08:00
|
|
|
g_return_if_fail (filename != NULL);
|
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
/* see if we've already got the filename on the list */
|
1999-11-25 19:35:48 +08:00
|
|
|
for (list = last_opened_raw_filenames; list; list = g_slist_next (list))
|
1999-06-22 06:12:07 +08:00
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
raw_filename = (GString *) list->data;
|
1999-11-25 19:35:48 +08:00
|
|
|
|
2000-04-08 04:04:00 +08:00
|
|
|
if (strcmp (raw_filename->str, filename) == 0)
|
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
/* move the entry to the top */
|
|
|
|
|
|
|
|
last_opened_raw_filenames =
|
|
|
|
g_slist_remove_link (last_opened_raw_filenames, list);
|
|
|
|
|
|
|
|
last_opened_raw_filenames =
|
|
|
|
g_slist_concat (list, last_opened_raw_filenames);
|
|
|
|
|
|
|
|
menus_last_opened_update_labels ();
|
|
|
|
|
2000-04-08 04:04:00 +08:00
|
|
|
return;
|
|
|
|
}
|
1999-06-22 06:12:07 +08:00
|
|
|
}
|
1999-04-21 07:36:59 +08:00
|
|
|
|
1998-07-14 06:31:45 +08:00
|
|
|
num_entries = g_slist_length (last_opened_raw_filenames);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
2001-06-04 04:40:50 +08:00
|
|
|
if (num_entries == gimprc.last_opened_size)
|
1998-07-12 13:18:17 +08:00
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
GSList *oldest;
|
|
|
|
|
|
|
|
oldest = g_slist_last (last_opened_raw_filenames);
|
|
|
|
|
|
|
|
if (oldest)
|
2000-04-08 04:04:00 +08:00
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
g_string_free ((GString *) oldest->data, TRUE);
|
|
|
|
|
|
|
|
last_opened_raw_filenames = g_slist_remove (last_opened_raw_filenames,
|
|
|
|
oldest);
|
2000-04-08 04:04:00 +08:00
|
|
|
}
|
1998-07-12 13:18:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
raw_filename = g_string_new (filename);
|
1999-10-03 21:50:19 +08:00
|
|
|
last_opened_raw_filenames = g_slist_prepend (last_opened_raw_filenames,
|
|
|
|
raw_filename);
|
1998-07-12 13:18:17 +08:00
|
|
|
|
|
|
|
if (num_entries == 0)
|
|
|
|
{
|
2000-10-23 17:05:45 +08:00
|
|
|
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
|
|
"/File/---MRU");
|
1999-12-02 21:00:18 +08:00
|
|
|
gtk_widget_show (menu_item);
|
1998-07-12 13:18:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
menus_last_opened_update_labels ();
|
|
|
|
}
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
/* This function gets called while browsing a menu created
|
|
|
|
* by a GtkItemFactory
|
|
|
|
*/
|
|
|
|
static gint
|
|
|
|
menus_item_key_press (GtkWidget *widget,
|
|
|
|
GdkEventKey *kevent,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2000-12-14 22:55:00 +08:00
|
|
|
GtkItemFactory *item_factory = NULL;
|
1999-10-03 21:50:19 +08:00
|
|
|
GtkWidget *active_menu_item = NULL;
|
2001-02-24 10:42:09 +08:00
|
|
|
gchar *factory_path = NULL;
|
|
|
|
gchar *help_path = NULL;
|
|
|
|
gchar *help_page = NULL;
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-02-24 10:42:09 +08:00
|
|
|
item_factory = (GtkItemFactory *) data;
|
2000-02-12 23:01:33 +08:00
|
|
|
active_menu_item = GTK_MENU_SHELL (widget)->active_menu_item;
|
|
|
|
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
/* first, get the help page from the item
|
2000-02-12 23:01:33 +08:00
|
|
|
*/
|
|
|
|
if (active_menu_item)
|
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
help_page = (gchar *) g_object_get_data (G_OBJECT (active_menu_item),
|
|
|
|
"help_page");
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
}
|
2000-02-12 23:01:33 +08:00
|
|
|
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
/* For any key except F1, continue with the standard
|
|
|
|
* GtkItemFactory callback and assign a new shortcut, but don't
|
|
|
|
* assign a shortcut to the help menu entries...
|
|
|
|
*/
|
|
|
|
if (kevent->keyval != GDK_F1)
|
|
|
|
{
|
2000-02-12 23:01:33 +08:00
|
|
|
if (help_page &&
|
|
|
|
*help_page &&
|
|
|
|
item_factory == toolbox_factory &&
|
|
|
|
(strcmp (help_page, "help/dialogs/help.html") == 0 ||
|
|
|
|
strcmp (help_page, "help/context_help.html") == 0))
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
configure.in Updated Gimp-Help. See help/ChangeLog for details.
2000-12-15 Michael Natterer <mitch@gimp.org>
* configure.in
* help/*: Updated Gimp-Help. See help/ChangeLog for details.
* app/channels_dialog.c
* app/gdisplay.c
* app/gradient.c
* app/layers_dialog.c
* app/menus.c
* app/paths_dialog.c
* app/preferences_dialog.c
* app/resize.c: fixed menu paths.
* plug-ins/helpbrowser/helpbrowser.c: load a special
"undocumented_filter.html" page if a filter was not found.
Adapted to the new help structure.
2000-12-15 Michael Natterer <mitch@gimp.org>
* makedummyhelpfile.sh
* makeindex.sh: removed.
* images/*: added some images.
* help/*: Updated to the latest version of the gimp-help CVS module.
This Version instoduces a bunch of new toplevel HTML files for
general topics, an autogenerated index, TOC, glossary,
an "image" directory on the "C" level, peace, love, and stuff...
Thanks to all help writers: Prof, Bex, Piers, ...
2000-12-15 11:47:24 +08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-02-12 23:01:33 +08:00
|
|
|
}
|
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
/* ...finally, if F1 was pressed over any menu, show it's help page... */
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-07-28 03:41:54 +08:00
|
|
|
factory_path = (gchar *) g_object_get_data (G_OBJECT (item_factory),
|
|
|
|
"factory_path");
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2000-02-12 23:01:33 +08:00
|
|
|
if (! help_page ||
|
|
|
|
! *help_page)
|
1999-10-03 21:50:19 +08:00
|
|
|
help_page = "index.html";
|
|
|
|
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
if (factory_path && help_page)
|
1999-10-03 21:50:19 +08:00
|
|
|
{
|
|
|
|
gchar *help_string;
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
gchar *at;
|
|
|
|
|
|
|
|
help_page = g_strdup (help_page);
|
|
|
|
|
|
|
|
at = strchr (help_page, '@'); /* HACK: locale subdir */
|
|
|
|
|
|
|
|
if (at)
|
|
|
|
{
|
|
|
|
*at = '\0';
|
|
|
|
help_path = g_strdup (help_page);
|
|
|
|
help_string = g_strdup (at + 1);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
help_string = g_strdup_printf ("%s/%s", factory_path, help_page);
|
|
|
|
}
|
|
|
|
|
|
|
|
gimp_help (help_path, help_string);
|
1999-10-03 21:50:19 +08:00
|
|
|
|
|
|
|
g_free (help_string);
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
g_free (help_page);
|
1999-10-03 21:50:19 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
gimp_standard_help_func (NULL);
|
1999-10-03 21:50:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set up the callback to catch the "F1" key */
|
|
|
|
static void
|
|
|
|
menus_item_realize (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
if (GTK_IS_MENU_SHELL (widget->parent))
|
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
if (! g_object_get_data (G_OBJECT (widget->parent),
|
|
|
|
"menus_key_press_connected"))
|
1999-10-03 21:50:19 +08:00
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
g_signal_connect (G_OBJECT (widget->parent), "key_press_event",
|
2001-08-15 00:33:28 +08:00
|
|
|
G_CALLBACK (menus_item_key_press),
|
2001-07-28 03:41:54 +08:00
|
|
|
data);
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-07-28 03:41:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (widget->parent),
|
|
|
|
"menus_key_press_connected",
|
|
|
|
(gpointer) TRUE);
|
1999-10-03 21:50:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
menus_create_item (GtkItemFactory *item_factory,
|
|
|
|
GimpItemFactoryEntry *entry,
|
|
|
|
gpointer callback_data,
|
2001-04-16 02:01:57 +08:00
|
|
|
guint callback_type,
|
2001-06-30 03:25:03 +08:00
|
|
|
gboolean create_tearoff,
|
|
|
|
gboolean static_entry)
|
1999-10-03 21:50:19 +08:00
|
|
|
{
|
1999-12-02 21:00:18 +08:00
|
|
|
GtkWidget *menu_item;
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-01-02 10:33:43 +08:00
|
|
|
if (! (strstr (entry->entry.path, "tearoff1")))
|
|
|
|
{
|
2001-06-04 04:40:50 +08:00
|
|
|
if (! gimprc.disable_tearoff_menus && create_tearoff)
|
2001-01-02 10:33:43 +08:00
|
|
|
{
|
|
|
|
menus_create_branches (item_factory, entry);
|
|
|
|
}
|
|
|
|
}
|
2001-06-04 04:40:50 +08:00
|
|
|
else if (gimprc.disable_tearoff_menus || ! create_tearoff)
|
2001-01-02 10:33:43 +08:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2000-03-09 04:57:49 +08:00
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
if (entry->quark_string)
|
|
|
|
{
|
|
|
|
GQuark quark;
|
|
|
|
|
|
|
|
if (static_entry)
|
|
|
|
quark = g_quark_from_static_string (entry->quark_string);
|
|
|
|
else
|
|
|
|
quark = g_quark_from_string (entry->quark_string);
|
|
|
|
|
|
|
|
entry->entry.callback_action = (guint) quark;
|
|
|
|
}
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
gtk_item_factory_create_item (item_factory,
|
|
|
|
(GtkItemFactoryEntry *) entry,
|
|
|
|
callback_data,
|
|
|
|
callback_type);
|
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
menu_item = gtk_item_factory_get_item (item_factory,
|
|
|
|
((GtkItemFactoryEntry *) entry)->path);
|
1999-10-03 21:50:19 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
if (menu_item)
|
1999-10-03 21:50:19 +08:00
|
|
|
{
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect_after (G_OBJECT (menu_item), "realize",
|
|
|
|
G_CALLBACK (menus_item_realize),
|
|
|
|
item_factory);
|
1999-10-03 21:50:19 +08:00
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
g_object_set_data (G_OBJECT (menu_item), "help_page",
|
|
|
|
(gpointer) entry->help_page);
|
1999-10-03 21:50:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
menus_create_items (GtkItemFactory *item_factory,
|
|
|
|
guint n_entries,
|
|
|
|
GimpItemFactoryEntry *entries,
|
|
|
|
gpointer callback_data,
|
2001-04-16 02:01:57 +08:00
|
|
|
guint callback_type,
|
2001-06-30 03:25:03 +08:00
|
|
|
gboolean create_tearoff,
|
|
|
|
gboolean static_entries)
|
1999-10-03 21:50:19 +08:00
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0; i < n_entries; i++)
|
|
|
|
{
|
|
|
|
menus_create_item (item_factory,
|
|
|
|
entries + i,
|
|
|
|
callback_data,
|
2001-04-16 02:01:57 +08:00
|
|
|
callback_type,
|
2001-06-30 03:25:03 +08:00
|
|
|
create_tearoff,
|
|
|
|
static_entries);
|
1999-10-03 21:50:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
static GtkItemFactory *
|
|
|
|
menus_item_factory_new (GtkType container_type,
|
|
|
|
const gchar *path,
|
|
|
|
const gchar *factory_path,
|
|
|
|
guint n_entries,
|
|
|
|
GimpItemFactoryEntry *entries,
|
|
|
|
gpointer callback_data,
|
|
|
|
gboolean create_tearoff)
|
|
|
|
{
|
|
|
|
GtkItemFactory *item_factory;
|
|
|
|
|
|
|
|
item_factory = gtk_item_factory_new (container_type, path, NULL);
|
|
|
|
|
|
|
|
gtk_item_factory_set_translate_func (item_factory,
|
|
|
|
menus_menu_translate_func,
|
|
|
|
(gpointer) path,
|
|
|
|
NULL);
|
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
g_object_set_data (G_OBJECT (item_factory), "factory_path",
|
|
|
|
(gpointer) factory_path);
|
2001-07-10 01:58:56 +08:00
|
|
|
|
|
|
|
menus_create_items (item_factory,
|
|
|
|
n_entries,
|
|
|
|
entries,
|
|
|
|
callback_data,
|
|
|
|
2,
|
|
|
|
create_tearoff,
|
|
|
|
TRUE);
|
|
|
|
|
|
|
|
return item_factory;
|
|
|
|
}
|
|
|
|
|
1999-11-20 20:12:41 +08:00
|
|
|
static void
|
1999-12-02 21:00:18 +08:00
|
|
|
menus_init (void)
|
1998-07-12 13:18:17 +08:00
|
|
|
{
|
2001-05-25 07:57:08 +08:00
|
|
|
GtkWidget *menu_item;
|
2001-02-21 20:18:09 +08:00
|
|
|
gchar *filename;
|
|
|
|
GList *list;
|
2001-05-25 07:57:08 +08:00
|
|
|
GimpToolInfo *tool_info;
|
1999-12-02 21:00:18 +08:00
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
if (menus_initialized)
|
1999-12-02 21:00:18 +08:00
|
|
|
return;
|
|
|
|
|
2000-10-29 21:28:48 +08:00
|
|
|
menus_initialized = TRUE;
|
1999-12-02 21:00:18 +08:00
|
|
|
|
2001-08-07 20:42:23 +08:00
|
|
|
toolbox_factory = menus_get_toolbox_factory ();
|
|
|
|
image_factory = menus_get_image_factory ();
|
|
|
|
load_factory = menus_get_load_factory ();
|
|
|
|
save_factory = menus_get_save_factory ();
|
|
|
|
layers_factory = menus_get_layers_factory ();
|
|
|
|
channels_factory = menus_get_channels_factory ();
|
|
|
|
paths_factory = menus_get_paths_factory ();
|
|
|
|
dialogs_factory = menus_get_dialogs_factory ();
|
|
|
|
brushes_factory = menus_get_brushes_factory ();
|
|
|
|
patterns_factory = menus_get_patterns_factory ();
|
|
|
|
gradients_factory = menus_get_gradients_factory ();
|
|
|
|
palettes_factory = menus_get_palettes_factory ();
|
2001-02-14 12:55:21 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
for (list = GIMP_LIST (the_gimp->tool_info_list)->list;
|
2001-02-21 20:18:09 +08:00
|
|
|
list;
|
|
|
|
list = g_list_next (list))
|
1999-12-02 21:00:18 +08:00
|
|
|
{
|
2001-02-21 20:18:09 +08:00
|
|
|
menus_tools_create (GIMP_TOOL_INFO (list->data));
|
1999-12-02 21:00:18 +08:00
|
|
|
}
|
2001-05-25 07:57:08 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
/* reorder <Image>/Image/Colors */
|
2001-07-07 20:17:23 +08:00
|
|
|
tool_info = tool_manager_get_info_by_type (the_gimp, GIMP_TYPE_POSTERIZE_TOOL);
|
2001-05-25 07:57:08 +08:00
|
|
|
|
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory,
|
|
|
|
tool_info->menu_path);
|
1999-12-02 21:00:18 +08:00
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, 3);
|
1998-06-22 04:17:21 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
{
|
2001-05-25 07:57:08 +08:00
|
|
|
GtkType color_tools[] = { GIMP_TYPE_COLOR_BALANCE_TOOL,
|
|
|
|
GIMP_TYPE_HUE_SATURATION_TOOL,
|
|
|
|
GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL,
|
|
|
|
GIMP_TYPE_THRESHOLD_TOOL,
|
|
|
|
GIMP_TYPE_LEVELS_TOOL,
|
|
|
|
GIMP_TYPE_CURVES_TOOL };
|
1999-12-02 21:00:18 +08:00
|
|
|
static gint n_color_tools = (sizeof (color_tools) /
|
|
|
|
sizeof (color_tools[0]));
|
2000-03-11 21:49:16 +08:00
|
|
|
GtkWidget *separator;
|
2001-05-25 07:57:08 +08:00
|
|
|
gint i, pos;
|
1999-06-07 01:26:51 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
pos = 1;
|
1999-11-20 20:12:41 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
for (i = 0; i < n_color_tools; i++)
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
2001-07-07 20:17:23 +08:00
|
|
|
tool_info = tool_manager_get_info_by_type (the_gimp, color_tools[i]);
|
2001-05-25 07:57:08 +08:00
|
|
|
|
|
|
|
menu_item = gtk_item_factory_get_widget (image_factory,
|
|
|
|
tool_info->menu_path);
|
1999-12-02 21:00:18 +08:00
|
|
|
if (menu_item && menu_item->parent)
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
1999-12-02 21:00:18 +08:00
|
|
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent),
|
|
|
|
menu_item, pos);
|
|
|
|
pos++;
|
1999-11-20 20:12:41 +08:00
|
|
|
}
|
|
|
|
}
|
2001-07-10 01:58:56 +08:00
|
|
|
|
2000-03-11 21:49:16 +08:00
|
|
|
if (menu_item && menu_item->parent)
|
|
|
|
{
|
|
|
|
separator = gtk_menu_item_new ();
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
gtk_menu_shell_insert (GTK_MENU_SHELL (menu_item->parent), separator, pos);
|
2000-03-11 21:49:16 +08:00
|
|
|
gtk_widget_show (separator);
|
|
|
|
}
|
1999-12-02 21:00:18 +08:00
|
|
|
}
|
1999-11-20 20:12:41 +08:00
|
|
|
|
1999-12-02 21:00:18 +08:00
|
|
|
filename = gimp_personal_rc_file ("menurc");
|
|
|
|
gtk_item_factory_parse_rc (filename);
|
|
|
|
g_free (filename);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
1999-06-22 04:04:04 +08:00
|
|
|
|
2001-08-07 20:42:23 +08:00
|
|
|
void
|
|
|
|
menus_quit (void)
|
|
|
|
{
|
|
|
|
gchar *filename;
|
|
|
|
|
|
|
|
filename = gimp_personal_rc_file ("menurc");
|
|
|
|
gtk_item_factory_dump_rc (filename, NULL, TRUE);
|
|
|
|
g_free (filename);
|
|
|
|
|
|
|
|
if (toolbox_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (toolbox_factory));
|
|
|
|
toolbox_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (image_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (image_factory));
|
|
|
|
image_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (load_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (load_factory));
|
|
|
|
load_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (save_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (save_factory));
|
|
|
|
save_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (layers_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (layers_factory));
|
|
|
|
layers_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (channels_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (channels_factory));
|
|
|
|
channels_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (paths_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (paths_factory));
|
|
|
|
paths_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dialogs_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (dialogs_factory));
|
|
|
|
dialogs_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (brushes_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (brushes_factory));
|
|
|
|
brushes_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (patterns_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (patterns_factory));
|
|
|
|
patterns_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gradients_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (gradients_factory));
|
|
|
|
gradients_factory = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (palettes_factory)
|
|
|
|
{
|
|
|
|
g_object_unref (G_OBJECT (palettes_factory));
|
|
|
|
palettes_factory = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-12-08 02:56:12 +08:00
|
|
|
#ifdef ENABLE_NLS
|
|
|
|
|
1999-06-22 04:04:04 +08:00
|
|
|
static gchar *
|
2001-07-10 01:58:56 +08:00
|
|
|
menus_menu_translate_func (const gchar *path,
|
|
|
|
gpointer data)
|
1999-06-22 04:04:04 +08:00
|
|
|
{
|
2001-02-21 20:18:09 +08:00
|
|
|
static gchar *menupath = NULL;
|
1999-11-26 18:17:19 +08:00
|
|
|
|
2000-02-24 04:25:24 +08:00
|
|
|
GtkItemFactory *item_factory = NULL;
|
2001-02-21 20:18:09 +08:00
|
|
|
gchar *retval;
|
|
|
|
gchar *factory;
|
|
|
|
gchar *translation;
|
|
|
|
gchar *domain = NULL;
|
|
|
|
gchar *complete = NULL;
|
|
|
|
gchar *p, *t;
|
1999-11-25 19:35:48 +08:00
|
|
|
|
|
|
|
factory = (gchar *) data;
|
1999-08-28 05:06:00 +08:00
|
|
|
|
1999-11-26 18:17:19 +08:00
|
|
|
if (menupath)
|
|
|
|
g_free (menupath);
|
|
|
|
|
2000-03-09 06:39:14 +08:00
|
|
|
retval = menupath = g_strdup (path);
|
1999-11-25 19:35:48 +08:00
|
|
|
|
|
|
|
if ((strstr (path, "/tearoff1") != NULL) ||
|
|
|
|
(strstr (path, "/---") != NULL) ||
|
|
|
|
(strstr (path, "/MRU") != NULL))
|
2000-03-09 06:39:14 +08:00
|
|
|
return retval;
|
1999-11-23 09:06:16 +08:00
|
|
|
|
2000-02-24 04:25:24 +08:00
|
|
|
if (factory)
|
|
|
|
item_factory = gtk_item_factory_from_path (factory);
|
|
|
|
if (item_factory)
|
2000-03-11 21:49:16 +08:00
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
domain = g_object_get_data (G_OBJECT (item_factory), "textdomain");
|
|
|
|
complete = g_object_get_data (G_OBJECT (item_factory), "complete");
|
2000-03-11 21:49:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (domain) /* use the plugin textdomain */
|
1999-11-24 03:11:29 +08:00
|
|
|
{
|
2000-03-09 06:53:20 +08:00
|
|
|
g_free (menupath);
|
|
|
|
menupath = g_strconcat (factory, path, NULL);
|
2000-03-09 04:57:49 +08:00
|
|
|
|
2000-02-27 03:09:28 +08:00
|
|
|
if (complete)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* This is a branch, use the complete path for translation,
|
|
|
|
* then strip off entries from the end until it matches.
|
|
|
|
*/
|
2000-03-09 04:57:49 +08:00
|
|
|
complete = g_strconcat (factory, complete, NULL);
|
2000-02-27 03:09:28 +08:00
|
|
|
translation = g_strdup (dgettext (domain, complete));
|
|
|
|
|
2001-01-14 23:18:37 +08:00
|
|
|
while (complete && *complete &&
|
|
|
|
translation && *translation &&
|
|
|
|
strcmp (complete, menupath))
|
2000-02-27 03:09:28 +08:00
|
|
|
{
|
|
|
|
p = strrchr (complete, '/');
|
|
|
|
t = strrchr (translation, '/');
|
|
|
|
if (p && t)
|
|
|
|
{
|
|
|
|
*p = '\0';
|
|
|
|
*t = '\0';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
}
|
2000-03-09 06:53:20 +08:00
|
|
|
|
|
|
|
g_free (complete);
|
2000-02-27 03:09:28 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2000-03-09 06:53:20 +08:00
|
|
|
translation = dgettext (domain, menupath);
|
2000-02-27 03:09:28 +08:00
|
|
|
}
|
2000-03-09 04:57:49 +08:00
|
|
|
|
2000-02-10 01:39:40 +08:00
|
|
|
/*
|
2000-02-24 04:25:24 +08:00
|
|
|
* Work around a bug in GTK+ prior to 1.2.7 (similar workaround below)
|
2000-02-10 01:39:40 +08:00
|
|
|
*/
|
2000-02-27 03:09:28 +08:00
|
|
|
if (strncmp (factory, translation, strlen (factory)) == 0)
|
|
|
|
{
|
2000-03-09 06:39:14 +08:00
|
|
|
retval = translation + strlen (factory);
|
2000-03-09 06:53:20 +08:00
|
|
|
if (complete)
|
|
|
|
{
|
|
|
|
g_free (menupath);
|
|
|
|
menupath = translation;
|
|
|
|
}
|
2000-02-27 03:09:28 +08:00
|
|
|
}
|
2000-02-12 01:02:13 +08:00
|
|
|
else
|
2000-02-27 03:09:28 +08:00
|
|
|
{
|
2000-03-09 06:53:20 +08:00
|
|
|
g_warning ("bad translation for menupath: %s", menupath);
|
|
|
|
retval = menupath + strlen (factory);
|
2000-02-27 03:09:28 +08:00
|
|
|
if (complete)
|
|
|
|
g_free (translation);
|
|
|
|
}
|
1999-08-28 05:06:00 +08:00
|
|
|
}
|
2000-03-11 21:49:16 +08:00
|
|
|
else /* use the gimp textdomain */
|
2000-02-24 04:25:24 +08:00
|
|
|
{
|
2000-03-11 21:49:16 +08:00
|
|
|
if (complete)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* This is a branch, use the complete path for translation,
|
|
|
|
* then strip off entries from the end until it matches.
|
|
|
|
*/
|
|
|
|
complete = g_strdup (complete);
|
|
|
|
translation = g_strdup (gettext (complete));
|
|
|
|
|
|
|
|
while (*complete && *translation && strcmp (complete, menupath))
|
|
|
|
{
|
|
|
|
p = strrchr (complete, '/');
|
|
|
|
t = strrchr (translation, '/');
|
|
|
|
if (p && t)
|
|
|
|
{
|
|
|
|
*p = '\0';
|
|
|
|
*t = '\0';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
g_free (complete);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
translation = gettext (menupath);
|
2000-03-09 06:39:14 +08:00
|
|
|
|
2000-02-24 04:25:24 +08:00
|
|
|
if (*translation == '/')
|
2000-03-11 21:49:16 +08:00
|
|
|
{
|
|
|
|
retval = translation;
|
|
|
|
if (complete)
|
|
|
|
{
|
|
|
|
g_free (menupath);
|
|
|
|
menupath = translation;
|
|
|
|
}
|
|
|
|
}
|
2000-02-24 04:25:24 +08:00
|
|
|
else
|
2000-03-11 21:49:16 +08:00
|
|
|
{
|
|
|
|
g_warning ("bad translation for menupath: %s", menupath);
|
|
|
|
if (complete)
|
|
|
|
g_free (translation);
|
|
|
|
}
|
2000-02-24 04:25:24 +08:00
|
|
|
}
|
2000-03-11 21:49:16 +08:00
|
|
|
|
2000-03-09 06:39:14 +08:00
|
|
|
return retval;
|
1999-06-22 04:04:04 +08:00
|
|
|
}
|
1999-08-24 06:47:36 +08:00
|
|
|
|
1999-12-08 02:56:12 +08:00
|
|
|
#endif /* ENABLE_NLS */
|
|
|
|
|
1999-08-24 06:47:36 +08:00
|
|
|
static void
|
2001-07-10 01:58:56 +08:00
|
|
|
menus_tearoff_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer data,
|
|
|
|
guint action)
|
1999-08-24 06:47:36 +08:00
|
|
|
{
|
1999-10-03 21:50:19 +08:00
|
|
|
if (GTK_IS_TEAROFF_MENU_ITEM (widget))
|
1999-08-24 06:47:36 +08:00
|
|
|
{
|
1999-11-25 19:35:48 +08:00
|
|
|
GtkTearoffMenuItem *tomi = (GtkTearoffMenuItem *) widget;
|
|
|
|
|
1999-10-03 21:50:19 +08:00
|
|
|
if (tomi->torn_off)
|
1999-08-24 06:47:36 +08:00
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
GtkWidget *toplevel;
|
1999-08-24 06:47:36 +08:00
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
toplevel = gtk_widget_get_toplevel (widget);
|
|
|
|
|
|
|
|
if (! GTK_IS_WINDOW (toplevel))
|
1999-08-24 06:47:36 +08:00
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
g_warning ("menus_tearoff_cmd_callback(): tearoff menu not "
|
|
|
|
"in top level window");
|
1999-08-24 06:47:36 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-20 18:07:51 +08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#warning FIXME: register tearoffs
|
|
|
|
#endif
|
2001-07-28 03:41:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (widget), "tearoff-menu-toplevel",
|
|
|
|
toplevel);
|
2000-02-10 08:00:54 +08:00
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
gimp_dialog_set_icon (GTK_WINDOW (toplevel));
|
1999-08-24 06:47:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
GtkWidget *toplevel;
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2001-07-28 03:41:54 +08:00
|
|
|
toplevel = (GtkWidget *) g_object_get_data (G_OBJECT (widget),
|
|
|
|
"tearoff-menu-toplevel");
|
1999-10-04 00:54:17 +08:00
|
|
|
|
2001-07-10 01:58:56 +08:00
|
|
|
if (! toplevel)
|
|
|
|
{
|
|
|
|
g_warning ("menus_tearoff_cmd_callback(): can't unregister "
|
|
|
|
"tearoff menu top level window");
|
|
|
|
}
|
1999-08-24 06:47:36 +08:00
|
|
|
else
|
2001-07-10 01:58:56 +08:00
|
|
|
{
|
2001-07-20 18:07:51 +08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#warning FIXME: unregister tearoffs
|
|
|
|
#endif
|
2001-07-10 01:58:56 +08:00
|
|
|
}
|
1999-08-24 06:47:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2000-10-23 17:05:45 +08:00
|
|
|
#ifdef ENABLE_DEBUG_ENTRY
|
2000-12-14 22:55:00 +08:00
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2000-05-17 22:43:18 +08:00
|
|
|
static void
|
|
|
|
menus_debug_recurse_menu (GtkWidget *menu,
|
|
|
|
gint depth,
|
|
|
|
gchar *path)
|
|
|
|
{
|
2000-12-14 22:55:00 +08:00
|
|
|
GtkItemFactory *item_factory;
|
2000-05-17 22:43:18 +08:00
|
|
|
GtkItemFactoryItem *item;
|
|
|
|
GtkItemFactoryClass *class;
|
|
|
|
GtkWidget *menu_item;
|
|
|
|
GList *list;
|
|
|
|
gchar *label;
|
|
|
|
gchar *help_page;
|
2000-12-14 22:55:00 +08:00
|
|
|
gchar *help_path;
|
|
|
|
gchar *factory_path;
|
|
|
|
gchar *hash;
|
2000-05-17 22:43:18 +08:00
|
|
|
gchar *full_path;
|
|
|
|
gchar *accel;
|
|
|
|
gchar *format_str;
|
|
|
|
|
|
|
|
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
|
|
{
|
|
|
|
menu_item = GTK_WIDGET (list->data);
|
|
|
|
|
|
|
|
if (GTK_IS_LABEL (GTK_BIN (menu_item)->child))
|
|
|
|
{
|
|
|
|
gtk_label_get (GTK_LABEL (GTK_BIN (menu_item)->child), &label);
|
|
|
|
full_path = g_strconcat (path, "/", label, NULL);
|
|
|
|
class = gtk_type_class (GTK_TYPE_ITEM_FACTORY);
|
|
|
|
item = g_hash_table_lookup (class->item_ht, full_path);
|
|
|
|
if (item)
|
2000-12-14 22:55:00 +08:00
|
|
|
{
|
|
|
|
accel = gtk_accelerator_name (item->accelerator_key,
|
|
|
|
item->accelerator_mods);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
accel = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
item_factory = gtk_item_factory_from_path (path);
|
|
|
|
if (item_factory)
|
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
factory_path =
|
|
|
|
(gchar *) g_object_get_data (G_OBJECT (item_factory),
|
|
|
|
"factory_path");
|
|
|
|
help_page =
|
|
|
|
g_strconcat (factory_path ? factory_path : "",
|
|
|
|
factory_path ? G_DIR_SEPARATOR_S : "",
|
|
|
|
(gchar*) g_object_get_data (G_OBJECT (menu_item),
|
|
|
|
"help_page"),
|
|
|
|
NULL);
|
2000-12-14 22:55:00 +08:00
|
|
|
}
|
2000-05-17 22:43:18 +08:00
|
|
|
else
|
2000-12-14 22:55:00 +08:00
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
help_page =
|
|
|
|
g_strdup ((gchar *) g_object_get_data (G_OBJECT (menu_item),
|
|
|
|
"help_page"));
|
2000-12-14 22:55:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (help_page)
|
|
|
|
{
|
2001-07-28 03:41:54 +08:00
|
|
|
help_path =
|
|
|
|
g_strconcat (gimp_data_directory (), G_DIR_SEPARATOR_S,
|
|
|
|
"help", G_DIR_SEPARATOR_S,
|
|
|
|
"C", G_DIR_SEPARATOR_S,
|
|
|
|
help_page, NULL);
|
2000-12-14 22:55:00 +08:00
|
|
|
|
|
|
|
if ((hash = strchr (help_path, '#')) != NULL)
|
|
|
|
*hash = '\0';
|
|
|
|
|
|
|
|
if (access (help_path, R_OK))
|
|
|
|
{
|
|
|
|
g_free (help_path);
|
|
|
|
help_path = g_strconcat ("! ", help_page, NULL);
|
|
|
|
g_free (help_page);
|
|
|
|
help_page = help_path;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
g_free (help_path);
|
|
|
|
}
|
|
|
|
}
|
2000-05-17 22:43:18 +08:00
|
|
|
|
2000-10-23 17:05:45 +08:00
|
|
|
format_str = g_strdup_printf ("%%%ds%%%ds %%-20s %%s\n",
|
|
|
|
depth * 2, depth * 2 - 40);
|
|
|
|
g_print (format_str,
|
|
|
|
"", label, accel ? accel : "", help_page ? help_page : "");
|
2000-05-17 22:43:18 +08:00
|
|
|
g_free (format_str);
|
2000-12-14 22:55:00 +08:00
|
|
|
g_free (help_page);
|
2000-05-17 22:43:18 +08:00
|
|
|
|
|
|
|
if (GTK_MENU_ITEM (menu_item)->submenu)
|
2000-10-23 17:05:45 +08:00
|
|
|
menus_debug_recurse_menu (GTK_MENU_ITEM (menu_item)->submenu,
|
|
|
|
depth + 1, full_path);
|
2000-05-17 22:43:18 +08:00
|
|
|
|
|
|
|
g_free (full_path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
menus_debug_cmd_callback (GtkWidget *widget,
|
2001-06-30 03:25:03 +08:00
|
|
|
gpointer data,
|
|
|
|
guint action)
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
2001-01-02 10:33:43 +08:00
|
|
|
gint n_factories = 7;
|
2000-12-14 22:55:00 +08:00
|
|
|
GtkItemFactory *factories[7];
|
1999-11-30 08:58:38 +08:00
|
|
|
GimpItemFactoryEntry *entries[7];
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2000-05-17 22:43:18 +08:00
|
|
|
GtkWidget *menu_item;
|
2000-12-14 22:55:00 +08:00
|
|
|
gint i;
|
1999-11-30 08:58:38 +08:00
|
|
|
|
|
|
|
factories[0] = toolbox_factory;
|
|
|
|
factories[1] = image_factory;
|
|
|
|
factories[2] = layers_factory;
|
|
|
|
factories[3] = channels_factory;
|
|
|
|
factories[4] = paths_factory;
|
|
|
|
factories[5] = load_factory;
|
|
|
|
factories[6] = save_factory;
|
|
|
|
|
|
|
|
entries[0] = toolbox_entries;
|
|
|
|
entries[1] = image_entries;
|
|
|
|
entries[2] = layers_entries;
|
|
|
|
entries[3] = channels_entries;
|
|
|
|
entries[4] = paths_entries;
|
|
|
|
entries[5] = load_entries;
|
|
|
|
entries[6] = save_entries;
|
2000-05-17 22:43:18 +08:00
|
|
|
|
|
|
|
/* toolbox needs special treatment */
|
|
|
|
g_print ("%s\n", factories[0]->path);
|
|
|
|
|
|
|
|
menu_item = gtk_item_factory_get_item (factories[0], "/File");
|
|
|
|
if (menu_item && menu_item->parent && GTK_IS_MENU_BAR (menu_item->parent))
|
|
|
|
menus_debug_recurse_menu (menu_item->parent, 1, factories[0]->path);
|
1999-11-30 08:58:38 +08:00
|
|
|
|
2000-05-17 22:43:18 +08:00
|
|
|
g_print ("\n");
|
1999-11-30 08:58:38 +08:00
|
|
|
|
2000-05-17 22:43:18 +08:00
|
|
|
for (i = 1; i < n_factories; i++)
|
1999-11-20 20:12:41 +08:00
|
|
|
{
|
2000-05-17 22:43:18 +08:00
|
|
|
g_print ("%s\n", factories[i]->path);
|
1999-11-20 20:12:41 +08:00
|
|
|
|
2000-05-17 22:43:18 +08:00
|
|
|
menu_item = gtk_item_factory_get_item (factories[i], entries[i][0].entry.path);
|
|
|
|
if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent))
|
|
|
|
menus_debug_recurse_menu (menu_item->parent, 1, factories[i]->path);
|
1999-11-20 20:12:41 +08:00
|
|
|
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
}
|
2001-06-30 03:25:03 +08:00
|
|
|
|
2000-10-23 17:05:45 +08:00
|
|
|
#endif /* ENABLE_DEBUG_ENTRY */
|