Commit 2c958770 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

use gtk_label_set_text_with_mnemonic() instead of just

2003-06-06  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpitemfactory.c (gimp_item_factory_set_label):
	use gtk_label_set_text_with_mnemonic() instead of just
	gtk_label_set_text().

	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: added mnemonics for all sub-menus.
	Fixes bug #106991.

	* app/gui/image-menu.c: cleaned up the "Layers" menu: moved
	sub-menus together. Changed the "Stack" menu's labels and
	accelerators and added "Select Top/Bottom Layer" for consistency
	(bound to Home/End).

	* app/gui/layers-commands.[ch]: changed accordingly. Added the
	new select top/bottom callbacks.
parent 88288b6e
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpitemfactory.c (gimp_item_factory_set_label):
use gtk_label_set_text_with_mnemonic() instead of just
gtk_label_set_text().
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: added mnemonics for all sub-menus.
Fixes bug #106991.
* app/gui/image-menu.c: cleaned up the "Layers" menu: moved
sub-menus together. Changed the "Stack" menu's labels and
accelerators and added "Select Top/Bottom Layer" for consistency
(bound to Home/End).
* app/gui/layers-commands.[ch]: changed accordingly. Added the
new select top/bottom callbacks.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpcolortool.c: removed unneeded includes.
......@@ -85,8 +85,8 @@ static void layers_resize_layer_query (GimpImage *gimage,
/* public functions */
void
layers_previous_cmd_callback (GtkWidget *widget,
gpointer data)
layers_select_previous_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
......@@ -110,8 +110,8 @@ layers_previous_cmd_callback (GtkWidget *widget,
}
void
layers_next_cmd_callback (GtkWidget *widget,
gpointer data)
layers_select_next_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
......@@ -132,6 +132,48 @@ layers_next_cmd_callback (GtkWidget *widget,
}
}
void
layers_select_top_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
return_if_no_image (gimage, data);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, 0);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gimp_image_flush (gimage);
}
}
void
layers_select_bottom_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
gint num_layers;
return_if_no_image (gimage, data);
num_layers = gimp_container_num_children (gimage->layers);
if (num_layers > 0)
{
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, num_layers - 1);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gimp_image_flush (gimage);
}
}
}
void
layers_raise_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -20,10 +20,15 @@
#define __LAYERS_COMMANDS_H__
void layers_previous_cmd_callback (GtkWidget *widet,
void layers_select_previous_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_next_cmd_callback (GtkWidget *widet,
void layers_select_next_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_select_top_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_select_bottom_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_raise_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_lower_cmd_callback (GtkWidget *widet,
......
......@@ -95,6 +95,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/File/Open Recent */
MENU_BRANCH (N_("/File/_Open Recent")),
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
NULL, NULL, NULL },
......@@ -192,6 +194,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Edit/Buffer */
MENU_BRANCH (N_("/Edit/_Buffer")),
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
edit_named_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
......@@ -311,6 +315,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/View/Zoom */
MENU_BRANCH (N_("/View/_Zoom")),
{ { N_("/View/Zoom/Zoom Out"), "minus",
view_zoom_out_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_OUT },
......@@ -446,6 +452,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Mode */
MENU_BRANCH (N_("/Image/_Mode")),
{ { N_("/Image/Mode/RGB"), NULL,
image_convert_rgb_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_CONVERT_RGB },
......@@ -464,6 +472,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Transform */
MENU_BRANCH (N_("/Image/_Transform")),
{ { N_("/Image/Transform/Flip Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
......@@ -559,16 +569,31 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL,
"layers/delete_layer.html", NULL },
MENU_SEPARATOR ("/Layer/---"),
/* <Image>/Layer/Stack */
{ { N_("/Layer/Stack/Previous Layer"), "Prior",
layers_previous_cmd_callback, 0 },
MENU_BRANCH (N_("/Layer/_Stack")),
{ { N_("/Layer/Stack/Select Previous Layer"), "Prior",
layers_select_previous_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#previous_layer", NULL },
{ { N_("/Layer/Stack/Select Next Layer"), "Next",
layers_select_next_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#next_layer", NULL },
{ { N_("/Layer/Stack/Select Top Layer"), "Home",
layers_select_top_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#previous_layer", NULL },
{ { N_("/Layer/Stack/Next Layer"), "Next",
layers_next_cmd_callback, 0 },
{ { N_("/Layer/Stack/Select Bottom Layer"), "End",
layers_select_bottom_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#next_layer", NULL },
MENU_SEPARATOR ("/Layer/Stack/---"),
{ { N_("/Layer/Stack/Raise Layer"), "<shift>Prior",
layers_raise_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GO_UP },
......@@ -579,82 +604,21 @@ GimpItemFactoryEntry image_menu_entries[] =
"<StockItem>", GTK_STOCK_GO_DOWN },
NULL,
"layers/stack/stack.html#lower_layer", NULL },
{ { N_("/Layer/Stack/Layer to Top"), "<control>Prior",
{ { N_("/Layer/Stack/Layer to Top"), "<shift>Home",
layers_raise_to_top_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GOTO_TOP },
NULL,
"layers/stack/stack.html#layer_to_top", NULL },
{ { N_("/Layer/Stack/Layer to Bottom"), "<control>Next",
{ { N_("/Layer/Stack/Layer to Bottom"), "<Shift>End",
layers_lower_to_bottom_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GOTO_BOTTOM },
NULL,
"layers/stack/stack.html#layer_to_bottom", NULL },
MENU_SEPARATOR ("/Layer/---"),
{ { N_("/Layer/Layer Boundary Size..."), NULL,
layers_resize_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RESIZE },
NULL,
"layers/dialogs/layer_boundary_size.html", NULL },
{ { N_("/Layer/Layer to Imagesize"), NULL,
layers_resize_to_image_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LAYER_TO_IMAGESIZE },
NULL,
"layers/layer_to_image_size.html", NULL },
{ { N_("/Layer/Scale Layer..."), NULL,
layers_scale_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_SCALE },
NULL,
"layers/dialogs/scale_layer.html", NULL },
{ { N_("/Layer/Crop Layer"), NULL,
layers_crop_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_TOOL_CROP },
NULL,
"layers/dialogs/scale_layer.html", NULL },
/* <Image>/Layer/Transform */
{ { N_("/Layer/Transform/Flip Horizontally"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"layers/flip_layer.html", NULL },
{ { N_("/Layer/Transform/Flip Vertically"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"layers/flip_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Rotate Right"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_90,
"<StockItem>", GIMP_STOCK_ROTATE_90 },
NULL,
"layers/rotate_layer.html", NULL },
{ { N_("/Layer/Transform/Rotate Left"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_270,
"<StockItem>", GIMP_STOCK_ROTATE_270 },
NULL,
"layers/rotate_layer.html", NULL },
{ { N_("/Layer/Transform/Rotate 180 degrees"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_180,
"<StockItem>", GIMP_STOCK_ROTATE_180 },
NULL,
"layers/rotate_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Offset..."), "<control><shift>O",
drawable_offset_cmd_callback, 0 },
NULL,
"layers/dialogs/offset.html", NULL },
MENU_SEPARATOR ("/Layer/---"),
/* <Image>/Layer/Colors */
MENU_BRANCH (N_("/Layer/_Colors")),
MENU_SEPARATOR ("/Layer/Colors/---"),
{ { N_("/Layer/Colors/Desaturate"), NULL,
......@@ -670,6 +634,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Layer/Colors/Auto */
MENU_BRANCH (N_("/Layer/Colors/_Auto")),
{ { N_("/Layer/Colors/Auto/Equalize"), NULL,
drawable_equalize_cmd_callback, 0 },
NULL,
......@@ -679,6 +645,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Layer/Mask */
MENU_BRANCH (N_("/Layer/_Mask")),
{ { N_("/Layer/Mask/Add Layer Mask..."), NULL,
layers_add_layer_mask_cmd_callback, 0 },
NULL,
......@@ -700,6 +668,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Layer/Transparency */
MENU_BRANCH (N_("/Layer/Tr_ansparency")),
{ { N_("/Layer/Transparency/Add Alpha Channel"), NULL,
layers_add_alpha_channel_cmd_callback, 0 },
NULL,
......@@ -712,6 +682,69 @@ GimpItemFactoryEntry image_menu_entries[] =
MENU_SEPARATOR ("/Layer/Transparency/---"),
/* <Image>/Layer/Transform */
MENU_BRANCH (N_("/Layer/_Transform")),
{ { N_("/Layer/Transform/Flip Horizontally"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"layers/flip_layer.html", NULL },
{ { N_("/Layer/Transform/Flip Vertically"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"layers/flip_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Rotate Right"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_90,
"<StockItem>", GIMP_STOCK_ROTATE_90 },
NULL,
"layers/rotate_layer.html", NULL },
{ { N_("/Layer/Transform/Rotate Left"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_270,
"<StockItem>", GIMP_STOCK_ROTATE_270 },
NULL,
"layers/rotate_layer.html", NULL },
{ { N_("/Layer/Transform/Rotate 180 degrees"), NULL,
drawable_rotate_cmd_callback, GIMP_ROTATE_180,
"<StockItem>", GIMP_STOCK_ROTATE_180 },
NULL,
"layers/rotate_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Offset..."), "<control><shift>O",
drawable_offset_cmd_callback, 0 },
NULL,
"layers/dialogs/offset.html", NULL },
MENU_SEPARATOR ("/Layer/---"),
{ { N_("/Layer/Layer Boundary Size..."), NULL,
layers_resize_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RESIZE },
NULL,
"layers/dialogs/layer_boundary_size.html", NULL },
{ { N_("/Layer/Layer to Imagesize"), NULL,
layers_resize_to_image_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LAYER_TO_IMAGESIZE },
NULL,
"layers/layer_to_image_size.html", NULL },
{ { N_("/Layer/Scale Layer..."), NULL,
layers_scale_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_SCALE },
NULL,
"layers/dialogs/scale_layer.html", NULL },
{ { N_("/Layer/Crop Layer"), NULL,
layers_crop_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_TOOL_CROP },
NULL,
"layers/dialogs/scale_layer.html", NULL },
MENU_SEPARATOR ("/Layer/---"),
/* <Image>/Tools */
......@@ -735,9 +768,9 @@ GimpItemFactoryEntry image_menu_entries[] =
MENU_SEPARATOR ("/Tools/---"),
MENU_BRANCH (N_("/Tools/Selection Tools")),
MENU_BRANCH (N_("/Tools/Paint Tools")),
MENU_BRANCH (N_("/Tools/Transform Tools")),
MENU_BRANCH (N_("/Tools/_Selection Tools")),
MENU_BRANCH (N_("/Tools/_Paint Tools")),
MENU_BRANCH (N_("/Tools/_Transform Tools")),
/* <Image>/Dialogs */
......@@ -880,31 +913,31 @@ GimpItemFactoryEntry image_menu_entries[] =
MENU_SEPARATOR ("/Filters/---"),
MENU_BRANCH (N_("/Filters/Blur")),
MENU_BRANCH (N_("/Filters/Colors")),
MENU_BRANCH (N_("/Filters/Noise")),
MENU_BRANCH (N_("/Filters/Edge-Detect")),
MENU_BRANCH (N_("/Filters/Enhance")),
MENU_BRANCH (N_("/Filters/Generic")),
MENU_BRANCH (N_("/Filters/_Blur")),
MENU_BRANCH (N_("/Filters/_Colors")),
MENU_BRANCH (N_("/Filters/_Noise")),
MENU_BRANCH (N_("/Filters/_Edge-Detect")),
MENU_BRANCH (N_("/Filters/En_hance")),
MENU_BRANCH (N_("/Filters/_Generic")),
MENU_SEPARATOR ("/Filters/---"),
MENU_BRANCH (N_("/Filters/Glass Effects")),
MENU_BRANCH (N_("/Filters/Light Effects")),
MENU_BRANCH (N_("/Filters/Distorts")),
MENU_BRANCH (N_("/Filters/Artistic")),
MENU_BRANCH (N_("/Filters/Map")),
MENU_BRANCH (N_("/Filters/Render")),
MENU_BRANCH (N_("/Filters/Web")),
MENU_BRANCH (N_("/Filters/Gla_ss Effects")),
MENU_BRANCH (N_("/Filters/_Light Effects")),
MENU_BRANCH (N_("/Filters/_Distorts")),
MENU_BRANCH (N_("/Filters/_Artistic")),
MENU_BRANCH (N_("/Filters/_Map")),
MENU_BRANCH (N_("/Filters/_Render")),
MENU_BRANCH (N_("/Filters/_Web")),
MENU_SEPARATOR ("/Filters/web-separator"),
MENU_BRANCH (N_("/Filters/Animation")),
MENU_BRANCH (N_("/Filters/Combine")),
MENU_BRANCH (N_("/Filters/An_imation")),
MENU_BRANCH (N_("/Filters/C_ombine")),
MENU_SEPARATOR ("/Filters/---"),
MENU_BRANCH (N_("/Filters/Toys"))
MENU_BRANCH (N_("/Filters/_Toys"))
};
gint n_image_menu_entries = G_N_ELEMENTS (image_menu_entries);
......@@ -1370,19 +1403,6 @@ image_menu_update (GtkItemFactory *item_factory,
/* Layer */
SET_SENSITIVE ("/Layer/Stack/Previous Layer",
lp && !fs && !aux && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Next Layer",
lp && !fs && !aux && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Stack/Raise Layer",
lp && !fs && !aux && alpha && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Lower Layer",
lp && !fs && !aux && alpha && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Stack/Layer to Top",
lp && !fs && !aux && alpha && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Layer to Bottom",
lp && !fs && !aux && alpha && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/New Layer...", gdisp);
SET_SENSITIVE ("/Layer/Duplicate Layer", lp && !fs && !aux);
SET_SENSITIVE ("/Layer/Anchor Layer", lp && fs && !aux);
......@@ -1394,12 +1414,27 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Scale Layer...", lp && !aux);
SET_SENSITIVE ("/Layer/Crop Layer", lp && !aux && sel);
SET_SENSITIVE ("/Layer/Transform/Flip Horizontally", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Vertically", lp);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
SET_SENSITIVE ("/Layer/Stack/Select Previous Layer",
lp && !fs && !aux && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Select Next Layer",
lp && !fs && !aux && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Stack/Select Top Layer",
lp && !fs && !aux && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Select Bottom Layer",
lp && !fs && !aux && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Stack/Raise Layer",
lp && !fs && !aux && alpha && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Lower Layer",
lp && !fs && !aux && alpha && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Stack/Layer to Top",
lp && !fs && !aux && alpha && lind > 0);
SET_SENSITIVE ("/Layer/Stack/Layer to Bottom",
lp && !fs && !aux && alpha && lind < (lnum - 1));
SET_SENSITIVE ("/Layer/Colors/Color Balance...", lp && is_rgb);
SET_SENSITIVE ("/Layer/Colors/Hue-Saturation...", lp && is_rgb);
SET_SENSITIVE ("/Layer/Colors/Colorize...", lp && is_rgb);
SET_SENSITIVE ("/Layer/Colors/Brightness-Contrast...", lp && ! is_indexed);
SET_SENSITIVE ("/Layer/Colors/Threshold...", lp && ! is_indexed);
SET_SENSITIVE ("/Layer/Colors/Levels...", lp && ! is_indexed);
......@@ -1415,8 +1450,12 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Mask/Delete Layer Mask", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Mask to Selection", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Transparency/Alpha to Selection", lp && !aux && alpha);
SET_SENSITIVE ("/Layer/Transparency/Add Alpha Channel", lp && !aux && !fs && !lm && !alpha);
SET_SENSITIVE ("/Layer/Transparency/Alpha to Selection", lp && !aux && alpha);
SET_SENSITIVE ("/Layer/Transform/Flip Horizontally", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Vertically", lp);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
#undef SET_ACTIVE
#undef SET_LABEL
......@@ -1493,7 +1532,7 @@ image_menu_set_zoom (GtkItemFactory *item_factory,
gimp_item_factory_set_active (item_factory, menu, TRUE);
label = g_strdup_printf (_("Zoom (%d:%d)"), scaledest, scalesrc);
label = g_strdup_printf (_("_Zoom (%d:%d)"), scaledest, scalesrc);
gimp_item_factory_set_label (item_factory, "/View/Zoom", label);
g_free (label);
......
......@@ -85,8 +85,8 @@ static void layers_resize_layer_query (GimpImage *gimage,
/* public functions */
void
layers_previous_cmd_callback (GtkWidget *widget,
gpointer data)
layers_select_previous_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
......@@ -110,8 +110,8 @@ layers_previous_cmd_callback (GtkWidget *widget,
}
void
layers_next_cmd_callback (GtkWidget *widget,
gpointer data)
layers_select_next_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
......@@ -132,6 +132,48 @@ layers_next_cmd_callback (GtkWidget *widget,
}
}
void
layers_select_top_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
return_if_no_image (gimage, data);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, 0);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gimp_image_flush (gimage);
}
}
void
layers_select_bottom_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpLayer *new_layer;
gint num_layers;
return_if_no_image (gimage, data);
num_layers = gimp_container_num_children (gimage->layers);
if (num_layers > 0)
{
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, num_layers - 1);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gimp_image_flush (gimage);
}
}
}
void
layers_raise_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -20,10 +20,15 @@
#define __LAYERS_COMMANDS_H__
void layers_previous_cmd_callback (GtkWidget *widet,
void layers_select_previous_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_next_cmd_callback (GtkWidget *widet,
void layers_select_next_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_select_top_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_select_bottom_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_raise_cmd_callback (GtkWidget *widet,
gpointer data);
void layers_lower_cmd_callback (GtkWidget *widet,
......
......@@ -60,6 +60,8 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
/* <Toolbox>/File/Open Recent */
MENU_BRANCH (N_("/File/_Open Recent")),
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
NULL, NULL, NULL },
......@@ -73,7 +75,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
/* <Toolbox>/File/Acquire */
MENU_BRANCH (N_("/File/Acquire")),
MENU_BRANCH (N_("/File/_Acquire")),
MENU_SEPARATOR ("/File/---"),
......@@ -85,6 +87,8 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
/* <Toolbox>/File/Dialogs */
MENU_BRANCH (N_("/File/_Dialogs")),
{ { N_("/File/Dialogs/Layers, Channels & Paths..."), NULL,
dialogs_create_lc_cmd_callback, 0 },
NULL,
......
......@@ -95,6 +95,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/File/Open Recent */
MENU_BRANCH (N_("/File/_Open Recent")),
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
NULL, NULL, NULL },
......@@ -192,6 +194,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Edit/Buffer */
MENU_BRANCH (N_("/Edit/_Buffer")),
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
edit_named_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
......@@ -311,6 +315,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/View/Zoom */
MENU_BRANCH (N_("/View/_Zoom")),
{ { N_("/View/Zoom/Zoom Out"), "minus",
view_zoom_out_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_OUT },
......@@ -446,6 +452,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Mode */
MENU_BRANCH (N_("/Image/_Mode")),
{ { N_("/Image/Mode/RGB"), NULL,
image_convert_rgb_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_CONVERT_RGB },
......@@ -464,6 +472,8 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Transform */
MENU_BRANCH (N_("/Image/_Transform")),
{ { N_("/Image/Transform/Flip Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
......@@ -559,16 +569,31 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL,
"layers/delete_layer.html", NULL },
MENU_SEPARATOR ("/Layer/---"),
/* <Image>/Layer/Stack */
{ { N_("/Layer/Stack/Previous Layer"), "Prior",
layers_previous_cmd_callback, 0 },
MENU_BRANCH (N_("/Layer/_Stack")),
{ { N_("/Layer/Stack/Select Previous Layer"), "Prior",
layers_select_previous_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#previous_layer", NULL },
{ { N_("/Layer/Stack/Select Next Layer"), "Next",
layers_select_next_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#next_layer", NULL },
{ { N_("/Layer/Stack/Select Top Layer"), "Home",
layers_select_top_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#previous_layer", NULL },
{ { N_("/Layer/Stack/Next Layer"), "Next",
layers_next_cmd_callback, 0 },
{ { N_("/Layer/Stack/Select Bottom Layer"), "End",
layers_select_bottom_cmd_callback, 0 },
NULL,
"layers/stack/stack.html#next_layer", NULL },
MENU_SEPARATOR ("/Layer/Stack/---"),
{ { N_("/Layer/Stack/Raise Layer"), "<shift>Prior",
layers_raise_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GO_UP },
......@@ -579,82 +604,21 @@ GimpItemFactoryEntry image_menu_entries[] =
"<StockItem>", GTK_STOCK_GO_DOWN },
NULL,
"layers/stack/stack.html#lower_layer", NULL },
{ { N_("/Layer/Stack/Layer to Top"), "<control>Prior",
{ { N_("/Layer/Stack/Layer to Top"), "<shift>Home",
layers_raise_to_top_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GOTO_TOP },
NULL,
"layers/stack/stack.html#layer_to_top", NULL },
{ { N_("/Layer/Stack/Layer to Bottom"), "<control>Next",
{ { N_("/Layer/Stack/Layer to Bottom"), "<Shift>End",
layers_lower_to_bottom_cmd_callback, 0,
"<StockItem>", GTK_STOCK_GOTO_BOTTOM },
NULL,
"layers/stack/stack.html#layer_to_bottom", NULL },
MENU_SEPARATOR ("/Layer/---"),
{ { N_("/Layer/Layer Boundary Size..."), NULL,
layers_resize_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RESIZE },
NULL,
"layers/dialogs/layer_boundary_size.html", NULL },
{ { N_("/Layer/Layer to Imagesize"), NULL,
layers_resize_to_image_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LAYER_TO_IMAGESIZE },
NULL,
"layers/layer_to_image_size.html", NULL },
{ { N_("/Layer/Scale Layer..."), NULL,
layers_scale_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_SCALE },
NULL,
"layers/dialogs/scale_layer.html", NULL },
{ { N_("/Layer/Crop Layer"), NULL,
layers_crop_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_TOOL_CROP },
NULL,
"layers/dialogs/scale_layer.html", NULL },
/* <Image>/Layer/Transform */
{ { N_("/Layer/Transform/Flip Horizontally"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"layers/flip_layer.html", NULL },
{ { N_("/Layer/Transform/Flip Vertically"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,