gimpitemfactory.c 74.9 KB
Newer Older
Elliot Lee's avatar
Elliot Lee committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* 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
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Elliot Lee's avatar
Elliot Lee committed
17
 */
Sven Neumann's avatar
Sven Neumann committed
18

19 20
#include "config.h"

Michael Natterer's avatar
Michael Natterer committed
21
#include <stdio.h>
Elliot Lee's avatar
Elliot Lee committed
22 23
#include <stdlib.h>
#include <string.h>
24

Sven Neumann's avatar
Sven Neumann committed
25
#include <gtk/gtk.h>
26

27
#include "libgimpbase/gimpbase.h"
28 29
#include "libgimpwidgets/gimpwidgets.h"

30
#include "gui-types.h"
Sven Neumann's avatar
Sven Neumann committed
31

32
#include "core/gimp.h"
33
#include "core/gimplist.h"
Michael Natterer's avatar
Michael Natterer committed
34
#include "core/gimptoolinfo.h"
35

36 37
#include "widgets/gimpitemfactory.h"

38 39
#include "display/gimpdisplay.h"

Michael Natterer's avatar
Michael Natterer committed
40 41 42 43 44 45 46
#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"
47 48
#include "tools/tool_manager.h"

49
#include "buffers-commands.h"
50
#include "channels-commands.h"
Elliot Lee's avatar
Elliot Lee committed
51
#include "commands.h"
52
#include "data-commands.h"
53
#include "dialogs-commands.h"
54
#include "documents-commands.h"
Michael Natterer's avatar
Michael Natterer committed
55 56
#include "edit-commands.h"
#include "file-commands.h"
57
#include "gradient-editor-commands.h"
58
#include "gradients-commands.h"
Michael Natterer's avatar
Michael Natterer committed
59
#include "image-commands.h"
Michael Natterer's avatar
Michael Natterer committed
60
#include "layers-commands.h"
61
#include "menus.h"
62
#include "palettes-commands.h"
63
#include "paths-dialog.h"
Michael Natterer's avatar
Michael Natterer committed
64
#include "select-commands.h"
65
#include "test-commands.h"
Michael Natterer's avatar
Michael Natterer committed
66
#include "tools-commands.h"
Michael Natterer's avatar
Michael Natterer committed
67
#include "view-commands.h"
68

69
#include "gimphelp.h"
Elliot Lee's avatar
Elliot Lee committed
70
#include "gimprc.h"
71

72 73 74
#include "libgimp/gimpintl.h"


75 76
/*  local function prototypes  */

77 78 79 80 81
static void    menus_filters_subdirs_to_top    (GtkMenu              *menu);
static void    menus_tools_create              (GimpToolInfo         *tool_info);
static void    menus_last_opened_update_labels (GimpContainer        *container,
                                                GimpImagefile        *unused,
                                                Gimp                 *gimp);
82
#ifdef ENABLE_DEBUG_ENTRY
83 84 85 86 87 88
static void    menus_debug_recurse_menu   (GtkWidget            *menu,
					   gint                  depth,
					   gchar                *path);
static void    menus_debug_cmd_callback   (GtkWidget            *widget,
					   gpointer              data,
					   guint                 action);
89
#endif  /*  ENABLE_DEBUG_ENTRY  */
90

91

Michael Natterer's avatar
Michael Natterer committed
92 93 94 95 96
#define SEPARATOR(path) \
        { { (path), NULL, NULL, 0, "<Separator>" }, NULL, NULL, NULL }

#define BRANCH(path) \
        { { (path), NULL, NULL, 0, "<Branch>" }, NULL, NULL, NULL }
97

98

99 100
/*****  <Toolbox>  *****/

