42
42
#include "gimp-intl.h"
45
static GimpActionEntry layers_actions[] =
45
static const GimpActionEntry layers_actions[] =
47
47
{ "layers-popup", GIMP_STOCK_LAYERS,
48
48
N_("Layers Menu"), NULL, NULL, NULL,
49
49
GIMP_HELP_LAYER_DIALOG },
51
{ "layers-menu", NULL, N_("_Layer") },
52
{ "layers-stack-menu", NULL, N_("Stac_k") },
53
{ "layers-colors-menu", NULL, N_("_Colors") },
54
{ "layers-colors-auto-menu", NULL, N_("_Auto") },
55
{ "layers-mask-menu", NULL, N_("_Mask") },
56
{ "layers-transparency-menu", NULL, N_("Tr_ansparency") },
57
{ "layers-transform-menu", NULL, N_("_Transform") },
58
{ "layers-properties-menu", NULL, N_("_Properties") },
59
{ "layers-opacity-menu", GIMP_STOCK_TRANSPARENCY, N_("_Opacity") },
60
{ "layers-mode-menu", GIMP_STOCK_TOOL_PENCIL, N_("Layer _Mode") },
51
{ "layers-menu", NULL, N_("_Layer") },
52
{ "layers-stack-menu", NULL, N_("Stac_k") },
53
{ "layers-text-to-selection-menu", GIMP_STOCK_TOOL_TEXT, N_("Te_xt to Selection") },
54
{ "layers-mask-menu", NULL, N_("_Mask") },
55
{ "layers-transparency-menu", NULL, N_("Tr_ansparency") },
56
{ "layers-transform-menu", NULL, N_("_Transform") },
57
{ "layers-properties-menu", GTK_STOCK_PROPERTIES, N_("_Properties") },
58
{ "layers-opacity-menu", GIMP_STOCK_TRANSPARENCY, N_("_Opacity") },
59
{ "layers-mode-menu", GIMP_STOCK_TOOL_PENCIL, N_("Layer _Mode") },
62
61
{ "layers-text-tool", GIMP_STOCK_TOOL_TEXT,
63
N_("Te_xt Tool"), NULL, NULL,
62
N_("Te_xt Tool"), NULL,
63
N_("Activate the text tool on this text layer"),
64
64
G_CALLBACK (layers_text_tool_cmd_callback),
65
65
GIMP_HELP_TOOL_TEXT },
67
{ "layers-edit-attributes", GIMP_STOCK_EDIT,
67
{ "layers-edit-attributes", GTK_STOCK_EDIT,
68
68
N_("_Edit Layer Attributes..."), NULL,
69
N_("Edit layer attributes"),
69
N_("Edit the layer's name"),
70
70
G_CALLBACK (layers_edit_attributes_cmd_callback),
71
71
GIMP_HELP_LAYER_EDIT },
73
73
{ "layers-new", GTK_STOCK_NEW,
74
N_("_New Layer..."), "",
74
N_("_New Layer..."), "<control><shift>N",
75
N_("Create a new layer and add it to the image"),
76
76
G_CALLBACK (layers_new_cmd_callback),
77
77
GIMP_HELP_LAYER_NEW },
79
79
{ "layers-new-last-values", GTK_STOCK_NEW,
80
80
N_("_New Layer"), "",
81
N_("New layer with last values"),
81
N_("Create a new layer with last used values"),
82
82
G_CALLBACK (layers_new_last_vals_cmd_callback),
83
83
GIMP_HELP_LAYER_NEW },
85
85
{ "layers-duplicate", GIMP_STOCK_DUPLICATE,
86
N_("D_uplicate Layer"), NULL,
87
N_("Duplicate layer"),
86
N_("D_uplicate Layer"), "<control><shift>D",
87
N_("Create a duplicate of the layer and add it to the image"),
88
88
G_CALLBACK (layers_duplicate_cmd_callback),
89
89
GIMP_HELP_LAYER_DUPLICATE },
91
91
{ "layers-delete", GTK_STOCK_DELETE,
92
92
N_("_Delete Layer"), "",
93
N_("Delete this layer"),
94
94
G_CALLBACK (layers_delete_cmd_callback),
95
95
GIMP_HELP_LAYER_DELETE },
97
97
{ "layers-raise", GTK_STOCK_GO_UP,
98
98
N_("_Raise Layer"), "",
99
N_("Raise this layer one step in the layer stack"),
100
100
G_CALLBACK (layers_raise_cmd_callback),
101
101
GIMP_HELP_LAYER_RAISE },
103
103
{ "layers-raise-to-top", GTK_STOCK_GOTO_TOP,
104
104
N_("Layer to _Top"), "",
105
N_("Raise layer to top"),
105
N_("Move this layer to the top of the layer stack"),
106
106
G_CALLBACK (layers_raise_to_top_cmd_callback),
107
107
GIMP_HELP_LAYER_RAISE_TO_TOP },
109
109
{ "layers-lower", GTK_STOCK_GO_DOWN,
110
110
N_("_Lower Layer"), "",
111
N_("Lower this layer one step in the layer stack"),
112
112
G_CALLBACK (layers_lower_cmd_callback),
113
113
GIMP_HELP_LAYER_LOWER },
115
115
{ "layers-lower-to-bottom", GTK_STOCK_GOTO_BOTTOM,
116
116
N_("Layer to _Bottom"), "",
117
N_("Lower layer to bottom"),
117
N_("Move this layer to the bottom of the layer stack"),
118
118
G_CALLBACK (layers_lower_to_bottom_cmd_callback),
119
119
GIMP_HELP_LAYER_LOWER_TO_BOTTOM },
121
121
{ "layers-anchor", GIMP_STOCK_ANCHOR,
122
122
N_("_Anchor Layer"), "<control>H",
123
N_("Anchor floating layer"),
123
N_("Anchor the floating layer"),
124
124
G_CALLBACK (layers_anchor_cmd_callback),
125
125
GIMP_HELP_LAYER_ANCHOR },
127
127
{ "layers-merge-down", GIMP_STOCK_MERGE_DOWN,
128
N_("Merge Do_wn"), NULL, NULL,
128
N_("Merge Do_wn"), NULL,
129
N_("Merge this layer with the one below it"),
129
130
G_CALLBACK (layers_merge_down_cmd_callback),
130
131
GIMP_HELP_LAYER_MERGE_DOWN },
132
133
{ "layers-merge-layers", NULL,
133
N_("Merge _Visible Layers..."), NULL, NULL,
134
N_("Merge _Visible Layers..."), NULL,
135
N_("Merge all visible layers into one layer"),
134
136
G_CALLBACK (image_merge_layers_cmd_callback),
135
137
GIMP_HELP_IMAGE_MERGE_LAYERS },
137
139
{ "layers-flatten-image", NULL,
138
N_("_Flatten Image"), NULL, NULL,
140
N_("_Flatten Image"), NULL,
141
N_("Merge all layers into one and remove transparency"),
139
142
G_CALLBACK (image_flatten_image_cmd_callback),
140
143
GIMP_HELP_IMAGE_FLATTEN },
142
145
{ "layers-text-discard", GIMP_STOCK_TOOL_TEXT,
143
N_("_Discard Text Information"), NULL, NULL,
146
N_("_Discard Text Information"), NULL,
147
N_("Turn this text layer into a normal layer"),
144
148
G_CALLBACK (layers_text_discard_cmd_callback),
145
149
GIMP_HELP_LAYER_TEXT_DISCARD },
151
{ "layers-text-to-vectors", GIMP_STOCK_TOOL_TEXT,
152
N_("Text to _Path"), NULL,
153
N_("Create a path from this text layer"),
154
G_CALLBACK (layers_text_to_vectors_cmd_callback),
155
GIMP_HELP_LAYER_TEXT_TO_PATH },
157
{ "layers-text-along-vectors", GIMP_STOCK_TOOL_TEXT,
158
N_("Text alon_g Path"), NULL,
159
N_("Warp this layer's text along the current path"),
160
G_CALLBACK (layers_text_along_vectors_cmd_callback),
161
GIMP_HELP_LAYER_TEXT_ALONG_PATH },
147
163
{ "layers-resize", GIMP_STOCK_RESIZE,
148
N_("Layer B_oundary Size..."), NULL, NULL,
164
N_("Layer B_oundary Size..."), NULL,
165
N_("Adjust the layer dimensions"),
149
166
G_CALLBACK (layers_resize_cmd_callback),
150
167
GIMP_HELP_LAYER_RESIZE },
152
169
{ "layers-resize-to-image", GIMP_STOCK_LAYER_TO_IMAGESIZE,
153
N_("Layer to _Image Size"), NULL, NULL,
170
N_("Layer to _Image Size"), NULL,
171
N_("Resize the layer to the size of the image"),
154
172
G_CALLBACK (layers_resize_to_image_cmd_callback),
155
173
GIMP_HELP_LAYER_RESIZE_TO_IMAGE },
157
175
{ "layers-scale", GIMP_STOCK_SCALE,
158
N_("_Scale Layer..."), NULL, NULL,
176
N_("_Scale Layer..."), NULL,
177
N_("Change the size of the layer content"),
159
178
G_CALLBACK (layers_scale_cmd_callback),
160
179
GIMP_HELP_LAYER_SCALE },
162
181
{ "layers-crop", GIMP_STOCK_TOOL_CROP,
163
N_("Cr_op Layer"), NULL, NULL,
182
N_("_Crop Layer"), NULL,
183
N_("Crop the layer to the extents of the selection"),
164
184
G_CALLBACK (layers_crop_cmd_callback),
165
185
GIMP_HELP_LAYER_CROP },
167
187
{ "layers-mask-add", GIMP_STOCK_LAYER_MASK,
168
N_("Add La_yer Mask..."), NULL, NULL,
188
N_("Add La_yer Mask..."), NULL,
189
N_("Add a mask that allows non-destructive editing of transparency"),
169
190
G_CALLBACK (layers_mask_add_cmd_callback),
170
191
GIMP_HELP_LAYER_MASK_ADD },
172
193
{ "layers-alpha-add", GIMP_STOCK_TRANSPARENCY,
173
N_("Add Alpha C_hannel"), NULL, NULL,
194
N_("Add Alpha C_hannel"), NULL,
195
N_("Add transparency information to the layer"),
174
196
G_CALLBACK (layers_alpha_add_cmd_callback),
175
GIMP_HELP_LAYER_ALPHA_ADD }
197
GIMP_HELP_LAYER_ALPHA_ADD },
199
{ "layers-alpha-remove", NULL,
200
N_("_Remove Alpha Channel"), NULL,
201
N_("Remove transparency information from the layer"),
202
G_CALLBACK (layers_alpha_remove_cmd_callback),
203
GIMP_HELP_LAYER_ALPHA_REMOVE }
178
static GimpToggleActionEntry layers_toggle_actions[] =
206
static const GimpToggleActionEntry layers_toggle_actions[] =
180
{ "layers-preserve-transparency", GIMP_STOCK_TRANSPARENCY,
181
N_("Keep Transparency"), NULL, NULL,
182
G_CALLBACK (layers_preserve_trans_cmd_callback),
208
{ "layers-lock-alpha", GIMP_STOCK_TRANSPARENCY,
209
N_("Lock Alph_a Channel"), NULL,
210
N_("Keep transparency information on this layer from being modified"),
211
G_CALLBACK (layers_lock_alpha_cmd_callback),
184
GIMP_HELP_LAYER_KEEP_TRANSPARENCY },
213
GIMP_HELP_LAYER_LOCK_ALPHA },
186
{ "layers-mask-edit", GIMP_STOCK_EDIT,
187
N_("Edit Layer Mask"), NULL, NULL,
215
{ "layers-mask-edit", GTK_STOCK_EDIT,
216
N_("_Edit Layer Mask"), NULL,
217
N_("Work on the layer mask"),
188
218
G_CALLBACK (layers_mask_edit_cmd_callback),
190
220
GIMP_HELP_LAYER_MASK_EDIT },
192
222
{ "layers-mask-show", GIMP_STOCK_VISIBLE,
193
N_("Show Layer Mask"), NULL, NULL,
223
N_("S_how Layer Mask"), NULL, NULL,
194
224
G_CALLBACK (layers_mask_show_cmd_callback),
196
226
GIMP_HELP_LAYER_MASK_SHOW },
198
228
{ "layers-mask-disable", NULL,
199
N_("Disable Layer Mask"), NULL, NULL,
229
N_("_Disable Layer Mask"), NULL,
230
N_("Dismiss the effect of the layer mask"),
200
231
G_CALLBACK (layers_mask_disable_cmd_callback),
202
233
GIMP_HELP_LAYER_MASK_DISABLE }
205
static GimpEnumActionEntry layers_mask_apply_actions[] =
236
static const GimpEnumActionEntry layers_mask_apply_actions[] =
207
238
{ "layers-mask-apply", NULL,
208
N_("Apply Layer _Mask"), NULL, NULL,
239
N_("Apply Layer _Mask"), NULL,
240
N_("Apply the effect of the layer mask and remove it"),
209
241
GIMP_MASK_APPLY, FALSE,
210
242
GIMP_HELP_LAYER_MASK_APPLY },
212
244
{ "layers-mask-delete", GTK_STOCK_DELETE,
213
N_("Delete Layer Mas_k"), "", NULL,
245
N_("Delete Layer Mas_k"), "",
246
N_("Remove the layer mask and its effect"),
214
247
GIMP_MASK_DISCARD, FALSE,
215
248
GIMP_HELP_LAYER_MASK_DELETE }
218
static GimpEnumActionEntry layers_mask_to_selection_actions[] =
251
static const GimpEnumActionEntry layers_mask_to_selection_actions[] =
220
253
{ "layers-mask-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
221
N_("_Mask to Selection"), NULL, NULL,
254
N_("_Mask to Selection"), NULL,
255
N_("Replace the selection with the layer mask"),
222
256
GIMP_CHANNEL_OP_REPLACE, FALSE,
223
257
GIMP_HELP_LAYER_MASK_SELECTION_REPLACE },
225
259
{ "layers-mask-selection-add", GIMP_STOCK_SELECTION_ADD,
226
N_("_Add to Selection"), NULL, NULL,
260
N_("_Add to Selection"), NULL,
261
N_("Add the layer mask to the current selection"),
227
262
GIMP_CHANNEL_OP_ADD, FALSE,
228
263
GIMP_HELP_LAYER_MASK_SELECTION_ADD },
230
265
{ "layers-mask-selection-subtract", GIMP_STOCK_SELECTION_SUBTRACT,
231
N_("_Subtract from Selection"), NULL, NULL,
266
N_("_Subtract from Selection"), NULL,
267
N_("Subtract the layer mask from the current selection"),
232
268
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
233
269
GIMP_HELP_LAYER_MASK_SELECTION_SUBTRACT },
235
271
{ "layers-mask-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT,
236
N_("_Intersect with Selection"), NULL, NULL,
272
N_("_Intersect with Selection"), NULL,
273
N_("Intersect the layer mask with the current selection"),
237
274
GIMP_CHANNEL_OP_INTERSECT, FALSE,
238
275
GIMP_HELP_LAYER_MASK_SELECTION_INTERSECT }
241
static GimpEnumActionEntry layers_alpha_to_selection_actions[] =
278
static const GimpEnumActionEntry layers_alpha_to_selection_actions[] =
243
280
{ "layers-alpha-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
244
N_("Al_pha to Selection"), NULL, NULL,
281
N_("Al_pha to Selection"), NULL,
282
N_("Replace the selection with the layer's alpha channel"),
245
283
GIMP_CHANNEL_OP_REPLACE, FALSE,
246
284
GIMP_HELP_LAYER_ALPHA_SELECTION_REPLACE },
248
286
{ "layers-alpha-selection-add", GIMP_STOCK_SELECTION_ADD,
249
N_("A_dd to Selection"), NULL, NULL,
287
N_("A_dd to Selection"), NULL,
288
N_("Add the layer's alpha channel to the current selection"),
250
289
GIMP_CHANNEL_OP_ADD, FALSE,
251
290
GIMP_HELP_LAYER_ALPHA_SELECTION_ADD },
253
292
{ "layers-alpha-selection-subtract", GIMP_STOCK_SELECTION_SUBTRACT,
254
N_("_Subtract from Selection"), NULL, NULL,
293
N_("_Subtract from Selection"), NULL,
294
N_("Subtract the layer's alpha channel from the current selection"),
255
295
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
256
296
GIMP_HELP_LAYER_ALPHA_SELECTION_SUBTRACT },
258
298
{ "layers-alpha-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT,
259
N_("_Intersect with Selection"), NULL, NULL,
299
N_("_Intersect with Selection"), NULL,
300
N_("Intersect the layer's alpha channel with the current selection"),
260
301
GIMP_CHANNEL_OP_INTERSECT, FALSE,
261
302
GIMP_HELP_LAYER_ALPHA_SELECTION_INTERSECT }
264
static GimpEnumActionEntry layers_select_actions[] =
305
static const GimpEnumActionEntry layers_text_to_selection_actions[] =
307
{ "layers-text-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
308
N_("_Text to Selection"), NULL,
309
N_("Replace the selection with the text layer's outline"),
310
GIMP_CHANNEL_OP_REPLACE, FALSE,
311
GIMP_HELP_LAYER_TEXT_SELECTION_REPLACE },
313
{ "layers-text-selection-add", GIMP_STOCK_SELECTION_ADD,
314
N_("A_dd to Selection"), NULL,
315
N_("Add the text layer's outline to the current selection"),
316
GIMP_CHANNEL_OP_ADD, FALSE,
317
GIMP_HELP_LAYER_TEXT_SELECTION_ADD },
319
{ "layers-text-selection-subtract", GIMP_STOCK_SELECTION_SUBTRACT,
320
N_("_Subtract from Selection"), NULL,
321
N_("Subtract the text layer's outline from the current selection"),
322
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
323
GIMP_HELP_LAYER_TEXT_SELECTION_SUBTRACT },
325
{ "layers-text-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT,
326
N_("_Intersect with Selection"), NULL,
327
N_("Intersect the text layer's outline with the current selection"),
328
GIMP_CHANNEL_OP_INTERSECT, FALSE,
329
GIMP_HELP_LAYER_TEXT_SELECTION_INTERSECT }
332
static const GimpEnumActionEntry layers_select_actions[] =
266
334
{ "layers-select-top", NULL,
267
N_("Select _Top Layer"), "Home", NULL,
335
N_("Select _Top Layer"), "Home",
336
N_("Select the topmost layer"),
268
337
GIMP_ACTION_SELECT_FIRST, FALSE,
269
338
GIMP_HELP_LAYER_TOP },
271
340
{ "layers-select-bottom", NULL,
272
N_("Select _Bottom Layer"), "End", NULL,
341
N_("Select _Bottom Layer"), "End",
342
N_("Select the bottommost layer"),
273
343
GIMP_ACTION_SELECT_LAST, FALSE,
274
344
GIMP_HELP_LAYER_BOTTOM },
276
346
{ "layers-select-previous", NULL,
277
N_("Select _Previous Layer"), "Prior", NULL,
347
N_("Select _Previous Layer"), "Prior",
348
N_("Select the layer above the current layer"),
278
349
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
279
350
GIMP_HELP_LAYER_PREVIOUS },
281
352
{ "layers-select-next", NULL,
282
N_("Select _Next Layer"), "Next", NULL,
353
N_("Select _Next Layer"), "Next",
354
N_("Select the layer below the current layer"),
283
355
GIMP_ACTION_SELECT_NEXT, FALSE,
284
356
GIMP_HELP_LAYER_NEXT }
287
static GimpEnumActionEntry layers_opacity_actions[] =
359
static const GimpEnumActionEntry layers_opacity_actions[] =
289
361
{ "layers-opacity-set", GIMP_STOCK_TRANSPARENCY,
290
362
N_("Set Opacity"), NULL, NULL,