app: get rid of dummy "*-menu" and "*-popup" actions.

With our old code, we needed dummy actions for every submenu. This is not needed
anymore. Actions are only for end menu items (items which actually do something,
not just open a submenu).
Get rid of them all, as well as the code to ignore any action ending with such
suffixes in action-listing pieces of code.
This commit is contained in:
Jehan 2023-04-20 15:29:36 +02:00
parent 8a8914bc21
commit c6906e77da
46 changed files with 2 additions and 438 deletions

View File

@ -37,13 +37,6 @@
#include "gimp-intl.h"
static const GimpActionEntry brush_editor_actions[] =
{
{ "brush-editor-popup", GIMP_ICON_BRUSH,
NC_("brush-editor-action", "Brush Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_BRUSH_EDITOR_DIALOG }
};
static const GimpToggleActionEntry brush_editor_toggle_actions[] =
{
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
@ -57,10 +50,6 @@ static const GimpToggleActionEntry brush_editor_toggle_actions[] =
void
brush_editor_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "brush-editor-action",
brush_editor_actions,
G_N_ELEMENTS (brush_editor_actions));
gimp_action_group_add_toggle_actions (group, "brush-editor-action",
brush_editor_toggle_actions,
G_N_ELEMENTS (brush_editor_toggle_actions));

View File

@ -39,10 +39,6 @@
static const GimpActionEntry brushes_actions[] =
{
{ "brushes-popup", GIMP_ICON_BRUSH,
NC_("brushes-action", "Brushes Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_BRUSH_DIALOG },
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
NC_("brushes-action", "_Open Brush as Image"), NULL, { NULL },
NC_("brushes-action", "Open brush as image"),

View File

@ -38,10 +38,6 @@
static const GimpActionEntry buffers_actions[] =
{
{ "buffers-popup", GIMP_ICON_BUFFER,
NC_("buffers-action", "Buffers Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_BUFFER_DIALOG },
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
NC_("buffers-action", "Paste Buffer as _New Image"), NULL, { NULL },
NC_("buffers-action", "Paste the selected buffer as a new image"),

View File

@ -41,14 +41,6 @@
static const GimpActionEntry channels_actions[] =
{
{ "channels-popup", GIMP_ICON_DIALOG_CHANNELS,
NC_("channels-action", "Channels Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_CHANNEL_DIALOG },
{ "channels-color-tag-menu", NULL,
NC_("channels-action", "Color Tag"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-edit-attributes", GIMP_ICON_EDIT,
NC_("channels-action", "_Edit Channel Attributes..."), NULL, { NULL },
NC_("channels-action", "Edit the channel's name, color and opacity"),

View File

@ -41,10 +41,6 @@
static const GimpActionEntry colormap_actions[] =
{
{ "colormap-popup", GIMP_ICON_COLORMAP,
NC_("colormap-action", "Colormap Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_INDEXED_PALETTE_DIALOG },
{ "colormap-edit-color", GIMP_ICON_EDIT,
NC_("colormap-action", "_Edit Color..."), NULL, { NULL },
NC_("colormap-action", "Edit this color"),

View File

@ -43,40 +43,6 @@
static const GimpActionEntry context_actions[] =
{
{ "context-menu", NULL, NC_("context-action",
"_Context") },
{ "context-colors-menu", GIMP_ICON_COLORS_DEFAULT, NC_("context-action",
"_Colors") },
{ "context-opacity-menu", GIMP_ICON_TRANSPARENCY, NC_("context-action",
"_Opacity") },
{ "context-paint-mode-menu", GIMP_ICON_TOOL_PENCIL, NC_("context-action",
"Paint _Mode") },
{ "context-tool-menu", GIMP_ICON_DIALOG_TOOLS, NC_("context-action",
"_Tool") },
{ "context-brush-menu", GIMP_ICON_BRUSH, NC_("context-action",
"_Brush") },
{ "context-pattern-menu", GIMP_ICON_PATTERN, NC_("context-action",
"_Pattern") },
{ "context-palette-menu", GIMP_ICON_PALETTE, NC_("context-action",
"_Palette") },
{ "context-gradient-menu", GIMP_ICON_GRADIENT, NC_("context-action",
"_Gradient") },
{ "context-font-menu", GIMP_ICON_FONT, NC_("context-action",
"_Font") },
{ "context-brush-shape-menu", NULL, NC_("context-action",
"_Shape") },
{ "context-brush-radius-menu", NULL, NC_("context-action",
"_Radius") },
{ "context-brush-spikes-menu", NULL, NC_("context-action",
"S_pikes") },
{ "context-brush-hardness-menu", NULL, NC_("context-action",
"_Hardness") },
{ "context-brush-aspect-menu", NULL, NC_("context-action",
"_Aspect Ratio")},
{ "context-brush-angle-menu", NULL, NC_("context-action",
"A_ngle") },
{ "context-colors-default", GIMP_ICON_COLORS_DEFAULT,
NC_("context-action", "_Default Colors"), NULL, { "D", NULL },
NC_("context-action",

View File

@ -35,13 +35,6 @@
#include "gimp-intl.h"
static const GimpActionEntry cursor_info_actions[] =
{
{ "cursor-info-popup", GIMP_ICON_CURSOR,
NC_("cursor-info-action", "Pointer Information Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_POINTER_INFO_DIALOG }
};
static const GimpToggleActionEntry cursor_info_toggle_actions[] =
{
{ "cursor-info-sample-merged", NULL,
@ -56,10 +49,6 @@ static const GimpToggleActionEntry cursor_info_toggle_actions[] =
void
cursor_info_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "cursor-info-action",
cursor_info_actions,
G_N_ELEMENTS (cursor_info_actions));
gimp_action_group_add_toggle_actions (group, "cursor-info-action",
cursor_info_toggle_actions,
G_N_ELEMENTS (cursor_info_toggle_actions));

View File

@ -36,10 +36,6 @@
static const GimpActionEntry dashboard_actions[] =
{
{ "dashboard-popup", GIMP_ICON_DIALOG_DASHBOARD,
NC_("dashboard-action", "Dashboard Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_DASHBOARD_DIALOG },
{ "dashboard-groups", NULL,
NC_("dashboard-action", "_Groups") },
{ "dashboard-update-interval", NULL,

View File

@ -34,8 +34,6 @@
static const GimpActionEntry debug_actions[] =
{
{ "debug-menu", NULL, "_Debug" },
{ "debug-gtk-inspector", NULL,
"Start _GtkInspector", NULL, { NULL }, NULL,
debug_gtk_inspector_cmd_callback,

View File

@ -141,10 +141,8 @@ debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
GimpAction *action = action_it->data;
const gchar *name = gimp_action_get_name (action);
if (strstr (name, "-menu") ||
strstr (name, "-popup") ||
name[0] == '<')
continue;
if (name[0] == '<')
continue;
accels = gimp_action_get_display_accels (action);

View File

@ -42,10 +42,6 @@
static const GimpActionEntry dock_actions[] =
{
{ "dock-move-to-screen-menu", GIMP_ICON_WINDOW_MOVE_TO_SCREEN,
NC_("dock-action", "M_ove to Screen"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_DOCK_CHANGE_SCREEN },
{ "dock-close", GIMP_ICON_WINDOW_CLOSE,
NC_("dock-action", "Close Dock"), NULL, { NULL }, NULL,
window_close_cmd_callback,

View File

@ -45,18 +45,6 @@
static const GimpActionEntry dockable_actions[] =
{
{ "dockable-popup", NULL,
NC_("dockable-action", "Dialogs Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_DOCK },
{ "dockable-menu", "image-missing", "" },
{ "dockable-add-tab-menu", NULL, NC_("dockable-action",
"_Add Tab") },
{ "dockable-preview-size-menu", NULL, NC_("dockable-action",
"_Preview Size") },
{ "dockable-tab-style-menu", NULL, NC_("dockable-action",
"_Tab Style") },
{ "dockable-close-tab", "window-close",
NC_("dockable-action", "_Close Tab"), NULL, { NULL }, NULL,
dockable_close_tab_cmd_callback,
@ -288,8 +276,6 @@ dockable_actions_update (GimpActionGroup *group,
SET_ACTIVE ("dockable-lock-tab", locked);
SET_VISIBLE ("dockable-preview-size-menu", view_size != -1);
if (view_size != -1)
{
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)

View File

@ -38,10 +38,6 @@
static const GimpActionEntry documents_actions[] =
{
{ "documents-popup", GIMP_ICON_DOCUMENT_OPEN_RECENT,
NC_("documents-action", "Documents Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_DOCUMENT_DIALOG },
{ "documents-open", GIMP_ICON_DOCUMENT_OPEN,
NC_("documents-action", "_Open Image"), NULL, { NULL },
NC_("documents-action", "Open the selected entry"),

View File

@ -39,10 +39,6 @@
static const GimpActionEntry dynamics_actions[] =
{
{ "dynamics-popup", GIMP_ICON_DYNAMICS,
NC_("dynamics-action", "Paint Dynamics Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_DYNAMICS_DIALOG },
{ "dynamics-new", GIMP_ICON_DOCUMENT_NEW,
NC_("dynamics-action", "_New Dynamics"), NULL, { NULL },
NC_("dynamics-action", "Create a new dynamics"),

View File

@ -37,14 +37,6 @@
#include "gimp-intl.h"
static const GimpActionEntry dynamics_editor_actions[] =
{
{ "dynamics-editor-popup", GIMP_ICON_DYNAMICS,
NC_("dynamics-editor-action", "Paint Dynamics Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_BRUSH_EDITOR_DIALOG }
};
static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
{
{ "dynamics-editor-edit-active", GIMP_ICON_LINKED,
@ -58,10 +50,6 @@ static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
void
dynamics_editor_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "dynamics-editor-action",
dynamics_editor_actions,
G_N_ELEMENTS (dynamics_editor_actions));
gimp_action_group_add_toggle_actions (group, "dynamics-editor-action",
dynamics_editor_toggle_actions,
G_N_ELEMENTS (dynamics_editor_toggle_actions));

View File

@ -62,14 +62,6 @@ static void edit_actions_pattern_changed (GimpContext *context,
static const GimpActionEntry edit_actions[] =
{
{ "edit-menu", NULL, NC_("edit-action", "_Edit") },
{ "edit-paste-as-menu", NULL, NC_("edit-action", "Paste _as") },
{ "edit-buffer-menu", NULL, NC_("edit-action", "_Buffer") },
{ "undo-popup",
"edit-undo", NC_("edit-action", "Undo History Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_UNDO_DIALOG },
{ "edit-undo", GIMP_ICON_EDIT_UNDO,
NC_("edit-action", "_Undo"), NULL, { "<primary>Z", NULL },
NC_("edit-action", "Undo the last operation"),

View File

@ -36,10 +36,6 @@
static const GimpActionEntry error_console_actions[] =
{
{ "error-console-popup", GIMP_ICON_DIALOG_WARNING,
NC_("error-console-action", "Error Console Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_ERRORS_DIALOG },
{ "error-console-clear", GIMP_ICON_EDIT_CLEAR,
NC_("error-console-action", "_Clear"), NULL, { NULL },
NC_("error-console-action", "Clear error console"),

View File

@ -69,10 +69,6 @@ static gchar * file_actions_create_label (const gchar *format,
static const GimpActionEntry file_actions[] =
{
{ "file-menu", NULL, NC_("file-action", "_File") },
{ "file-create-menu", NULL, NC_("file-action", "Crea_te") },
{ "file-open-recent-menu", NULL, NC_("file-action", "Open _Recent") },
{ "file-open", GIMP_ICON_IMAGE_OPEN,
NC_("file-action", "_Open..."), NULL, { "<primary>O", NULL },
NC_("file-action", "Open an image file"),

View File

@ -53,56 +53,6 @@ static void filters_actions_history_changed (Gimp *gimp
/* private variables */
static const GimpActionEntry filters_menu_actions[] =
{
{ "filters-menu", NULL, NC_("filters-action",
"Filte_rs") },
{ "filters-recent-menu", NULL, NC_("filters-action",
"Recently _Used") },
{ "filters-blur-menu", NULL, NC_("filters-action",
"_Blur") },
{ "filters-noise-menu", NULL, NC_("filters-action",
"_Noise") },
{ "filters-edge-detect-menu", NULL, NC_("filters-action",
"Edge-De_tect") },
{ "filters-enhance-menu", NULL, NC_("filters-action",
"En_hance") },
{ "filters-combine-menu", NULL, NC_("filters-action",
"C_ombine") },
{ "filters-generic-menu", NULL, NC_("filters-action",
"_Generic") },
{ "filters-light-shadow-menu", NULL, NC_("filters-action",
"_Light and Shadow") },
{ "filters-distorts-menu", NULL, NC_("filters-action",
"_Distorts") },
{ "filters-artistic-menu", NULL, NC_("filters-action",
"_Artistic") },
{ "filters-decor-menu", NULL, NC_("filters-action",
"_Decor") },
{ "filters-map-menu", NULL, NC_("filters-action",
/* TRANSLATORS: menu group
* containing mapping
* filters.
*/
"_Map") },
{ "filters-render-menu", NULL, NC_("filters-action",
"_Render") },
{ "filters-render-clouds-menu", NULL, NC_("filters-action",
"_Clouds") },
{ "filters-render-fractals-menu", NULL, NC_("filters-action",
"_Fractals") },
{ "filters-render-nature-menu", NULL, NC_("filters-action",
"_Nature") },
{ "filters-render-noise-menu", NULL, NC_("filters-action",
"N_oise") },
{ "filters-render-pattern-menu", NULL, NC_("filters-action",
"_Pattern") },
{ "filters-web-menu", NULL, NC_("filters-action",
"_Web") },
{ "filters-animation-menu", NULL, NC_("filters-action",
"An_imation") }
};
static const GimpStringActionEntry filters_actions[] =
{
{ "filters-antialias", GIMP_ICON_GEGL,
@ -798,10 +748,6 @@ filters_actions_setup (GimpActionGroup *group)
gint n_entries;
gint i;
gimp_action_group_add_actions (group, "filters-action",
filters_menu_actions,
G_N_ELEMENTS (filters_menu_actions));
gimp_action_group_add_string_actions (group, "filters-action",
filters_actions,
G_N_ELEMENTS (filters_actions),

View File

@ -40,10 +40,6 @@
static const GimpActionEntry fonts_actions[] =
{
{ "fonts-popup", GIMP_ICON_FONT,
NC_("fonts-action", "Fonts Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_FONT_DIALOG },
{ "fonts-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("fonts-action", "_Rescan Font List"), NULL, { NULL },
NC_("fonts-action", "Rescan the installed fonts"),

View File

@ -43,10 +43,6 @@
static const GimpActionEntry gradient_editor_actions[] =
{
{ "gradient-editor-popup", GIMP_ICON_GRADIENT,
NC_("gradient-editor-action", "Gradient Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_GRADIENT_EDITOR_DIALOG },
{ "gradient-editor-left-color-type", NULL,
NC_("gradient-editor-action", "Left Color Type") },
{ "gradient-editor-load-left-color", GIMP_ICON_DOCUMENT_REVERT,

View File

@ -40,10 +40,6 @@
static const GimpActionEntry gradients_actions[] =
{
{ "gradients-popup", GIMP_ICON_GRADIENT,
NC_("gradients-action", "Gradients Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_GRADIENT_DIALOG },
{ "gradients-new", GIMP_ICON_DOCUMENT_NEW,
NC_("gradients-action", "_New Gradient"), NULL, { NULL },
NC_("gradients-action", "Create a new gradient"),

View File

@ -35,8 +35,6 @@
static const GimpActionEntry help_actions[] =
{
{ "help-menu", NULL, NC_("help-action", "_Help") },
{ "help-help", "gimp-prefs-help-system",
NC_("help-action", "_Help"), NULL, { "F1", NULL },
NC_("help-action", "Open the GIMP user manual"),

View File

@ -51,31 +51,6 @@
static const GimpActionEntry image_actions[] =
{
{ "image-menubar", NULL,
NC_("image-action", "Image Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_IMAGE_WINDOW },
{ "image-popup", NULL,
NC_("image-action", "Image Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_IMAGE_WINDOW },
{ "image-menu", NULL, NC_("image-action", "_Image") },
{ "image-mode-menu", NULL, NC_("image-action", "_Mode") },
{ "image-precision-menu", NULL, NC_("image-action", "_Encoding") },
{ "image-color-management-menu", NULL, NC_("image-action",
"Color Ma_nagement") },
{ "image-transform-menu", NULL, NC_("image-action", "_Transform") },
{ "image-guides-menu", NULL, NC_("image-action", "_Guides") },
{ "image-metadata-menu", NULL, NC_("image-action", "Meta_data") },
{ "colors-menu", NULL, NC_("image-action", "_Colors") },
{ "colors-info-menu", NULL, NC_("image-action", "I_nfo") },
{ "colors-auto-menu", NULL, NC_("image-action", "_Auto") },
{ "colors-map-menu", NULL, NC_("image-action", "_Map") },
{ "colors-tone-mapping-menu", NULL, NC_("image-action", "_Tone Mapping") },
{ "colors-components-menu", NULL, NC_("image-action", "C_omponents") },
{ "colors-desaturate-menu", NULL, NC_("image-action", "D_esaturate") },
{ "image-new", GIMP_ICON_DOCUMENT_NEW,
NC_("image-action", "_New..."), NULL, { "<primary>N", NULL },
NC_("image-action", "Create a new image"),
@ -118,9 +93,6 @@ static const GimpActionEntry image_actions[] =
image_color_profile_save_cmd_callback,
GIMP_HELP_IMAGE_COLOR_PROFILE_SAVE },
{ "image-softproof-intent-menu", NULL,
NC_("image-action", "Soft-Proofing Re_ndering Intent") },
{ "image-resize", GIMP_ICON_OBJECT_RESIZE,
NC_("image-action", "Can_vas Size..."), NULL, { NULL },
NC_("image-action", "Adjust the image dimensions"),

View File

@ -39,10 +39,6 @@
static const GimpActionEntry images_actions[] =
{
{ "images-popup", GIMP_ICON_DIALOG_IMAGES,
NC_("images-action", "Images Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_IMAGE_DIALOG },
{ "images-raise-views", GIMP_ICON_GO_TOP,
NC_("images-action", "_Raise Views"), NULL, { NULL },
NC_("images-action", "Raise this image's displays"),

View File

@ -119,8 +119,6 @@ items_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
g_snprintf (action, sizeof (action), "%s-visible", prefix);
SET_SENSITIVE (action, items);
@ -134,9 +132,6 @@ items_actions_update (GimpActionGroup *group,
SET_SENSITIVE (action, can_lock_position);
SET_ACTIVE (action, lock_position);
g_snprintf (action, sizeof (action), "%s-color-tag-menu", prefix);
SET_COLOR (action, has_color_tag ? &tag_color : NULL);
enum_class = g_type_class_ref (GIMP_TYPE_COLOR_TAG);
for (value = enum_class->values; value->value_name; value++)
@ -151,5 +146,4 @@ items_actions_update (GimpActionGroup *group,
#undef SET_SENSITIVE
#undef SET_ACTIVE
#undef SET_COLOR
}

View File

@ -48,43 +48,6 @@
static const GimpActionEntry layers_actions[] =
{
{ "layers-popup", GIMP_ICON_DIALOG_LAYERS,
NC_("layers-action", "Layers Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_LAYER_DIALOG },
{ "layers-blend-space-menu", NULL,
NC_("layers-action", "Blend Space"), NULL, { NULL }, NULL, NULL,
NULL },
{ "layers-composite-space-menu", NULL,
NC_("layers-action", "Composite Space"), NULL, { NULL }, NULL, NULL,
NULL },
{ "layers-composite-mode-menu", NULL,
NC_("layers-action", "Composite Mode"), NULL, { NULL }, NULL, NULL,
NULL },
{ "layers-color-tag-menu", NULL,
NC_("layers-action", "Color Tag"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-menu", NULL,
NC_("layers-action", "_Layer") },
{ "layers-stack-menu", NULL,
NC_("layers-action", "Stac_k") },
{ "layers-mask-menu", NULL,
NC_("layers-action", "_Mask") },
{ "layers-transparency-menu", NULL,
NC_("layers-action", "Tr_ansparency") },
{ "layers-transform-menu", NULL,
NC_("layers-action", "_Transform") },
{ "layers-properties-menu", GIMP_ICON_DOCUMENT_PROPERTIES,
NC_("layers-action", "_Properties") },
{ "layers-opacity-menu", GIMP_ICON_TRANSPARENCY,
NC_("layers-action", "_Opacity") },
{ "layers-mode-menu", GIMP_ICON_TOOL_PENCIL,
NC_("layers-action", "Layer _Mode") },
{ "layers-edit", GIMP_ICON_EDIT,
NC_("layers-action", "Default Edit Action"), NULL, { NULL },
NC_("layers-action", "Activate the default edit action for this type of layer"),

View File

@ -39,10 +39,6 @@
static const GimpActionEntry mypaint_brushes_actions[] =
{
{ "mypaint-brushes-popup", GIMP_ICON_MYPAINT_BRUSH,
NC_("mypaint-brushes-action", "MyPaint Brushes Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_MYPAINT_BRUSH_DIALOG },
{ "mypaint-brushes-new", GIMP_ICON_DOCUMENT_NEW,
NC_("mypaint-brushes-action", "_New MyPaint Brush"), NULL, { NULL },
NC_("mypaint-brushes-action", "Create a new MyPaint brush"),

View File

@ -40,10 +40,6 @@
static const GimpActionEntry palette_editor_actions[] =
{
{ "palette-editor-popup", GIMP_ICON_PALETTE,
NC_("palette-editor-action", "Palette Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_PALETTE_EDITOR_DIALOG },
{ "palette-editor-edit-color", GIMP_ICON_EDIT,
NC_("palette-editor-action", "_Edit Color..."), NULL, { NULL },
NC_("palette-editor-action", "Edit this entry"),

View File

@ -40,10 +40,6 @@
static const GimpActionEntry palettes_actions[] =
{
{ "palettes-popup", GIMP_ICON_PALETTE,
NC_("palettes-action", "Palettes Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_PALETTE_DIALOG },
{ "palettes-new", GIMP_ICON_DOCUMENT_NEW,
NC_("palettes-action", "_New Palette"), NULL, { NULL },
NC_("palettes-action", "Create a new palette"),

View File

@ -39,10 +39,6 @@
static const GimpActionEntry patterns_actions[] =
{
{ "patterns-popup", GIMP_ICON_PATTERN,
NC_("patterns-action", "Patterns Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_PATTERN_DIALOG },
{ "patterns-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
NC_("patterns-action", "_Open Pattern as Image"), NULL, { NULL },
NC_("patterns-action", "Open this pattern as an image"),

View File

@ -39,10 +39,6 @@
static const GimpActionEntry quick_mask_actions[] =
{
{ "quick-mask-popup", NULL,
NC_("quick-mask-action", "Quick Mask Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_QUICK_MASK },
{ "quick-mask-configure", NULL,
NC_("quick-mask-action", "_Configure Color and Opacity..."), NULL, { NULL }, NULL,
quick_mask_configure_cmd_callback,

View File

@ -34,13 +34,6 @@
#include "gimp-intl.h"
static const GimpActionEntry sample_points_actions[] =
{
{ "sample-points-popup", GIMP_ICON_SAMPLE_POINT,
NC_("sample-points-action", "Sample Point Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_SAMPLE_POINT_DIALOG }
};
static const GimpToggleActionEntry sample_points_toggle_actions[] =
{
{ "sample-points-sample-merged", NULL,
@ -56,10 +49,6 @@ static const GimpToggleActionEntry sample_points_toggle_actions[] =
void
sample_points_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "sample-points-action",
sample_points_actions,
G_N_ELEMENTS (sample_points_actions));
gimp_action_group_add_toggle_actions (group, "sample-points-action",
sample_points_toggle_actions,
G_N_ELEMENTS (sample_points_toggle_actions));

View File

@ -40,12 +40,6 @@
static const GimpActionEntry select_actions[] =
{
{ "selection-popup", GIMP_ICON_SELECTION,
NC_("select-action", "Selection Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_SELECTION_DIALOG },
{ "select-menu", NULL, NC_("select-action", "_Select") },
{ "select-all", GIMP_ICON_SELECTION_ALL,
NC_("select-action", "_All"), NULL, { "<primary>A", NULL },
NC_("select-action", "Select everything"),

View File

@ -38,10 +38,6 @@
static const GimpActionEntry templates_actions[] =
{
{ "templates-popup", GIMP_ICON_TEMPLATE,
NC_("templates-action", "Templates Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TEMPLATE_DIALOG },
{ "templates-create-image", GIMP_ICON_IMAGE,
NC_("templates-action", "_Create Image from Template"), NULL, { NULL },
NC_("templates-action", "Create a new image from the selected template"),

View File

@ -46,10 +46,6 @@
static const GimpActionEntry text_tool_actions[] =
{
{ "text-tool-popup", NULL,
NC_("text-tool-action", "Text Tool Menu"), NULL, { NULL }, NULL, NULL,
NULL },
{ "text-tool-cut", GIMP_ICON_EDIT_CUT,
NC_("text-tool-action", "Cu_t"), NULL, { "<primary>X", NULL }, NULL,
text_tool_cut_cmd_callback,

View File

@ -54,26 +54,6 @@ static void tool_options_actions_update_presets (GimpActionGroup *group,
static const GimpActionEntry tool_options_actions[] =
{
{ "tool-options-popup", GIMP_ICON_DIALOG_TOOL_OPTIONS,
NC_("tool-options-action", "Tool Options Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_OPTIONS_DIALOG },
{ "tool-options-save-preset-menu", GIMP_ICON_DOCUMENT_SAVE,
NC_("tool-options-action", "_Save Tool Preset"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_OPTIONS_SAVE },
{ "tool-options-restore-preset-menu", GIMP_ICON_DOCUMENT_REVERT,
NC_("tool-options-action", "_Restore Tool Preset"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_OPTIONS_RESTORE },
{ "tool-options-edit-preset-menu", GIMP_ICON_EDIT,
NC_("tool-options-action", "E_dit Tool Preset"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_OPTIONS_EDIT },
{ "tool-options-delete-preset-menu", GIMP_ICON_EDIT_DELETE,
NC_("tool-options-action", "_Delete Tool Preset"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_OPTIONS_DELETE },
{ "tool-options-save-new-preset", GIMP_ICON_DOCUMENT_NEW,
NC_("tool-options-action", "_New Tool Preset..."), NULL, { NULL }, NULL,
tool_options_save_new_preset_cmd_callback,
@ -108,10 +88,6 @@ tool_options_actions_setup (GimpActionGroup *group)
gimp_action_group_add_actions (group, "tool-options-action",
tool_options_actions,
G_N_ELEMENTS (tool_options_actions));
SET_HIDE_EMPTY ("tool-options-restore-preset-menu", FALSE);
SET_HIDE_EMPTY ("tool-options-edit-preset-menu", FALSE);
SET_HIDE_EMPTY ("tool-options-delete-preset-menu", FALSE);
}
void
@ -121,11 +97,6 @@ tool_options_actions_update (GimpActionGroup *group,
GimpContext *context = gimp_get_user_context (group->gimp);
GimpToolInfo *tool_info = gimp_context_get_tool (context);
SET_VISIBLE ("tool-options-save-preset-menu", tool_info->presets);
SET_VISIBLE ("tool-options-restore-preset-menu", tool_info->presets);
SET_VISIBLE ("tool-options-edit-preset-menu", tool_info->presets);
SET_VISIBLE ("tool-options-delete-preset-menu", tool_info->presets);
tool_options_actions_update_presets (group, "tool-options-save-preset",
tool_options_save_preset_cmd_callback,
GIMP_HELP_TOOL_OPTIONS_SAVE,

View File

@ -40,10 +40,6 @@
static const GimpActionEntry tool_preset_editor_actions[] =
{
{ "tool-preset-editor-popup", GIMP_ICON_TOOL_PRESET,
NC_("tool-preset-editor-action", "Tool Preset Editor Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_PRESET_EDITOR_DIALOG },
{ "tool-preset-editor-save", GIMP_ICON_DOCUMENT_SAVE,
NC_("tool-preset-editor-action", "_Save Tool Options to Preset"), NULL, { NULL },
NC_("tool-preset-editor-action", "Save the active tool options to this "

View File

@ -42,10 +42,6 @@
static const GimpActionEntry tool_presets_actions[] =
{
{ "tool-presets-popup", GIMP_ICON_TOOL_PRESET,
NC_("tool-presets-action", "Tool Presets Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_TOOL_PRESET_DIALOG },
{ "tool-presets-new", GIMP_ICON_DOCUMENT_NEW,
NC_("tool-presets-action", "_New Tool Preset"), NULL, { NULL },
NC_("tool-presets-action", "Create a new tool preset"),

View File

@ -42,15 +42,6 @@
#include "gimp-intl.h"
static const GimpActionEntry tools_actions[] =
{
{ "tools-menu", NULL, NC_("tools-action", "_Tools") },
{ "tools-select-menu", NULL, NC_("tools-action", "_Selection Tools") },
{ "tools-paint-menu", NULL, NC_("tools-action", "_Paint Tools") },
{ "tools-transform-menu", NULL, NC_("tools-action", "_Transform Tools") },
{ "tools-color-menu", NULL, NC_("tools-action", "_Color Tools") },
};
static const GimpStringActionEntry tools_alternative_actions[] =
{
{ "tools-by-color-select-short", GIMP_ICON_TOOL_BY_COLOR_SELECT,
@ -662,10 +653,6 @@ tools_actions_setup (GimpActionGroup *group)
{
GList *list;
gimp_action_group_add_actions (group, "tools-action",
tools_actions,
G_N_ELEMENTS (tools_actions));
gimp_action_group_add_string_actions (group, "tools-action",
tools_alternative_actions,
G_N_ELEMENTS (tools_alternative_actions),

View File

@ -41,10 +41,6 @@
static const GimpActionEntry vector_toolpath_actions[] =
{
{ "vector-toolpath-popup", NULL,
NC_("vector-toolpath-action", "Vector Toolpath Menu"), NULL, { NULL }, NULL, NULL,
NULL },
{ "vector-toolpath-delete-anchor", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "_Delete Anchor"), NULL, { NULL }, NULL,
vector_toolpath_delete_anchor_cmd_callback,

View File

@ -42,14 +42,6 @@
static const GimpActionEntry vectors_actions[] =
{
{ "vectors-popup", GIMP_ICON_DIALOG_PATHS,
NC_("vectors-action", "Paths Menu"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_PATH_DIALOG },
{ "vectors-color-tag-menu", NULL,
NC_("vectors-action", "Color Tag"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-edit", GIMP_ICON_TOOL_PATH,
NC_("vectors-action", "Edit Pa_th"), NULL, { NULL },
NC_("vectors-action", "Edit the active path"),

View File

@ -67,21 +67,6 @@ static void view_actions_check_type_notify (GimpDisplayConfig *config,
static const GimpActionEntry view_actions[] =
{
{ "view-menu", NULL, NC_("view-action", "_View") },
{ "view-zoom-menu", NULL, NC_("view-action", "_Zoom") },
{ "view-rotate-menu", NULL, NC_("view-action", "_Flip & Rotate") },
{ "view-padding-color-menu", NULL, NC_("view-action", "_Padding Color") },
{ "view-color-management-menu", NULL,
NC_("view-action", "_Color Management") },
{ "view-display-intent-menu", NULL,
NC_("view-action", "Display _Rendering Intent") },
{ "view-move-to-screen-menu", GIMP_ICON_WINDOW_MOVE_TO_SCREEN,
NC_("view-action", "Move to Screen"), NULL, { NULL }, NULL, NULL,
GIMP_HELP_VIEW_CHANGE_SCREEN },
{ "view-new", GIMP_ICON_WINDOW_NEW,
NC_("view-action", "_New View"), NULL, { NULL },
NC_("view-action", "Create another view on this image"),
@ -824,8 +809,6 @@ view_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, (condition) != 0)
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
SET_SENSITIVE ("view-new", image);
SET_SENSITIVE ("view-close", image);
@ -937,11 +920,6 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-snap-to-vectors", image);
SET_ACTIVE ("view-snap-to-vectors", display && options->snap_to_path);
if (display && options->padding_mode != GIMP_CANVAS_PADDING_MODE_DEFAULT)
SET_COLOR ("view-padding-color-menu", &options->padding_color);
else
SET_COLOR ("view-padding-color-menu", NULL);
SET_SENSITIVE ("view-padding-color-theme", image);
SET_SENSITIVE ("view-padding-color-light-check", image);
SET_SENSITIVE ("view-padding-color-dark-check", image);
@ -978,7 +956,6 @@ view_actions_update (GimpActionGroup *group,
#undef SET_ACTIVE
#undef SET_SENSITIVE
#undef SET_COLOR
}

View File

@ -127,10 +127,6 @@ window_actions_update (GimpActionGroup *group,
g_free (name);
}
name = g_strdup_printf ("%s-move-to-screen-menu", group_name);
SET_VISIBLE (name, show_menu);
g_free (name);
#undef SET_ACTIVE
#undef SET_VISIBLE
}

View File

@ -98,13 +98,6 @@ static void windows_actions_single_window_mode_notify (GimpDisplayConfig *confi
static const GimpActionEntry windows_actions[] =
{
{ "windows-menu", NULL, NC_("windows-action",
"_Windows") },
{ "windows-docks-menu", NULL, NC_("windows-action",
"_Recently Closed Docks") },
{ "windows-dialogs-menu", NULL, NC_("windows-action",
"_Dockable Dialogs") },
{ "windows-show-display-next", NULL,
NC_("windows-action", "Next Image"), NULL, { "<alt>Tab", "Forward", NULL },
NC_("windows-action", "Switch to the next image"),
@ -187,8 +180,6 @@ windows_actions_setup (GimpActionGroup *group)
NULL, 0,
windows_set_tabs_position_cmd_callback);
gimp_action_group_set_action_hide_empty (group, "windows-docks-menu", FALSE);
g_signal_connect_object (group->gimp->displays, "add",
G_CALLBACK (windows_actions_display_add),
group, 0);

View File

@ -714,12 +714,6 @@ gimp_action_name_compare (GimpAction *action1,
gboolean
gimp_action_is_gui_blacklisted (const gchar *action_name)
{
static const gchar *suffixes[] =
{
"-menu",
"-popup"
};
static const gchar *prefixes[] =
{
"<",
@ -756,12 +750,6 @@ gimp_action_is_gui_blacklisted (const gchar *action_name)
if (! (action_name && *action_name))
return TRUE;
for (i = 0; i < G_N_ELEMENTS (suffixes); i++)
{
if (g_str_has_suffix (action_name, suffixes[i]))
return TRUE;
}
for (i = 0; i < G_N_ELEMENTS (prefixes); i++)
{
if (g_str_has_prefix (action_name, prefixes[i]))