101 102
static GimpItemFactoryEntry toolbox_entries[] =
{
103 104
  /*  <Toolbox>/File  */

Michael Natterer's avatar
Michael Natterer committed
105 106
  BRANCH (N_("/_File")),

107
  { { N_("/File/New..."), "<control>N",
108 109
      file_new_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_NEW },
Michael Natterer's avatar
Michael Natterer committed
110
    NULL,
111
    "file/dialogs/file_new.html", NULL },
112
  { { N_("/File/Open..."), "<control>O",
113 114
      file_open_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_OPEN },
Michael Natterer's avatar
Michael Natterer committed
115
    NULL,
Daniel Egger's avatar
Daniel Egger committed
116
    "file/dialogs/file_open.html", NULL },
117 118 119

  /*  <Toolbox>/File/Acquire  */

Michael Natterer's avatar
Michael Natterer committed
120
  SEPARATOR ("/File/---"),
121

Michael Natterer's avatar
Michael Natterer committed
122 123 124 125 126
  BRANCH (N_("/File/Acquire")),

  SEPARATOR ("/File/---"),

  { { N_("/File/Preferences..."), NULL,
127 128
      dialogs_create_toplevel_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_PREFERENCES },
Michael Natterer's avatar
Michael Natterer committed
129
    "gimp:preferences-dialog",
Michael Natterer's avatar
Michael Natterer committed
130
    "file/dialogs/preferences/preferences.html", NULL },
131 132

  /*  <Toolbox>/File/Dialogs  */
133

Michael Natterer's avatar
Michael Natterer committed
134 135 136 137 138
  SEPARATOR ("/File/---"),

  { { N_("/File/Dialogs/Layers, Channels & Paths..."), "<control>L",
      dialogs_create_lc_cmd_callback, 0 },
    NULL,
139
    "file/dialogs/layers_and_channels.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
140 141 142
  { { N_("/File/Dialogs/Tool Options..."), "<control><shift>T",
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:tool-options-dialog",
143 144
    "file/dialogs/tool_options.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
145 146
  SEPARATOR ("/File/Dialogs/---"),

147
  { { "/File/Dialogs/Old + Testing/Brushes...", NULL,
Michael Natterer's avatar
Michael Natterer committed
148 149
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:brush-select-dialog",
150
    "file/dialogs/brush_selection.html", NULL },
151
  { { "/File/Dialogs/Old + Testing/Patterns...", NULL,
Michael Natterer's avatar
Michael Natterer committed
152 153
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:pattern-select-dialog",
154
    "file/dialogs/pattern_selection.html", NULL },
155
  { { "/File/Dialogs/Old + Testing/Gradients...", NULL,
Michael Natterer's avatar
Michael Natterer committed
156 157
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:gradient-select-dialog",
158
    "file/dialogs/gradient_selection.html", NULL },
159
  { { "/File/Dialogs/Old + Testing/Palette...", NULL,
Michael Natterer's avatar
Michael Natterer committed
160
      dialogs_create_toplevel_cmd_callback, 0 },
161
    "gimp:palette-select-dialog",
162
    "file/dialogs/palette_selection.html", NULL },
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187

  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",
Michael Natterer's avatar
Michael Natterer committed
188 189
      dialogs_create_dockable_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_SELECT_COLOR },
190 191
    "gimp:palette-list",
    "file/dialogs/palette_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
192
  { { N_("/File/Dialogs/Indexed Palette..."), NULL,
Michael Natterer's avatar
Michael Natterer committed
193 194
      dialogs_create_dockable_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_SELECT_COLOR },
195
    "gimp:indexed-palette",
196
    "file/dialogs/indexed_palette.html", NULL },
197 198 199 200
  { { N_("/File/Dialogs/Buffers..."), NULL,
      dialogs_create_dockable_cmd_callback, 0 },
    "gimp:buffer-list",
    NULL, NULL },
201 202 203 204
  { { N_("/File/Dialogs/Images..."), NULL,
      dialogs_create_dockable_cmd_callback, 0 },
    "gimp:image-list",
    NULL, NULL },
205

Michael Natterer's avatar
Michael Natterer committed
206 207 208 209 210
  SEPARATOR ("/File/Dialogs/---"),

  { { N_("/File/Dialogs/Input Devices..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:input-devices-dialog",
211
    "file/dialogs/input_devices.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
212 213 214
  { { N_("/File/Dialogs/Device Status..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:device-status-dialog",
215
    "file/dialogs/device_status.html", NULL },
216

Michael Natterer's avatar
Michael Natterer committed
217 218
  SEPARATOR ("/File/Dialogs/---"),

Michael Natterer's avatar
Michael Natterer committed
219 220 221
  { { N_("/File/Dialogs/Document History..."), NULL,
      dialogs_create_dockable_cmd_callback, 0 },
    "gimp:document-history",
222
    "file/dialogs/document_index.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
223
  { { N_("/File/Dialogs/Error Console..."), NULL,
Michael Natterer's avatar
Michael Natterer committed
224 225
      dialogs_create_dockable_cmd_callback, 0 },
    "gimp:error-console",
226
    "file/dialogs/error_console.html", NULL },
227
#ifdef DISPLAY_FILTERS
Michael Natterer's avatar
Michael Natterer committed
228 229 230
  { { N_("/File/Dialogs/Display Filters..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:display-filters-dialog",
Michael Natterer's avatar
Michael Natterer committed
231
    "file/dialogs/display_filters/display_filters.html", NULL },
232
#endif /* DISPLAY_FILTERS */
233

Michael Natterer's avatar
Michael Natterer committed
234
  SEPARATOR ("/File/---"),
235 236 237

  /*  MRU entries are inserted here  */

Michael Natterer's avatar
Michael Natterer committed
238 239 240
  SEPARATOR ("/File/---MRU"),

  { { N_("/File/Quit"), "<control>Q",
241 242
      file_quit_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_QUIT },
Michael Natterer's avatar
Michael Natterer committed
243
    NULL,
244
    "file/quit.html", NULL },
245 246 247

  /*  <Toolbox>/Xtns  */

Michael Natterer's avatar
Michael Natterer committed
248 249 250 251 252
  BRANCH (N_("/_Xtns")),

  { { N_("/Xtns/Module Browser..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:module-browser-dialog",
Michael Natterer's avatar
Michael Natterer committed
253
    "dialogs/module_browser.html", NULL },
254

Michael Natterer's avatar
Michael Natterer committed
255
  SEPARATOR ("/Xtns/---"),
256 257 258

  /*  <Toolbox>/Help  */

Michael Natterer's avatar
Michael Natterer committed
259 260 261
  BRANCH (N_("/_Help")),

  { { N_("/Help/Help..."), "F1",
262 263
      help_help_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_HELP },
Michael Natterer's avatar
Michael Natterer committed
264
    NULL,
265
    "help/dialogs/help.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
266 267 268
  { { N_("/Help/Context Help..."), "<shift>F1",
      help_context_help_cmd_callback, 0 },
    NULL,
269
    "help/context_help.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
270 271 272
  { { N_("/Help/Tip of the Day..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:tips-dialog",
273
    "help/dialogs/tip_of_the_day.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
274 275 276
  { { N_("/Help/About..."), NULL,
      dialogs_create_toplevel_cmd_callback, 0 },
    "gimp:about-dialog",
277
    "help/dialogs/about.html", NULL },
278 279 280 281 282 283 284 285

  SEPARATOR ("/Help/---"),

  { { N_("/Help/Mem Profile"), NULL,
      mem_profile_cmd_callback, 0 },
    NULL,
    NULL, NULL },

286
#ifdef ENABLE_DEBUG_ENTRY
Michael Natterer's avatar
Michael Natterer committed
287
  { { "/Help/Dump Items (Debug)", NULL,
Michael Natterer's avatar
Michael Natterer committed
288 289
      menus_debug_cmd_callback, 0 },
    NULL,
290
    NULL, NULL }
291
#endif
292 293
};

294

295 296
/*****  <Image>  *****/

297 298
static GimpItemFactoryEntry image_entries[] =
{
299
  { { "/tearoff1", NULL, gimp_item_factory_tearoff_callback, 0, "<Tearoff>" },
Michael Natterer's avatar
Michael Natterer committed
300
    NULL,
301
    NULL, NULL },
302 303 304

  /*  <Image>/File  */

Michael Natterer's avatar
Michael Natterer committed
305
  { { N_("/File/New..."), "<control>N",
306 307
      file_new_cmd_callback, 1,
      "<StockItem>", GTK_STOCK_NEW },
Michael Natterer's avatar
Michael Natterer committed
308
    NULL,
309
    "file/dialogs/file_new.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
310
  { { N_("/File/Open..."), "<control>O",
311 312
      file_open_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_OPEN },
Michael Natterer's avatar
Michael Natterer committed
313
    NULL,
Daniel Egger's avatar
Daniel Egger committed
314
    "file/dialogs/file_open.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
315
  { { N_("/File/Save"), "<control>S",
316 317
      file_save_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_SAVE },
Michael Natterer's avatar
Michael Natterer committed
318
    NULL,
Daniel Egger's avatar
Daniel Egger committed
319
    "file/dialogs/file_save.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
320
  { { N_("/File/Save as..."), NULL,
321 322
      file_save_as_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_SAVE_AS },
Michael Natterer's avatar
Michael Natterer committed
323
    NULL,
324
    "file/dialogs/file_save.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
325
  { { N_("/File/Save a Copy as..."), NULL,
326 327
      file_save_a_copy_as_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_SAVE_AS },
Michael Natterer's avatar
Michael Natterer committed
328
    NULL,
Daniel Egger's avatar
Daniel Egger committed
329
    "file/dialogs/file_save.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
330
  { { N_("/File/Revert..."), NULL,
331 332
      file_revert_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_REVERT_TO_SAVED },
Michael Natterer's avatar
Michael Natterer committed
333
    NULL,
334
    "file/revert.html", NULL },
335

Michael Natterer's avatar
Michael Natterer committed
336 337 338
  SEPARATOR ("/File/---"),

  { { N_( "/File/Close"), "<control>W",
339 340
      file_close_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CLOSE },
Michael Natterer's avatar
Michael Natterer committed
341
    NULL,
342
    "file/close.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
343
  { { N_("/File/Quit"), "<control>Q",
344 345
      file_quit_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_QUIT },
Michael Natterer's avatar
Michael Natterer committed
346
    NULL,
Michael Natterer's avatar
Michael Natterer committed
347
    "file/quit.html", NULL },
348

Michael Natterer's avatar
Michael Natterer committed
349
  SEPARATOR ("/File/---moved"),
350

351 352
  /*  <Image>/Edit  */

Michael Natterer's avatar
Michael Natterer committed
353
  { { N_("/Edit/Undo"), "<control>Z",
354 355
      edit_undo_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_UNDO },
Michael Natterer's avatar
Michael Natterer committed
356
    NULL,
357
    "edit/undo.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
358
  { { N_("/Edit/Redo"), "<control>R",
359 360
      edit_redo_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_REDO },
Michael Natterer's avatar
Michael Natterer committed
361
    NULL,
362 363
    "edit/redo.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
364 365 366
  SEPARATOR ("/Edit/---"),

  { { N_("/Edit/Cut"), "<control>X",
367 368
      edit_cut_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CUT },
Michael Natterer's avatar
Michael Natterer committed
369
    NULL,
370
    "edit/cut.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
371
  { { N_("/Edit/Copy"), "<control>C",
372 373
      edit_copy_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_COPY },
Michael Natterer's avatar
Michael Natterer committed
374
    NULL,
375
    "edit/copy.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
376
  { { N_("/Edit/Paste"), "<control>V",
377 378
      edit_paste_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_PASTE },
Michael Natterer's avatar
Michael Natterer committed
379
    NULL,
380
    "edit/paste.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
381
  { { N_("/Edit/Paste Into"), NULL,
382 383
      edit_paste_into_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_PASTE },
Michael Natterer's avatar
Michael Natterer committed
384
    NULL,
385
    "edit/paste_into.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
386
  { { N_("/Edit/Paste as New"), NULL,
387 388
      edit_paste_as_new_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_PASTE },
Michael Natterer's avatar
Michael Natterer committed
389
    NULL,
390
    "edit/paste_as_new.html", NULL },
391 392 393

  /*  <Image>/Edit/Buffer  */

Michael Natterer's avatar
Michael Natterer committed
394
  { { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
395 396
      edit_named_cut_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CUT },
Michael Natterer's avatar
Michael Natterer committed
397
    NULL,
398
    "edit/dialogs/cut_named.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
399
  { { N_("/Edit/Buffer/Copy Named..."), "<control><shift>C",
400 401
      edit_named_copy_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_COPY },
Michael Natterer's avatar
Michael Natterer committed
402
    NULL,
403
    "edit/dialogs/copy_named.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
404
  { { N_("/Edit/Buffer/Paste Named..."), "<control><shift>V",
405 406
      edit_named_paste_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_PASTE },
Michael Natterer's avatar
Michael Natterer committed
407
    NULL,
408 409
    "edit/dialogs/paste_named.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
410 411 412
  SEPARATOR ("/Edit/---"),

  { { N_("/Edit/Clear"), "<control>K",
413 414
      edit_clear_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CLEAR },
Michael Natterer's avatar
Michael Natterer committed
415
    NULL,
416
    "edit/clear.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
417
  { { N_("/Edit/Fill with FG Color"), "<control>comma",
418 419
      edit_fill_cmd_callback, (guint) FOREGROUND_FILL,
      "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
Michael Natterer's avatar
Michael Natterer committed
420
    NULL,
421
    "edit/fill.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
422
  { { N_("/Edit/Fill with BG Color"), "<control>period",
423 424
      edit_fill_cmd_callback, (guint) BACKGROUND_FILL,
      "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
Michael Natterer's avatar
Michael Natterer committed
425
    NULL,
426
    "edit/fill.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
427
  { { N_("/Edit/Stroke"), NULL,
428 429
      edit_stroke_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_STROKE },
Michael Natterer's avatar
Michael Natterer committed
430
    NULL,
431
    "edit/stroke.html", NULL },
432

Michael Natterer's avatar
Michael Natterer committed
433
  SEPARATOR ("/Edit/---"),
434 435

  /*  <Image>/Select  */
436
  
Michael Natterer's avatar
Michael Natterer committed
437 438 439
  { { N_("/Select/Invert"), "<control>I",
      select_invert_cmd_callback, 0 },
    NULL,
440
    "select/invert.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
441 442 443
  { { N_("/Select/All"), "<control>A",
      select_all_cmd_callback, 0 },
    NULL,
444
    "select/all.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
445 446 447
  { { N_("/Select/None"), "<control><shift>A",
      select_none_cmd_callback, 0 },
    NULL,
448
    "select/none.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
449 450 451
  { { N_("/Select/Float"), "<control><shift>L",
      select_float_cmd_callback, 0 },
    NULL,
452
    "select/float.html", NULL },
453

Michael Natterer's avatar
Michael Natterer committed
454 455 456 457 458
  SEPARATOR ("/Select/---"),

  { { N_("/Select/Feather..."), "<control><shift>F",
      select_feather_cmd_callback, 0 },
    NULL,
459
    "select/dialogs/feather_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
460 461 462
  { { N_("/Select/Sharpen"), "<control><shift>H",
      select_sharpen_cmd_callback, 0 },
    NULL,
463
    "select/sharpen.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
464 465 466
  { { N_("/Select/Shrink..."), NULL,
      select_shrink_cmd_callback, 0 },
    NULL,
467
    "select/dialogs/shrink_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
468 469 470
  { { N_("/Select/Grow..."), NULL,
      select_grow_cmd_callback, 0 },
    NULL,
471
    "select/dialogs/grow_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
472 473 474
  { { N_("/Select/Border..."), "<control><shift>B",
      select_border_cmd_callback, 0 },
    NULL,
475
    "select/dialogs/border_selection.html", NULL },
476

Michael Natterer's avatar
Michael Natterer committed
477 478 479 480 481
  SEPARATOR ("/Select/---"),

  { { N_("/Select/Save to Channel"), NULL,
      select_save_cmd_callback, 0 },
    NULL,
482 483
    "select/save_to_channel.html", NULL },

484 485
  /*  <Image>/View  */

486
  { { N_("/View/Zoom In"), "equal",
487
      view_zoom_in_cmd_callback, 0,
488
      "<StockItem>", GTK_STOCK_ZOOM_IN },
Michael Natterer's avatar
Michael Natterer committed
489
    NULL,
490
    "view/zoom.html", NULL },
491
  { { N_("/View/Zoom Out"), "minus",
492
      view_zoom_out_cmd_callback, 0,
493
      "<StockItem>", GTK_STOCK_ZOOM_OUT },
Michael Natterer's avatar
Michael Natterer committed
494
    NULL,
495
    "view/zoom.html", NULL },
496 497 498 499 500
  { { N_("/View/Zoom to Fit Window"), NULL,
      view_zoom_fit_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_ZOOM_FIT },
    NULL,
    "view/zoom.html", NULL },
501 502 503

  /*  <Image>/View/Zoom  */

504 505 506
  { { N_("/View/Zoom/16:1"), NULL,
      view_zoom_cmd_callback, 1601,
      "<StockItem>", GTK_STOCK_ZOOM_IN },
Michael Natterer's avatar
Michael Natterer committed
507
    NULL,
508
    "view/zoom.html", NULL },
509 510 511
  { { N_("/View/Zoom/8:1"), NULL,
      view_zoom_cmd_callback, 801,
      "<StockItem>", GTK_STOCK_ZOOM_IN },
Michael Natterer's avatar
Michael Natterer committed
512
    NULL,
513
    "view/zoom.html", NULL },
514 515 516
  { { N_("/View/Zoom/4:1"), NULL,
      view_zoom_cmd_callback, 401,
      "<StockItem>", GTK_STOCK_ZOOM_IN },
Michael Natterer's avatar
Michael Natterer committed
517
    NULL,
518
    "view/zoom.html", NULL },
519 520 521
  { { N_("/View/Zoom/2:1"), NULL,
      view_zoom_cmd_callback, 201,
      "<StockItem>", GTK_STOCK_ZOOM_IN },
Michael Natterer's avatar
Michael Natterer committed
522
    NULL,
523
    "view/zoom.html", NULL },
524 525 526
  { { N_("/View/Zoom/1:1"), "1",
      view_zoom_cmd_callback, 101,
      "<StockItem>", GTK_STOCK_ZOOM_100 },
Michael Natterer's avatar
Michael Natterer committed
527
    NULL,
528
    "view/zoom.html", NULL },
529 530 531
  { { N_("/View/Zoom/1:2"), NULL,
      view_zoom_cmd_callback, 102,
      "<StockItem>", GTK_STOCK_ZOOM_OUT },
Michael Natterer's avatar
Michael Natterer committed
532
    NULL,
533
    "view/zoom.html", NULL },
534 535 536
  { { N_("/View/Zoom/1:4"), NULL,
      view_zoom_cmd_callback, 104,
      "<StockItem>", GTK_STOCK_ZOOM_OUT },
Michael Natterer's avatar
Michael Natterer committed
537
    NULL,
538
    "view/zoom.html", NULL },
539 540 541
  { { N_("/View/Zoom/1:8"), NULL,
      view_zoom_cmd_callback, 108,
      "<StockItem>", GTK_STOCK_ZOOM_OUT },
Michael Natterer's avatar
Michael Natterer committed
542
    NULL,
543
    "view/zoom.html", NULL },
544 545 546
  { { N_("/View/Zoom/1:16"), NULL,
      view_zoom_cmd_callback, 116,
      "<StockItem>", GTK_STOCK_ZOOM_OUT },
Michael Natterer's avatar
Michael Natterer committed
547
    NULL,
548
    "view/zoom.html", NULL },
549

Michael Natterer's avatar
Michael Natterer committed
550 551 552
  { { N_("/View/Dot for Dot"), NULL,
      view_dot_for_dot_cmd_callback, 0, "<ToggleItem>" },
    NULL,
553
    "view/dot_for_dot.html", NULL },
554

Michael Natterer's avatar
Michael Natterer committed
555 556 557
  SEPARATOR ("/View/---"),

  { { N_("/View/Info Window..."), "<control><shift>I",
558 559
      view_info_window_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_HELP },
Michael Natterer's avatar
Michael Natterer committed
560
    NULL,
561
    "view/dialogs/info_window.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
562
  { { N_("/View/Nav. Window..."), "<control><shift>N",
563 564
      view_nav_window_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_TOOL_MOVE },
Michael Natterer's avatar
Michael Natterer committed
565
    NULL,
566 567
    "view/dialogs/navigation_window.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
568 569 570 571 572
  SEPARATOR ("/View/---"),

  { { N_("/View/Toggle Selection"), "<control>T",
      view_toggle_selection_cmd_callback, 0, "<ToggleItem>" },
    NULL,
573
    "view/toggle_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
574 575
  { { N_("/View/Toggle Layer Boundary"), NULL,
      view_toggle_layer_boundary_cmd_callback, 0, "<ToggleItem>" },
Michael Natterer's avatar
Michael Natterer committed
576
    NULL,
Michael Natterer's avatar
Michael Natterer committed
577
    "view/toggle_selection.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
578 579 580
  { { N_("/View/Toggle Guides"), "<control><shift>T",
      view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
    NULL,
581
    "view/toggle_guides.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
582 583 584
  { { N_("/View/Snap to Guides"), NULL,
      view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
    NULL,
585
    "view/snap_to_guides.html", NULL },
586

Michael Natterer's avatar
Michael Natterer committed
587 588
  SEPARATOR ("/View/---"),

Michael Natterer's avatar
Michael Natterer committed
589 590 591 592 593 594 595 596 597 598 599
  { { N_("/View/Toggle Rulers"), "<control><shift>R",
      view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
    NULL,
    "view/toggle_rulers.html", NULL },
  { { N_("/View/Toggle Statusbar"), "<control><shift>S",
      view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
    NULL,
    "view/toggle_statusbar.html", NULL },

  SEPARATOR ("/View/---"),

Michael Natterer's avatar
Michael Natterer committed
600
  { { N_("/View/New View"), NULL,
601 602
      view_new_view_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_NEW },
Michael Natterer's avatar
Michael Natterer committed
603
    NULL,
604
    "view/new_view.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
605 606 607
  { { N_("/View/Shrink Wrap"), "<control>E",
      view_shrink_wrap_cmd_callback, 0 },
    NULL,
608 609
    "view/shrink_wrap.html", NULL },

610 611
  /*  <Image>/Image/Mode  */

Michael Natterer's avatar
Michael Natterer committed
612
  { { N_("/Image/Mode/RGB"), "<alt>R",
613 614
      image_convert_rgb_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CONVERT },
Michael Natterer's avatar
Michael Natterer committed
615
    NULL,
616
    "image/mode/convert_to_rgb.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
617
  { { N_("/Image/Mode/Grayscale"), "<alt>G",
618 619
      image_convert_grayscale_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CONVERT },
Michael Natterer's avatar
Michael Natterer committed
620
    NULL,
621
    "image/mode/convert_to_grayscale.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
622
  { { N_("/Image/Mode/Indexed..."), "<alt>I",
623 624
      image_convert_indexed_cmd_callback, 0,
      "<StockItem>", GTK_STOCK_CONVERT },
Michael Natterer's avatar
Michael Natterer committed
625
    NULL,
626 627
    "image/mode/dialogs/convert_to_indexed.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
628
  SEPARATOR ("/Image/Mode/---"),
629 630 631

  /*  <Image>/Image/Colors  */

Michael Natterer's avatar
Michael Natterer committed
632 633 634
  { { N_("/Image/Colors/Desaturate"), NULL,
      image_desaturate_cmd_callback, 0 },
    NULL,
635
    "image/colors/desaturate.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
636 637 638
  { { N_("/Image/Colors/Invert"), NULL,
      image_invert_cmd_callback, 0 },
    NULL,
639 640
    "image/colors/invert.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
641
  SEPARATOR ("/Image/Colors/---"),
642

643 644
  /*  <Image>/Image/Colors/Auto  */

Michael Natterer's avatar
Michael Natterer committed
645 646 647
  { { N_("/Image/Colors/Auto/Equalize"), NULL,
      image_equalize_cmd_callback, 0 },
    NULL,
648 649
    "image/colors/auto/equalize.html", NULL },

Michael Natterer's avatar
Michael Natterer committed
650
  SEPARATOR ("/Image/Colors/---"),
651 652

  /*  <Image>/Image/Alpha  */
653

Michael Natterer's avatar
Michael Natterer committed
654 655 656
  { { N_("/Image/Alpha/Add Alpha Channel"), NULL,
      layers_add_alpha_channel_cmd_callback, 0 },
    NULL,
657 658
    "layers/add_alpha_channel.html", NULL },

659 660
  /*  <Image>/Image/Transforms  */

Michael Natterer's avatar
Michael Natterer committed
661 662 663
  { { N_("/Image/Transforms/Offset..."), "<control><shift>O",
      image_offset_cmd_callback, 0 },
    NULL,
664
    "image/transforms/dialogs/offset.html", NULL },
665

Michael Natterer's avatar
Michael Natterer committed
666 667 668 669 670 671 672 673 674
  BRANCH (N_("/Image/Transforms/Rotate")),

  SEPARATOR ("/Image/Transforms/---"),

  SEPARATOR ("/Image/---"),

  { { N_("/Image/Canvas Size..."), NULL,
      image_resize_cmd_callback, 0 },
    NULL,
675
    "image/dialogs/set_canvas_size.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
676
  { { N_("/Image/Scale Image..."), NULL,
677 678
      image_scale_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_TOOL_SCALE },
Michael Natterer's avatar
Michael Natterer committed
679
    NULL,
680
    "image/dialogs/scale_image.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
681
  { { N_("/Image/Duplicate"), "<control>D",
Michael Natterer's avatar
Michael Natterer committed
682 683
      image_duplicate_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_DUPLICATE },
Michael Natterer's avatar
Michael Natterer committed
684
    NULL,
685
    "image/duplicate.html", NULL },
686

Michael Natterer's avatar
Michael Natterer committed
687
  SEPARATOR ("/Image/---"),
688

689 690
  /*  <Image>/Layers  */

Michael Natterer's avatar
Michael Natterer committed
691 692 693
  { { N_("/Layers/Layers, Channels & Paths..."), "<control>L",
      dialogs_create_lc_cmd_callback, 0 },
    NULL,
Michael Natterer's avatar
Michael Natterer committed
694
    "dialogs/layers_and_channels.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
695 696 697 698 699 700

  SEPARATOR ("/Layers/---"),

  { { N_("/Layers/Layer to Imagesize"), NULL,
      layers_resize_to_image_cmd_callback, 0 },
    NULL,
701
    "layers/layer_to_image_size.html", NULL },
702 703 704

  /*  <Image>/Layers/Stack  */

Michael Natterer's avatar
Michael Natterer committed
705 706 707
  { { N_("/Layers/Stack/Previous Layer"), "Prior",
      layers_previous_cmd_callback, 0 },
    NULL,
Michael Natterer's avatar
Michael Natterer committed
708
    "layers/stack/stack.html#previous_layer", NULL },
Michael Natterer's avatar
Michael Natterer committed
709 710 711
  { { N_("/Layers/Stack/Next Layer"), "Next",
      layers_next_cmd_callback, 0 },
    NULL,
Michael Natterer's avatar
Michael Natterer committed
712
    "layers/stack/stack.html#next_layer", NULL },
Michael Natterer's avatar
Michael Natterer committed
713
  { { N_("/Layers/Stack/Raise Layer"), "<shift>Prior",
714 715
      layers_raise_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_RAISE },
Michael Natterer's avatar
Michael Natterer committed
716
    NULL,
Michael Natterer's avatar
Michael Natterer committed
717
    "layers/stack/stack.html#raise_layer", NULL },
Michael Natterer's avatar
Michael Natterer committed
718
  { { N_("/Layers/Stack/Lower Layer"), "<shift>Next",
719 720
      layers_lower_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_LOWER },
Michael Natterer's avatar
Michael Natterer committed
721
    NULL,
Michael Natterer's avatar
Michael Natterer committed
722
    "layers/stack/stack.html#lower_layer", NULL },
Michael Natterer's avatar
Michael Natterer committed
723
  { { N_("/Layers/Stack/Layer to Top"), "<control>Prior",
724 725
      layers_raise_to_top_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_RAISE },
Michael Natterer's avatar
Michael Natterer committed
726
    NULL,
Michael Natterer's avatar
Michael Natterer committed
727
    "layers/stack/stack.html#layer_to_top", NULL },
Michael Natterer's avatar
Michael Natterer committed
728
  { { N_("/Layers/Stack/Layer to Bottom"), "<control>Next",
729 730
      layers_lower_to_bottom_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_LOWER },
Michael Natterer's avatar
Michael Natterer committed
731
    NULL,
Michael Natterer's avatar
Michael Natterer committed
732
    "layers/stack/stack.html#layer_to_bottom", NULL },
Michael Natterer's avatar
Michael Natterer committed
733 734

  SEPARATOR ("/Layers/Stack/---"),
735 736 737

  /*  <Image>/Layers/Rotate  */

Michael Natterer's avatar
Michael Natterer committed
738
  BRANCH (N_("/Layers/Rotate")),
739

Michael Natterer's avatar
Michael Natterer committed
740 741 742
  SEPARATOR ("/Layers/---"),

  { { N_("/Layers/Anchor Layer"), "<control>H",
743 744
      layers_anchor_cmd_callback, 0,
      "<StockItem>", GIMP_STOCK_ANCHOR },
Michael Natterer's avatar
Michael Natterer committed
745
    NULL,
746
    "layers/anchor_layer.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
747 748 749
  { { N_("/Layers/Merge Visible Layers..."), "<control>M",
      layers_merge_layers_cmd_callback, 0 },
    NULL,
Michael Natterer's avatar
Michael Natterer committed
750
    "layers/dialogs/merge_visible_layers.html", NULL },
Michael Natterer's avatar
Michael Natterer committed
751 752 753
  { { N_("/Layers/Flatten Image"), NULL,
      layers_flatten_image_cmd_callback, 0 },
    NULL,
754
    "layers/flatten_image.html", NULL },
755

Michael Natterer's avatar
Michael Natterer committed
756 757 758