From 0d512085f3bbad33ae9077072fd03969fca64379 Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Sun, 25 Feb 2024 00:13:01 +0100 Subject: [PATCH] menus: move menus to submenus of tab menu Fixes #9883 There were menus that put their entries directly in the tab menu rather than in a submenu. This moves them to submenus to bring back GIMP 2.10 behavior. Stray entries added by scripts are also moved to the right submenu. --- menus/buffers-menu.ui | 24 ++++++++------ menus/colormap-menu.ui | 24 ++++++++------ menus/documents-menu.ui | 28 +++++++++------- menus/error-console-menu.ui | 24 ++++++++------ menus/fonts-menu.ui | 10 ++++-- menus/images-menu.ui | 10 ++++-- menus/mypaint-brushes-menu.ui | 16 ++++++---- menus/palettes-menu.ui | 6 ++-- menus/patterns-menu.ui | 32 +++++++++++-------- menus/templates-menu.ui | 18 +++++++---- plug-ins/common/colormap-remap.c | 2 +- plug-ins/python/gradients-save-as-css.py | 2 +- plug-ins/python/palette-offset.py | 2 +- plug-ins/python/palette-sort.py | 2 +- plug-ins/python/palette-to-gradient.py | 2 +- plug-ins/script-fu/scripts/font-map.scm | 2 +- .../script-fu/scripts/gradient-example.scm | 2 +- plug-ins/script-fu/scripts/mkbrush.scm | 8 ++--- plug-ins/script-fu/scripts/palette-export.scm | 2 +- 19 files changed, 126 insertions(+), 90 deletions(-) diff --git a/menus/buffers-menu.ui b/menus/buffers-menu.ui index 344087f4a2..0e793d4802 100644 --- a/menus/buffers-menu.ui +++ b/menus/buffers-menu.ui @@ -2,15 +2,19 @@ -
- buffers.buffers-paste - buffers.buffers-paste-in-place - buffers.buffers-paste-into - buffers.buffers-paste-into-in-place - buffers.buffers-paste-as-new-layer - buffers.buffers-paste-as-new-layer-in-place - buffers.buffers-paste-as-new-image - buffers.buffers-delete -
+ + Buffers Menu + +
+ buffers.buffers-paste + buffers.buffers-paste-in-place + buffers.buffers-paste-into + buffers.buffers-paste-into-in-place + buffers.buffers-paste-as-new-layer + buffers.buffers-paste-as-new-layer-in-place + buffers.buffers-paste-as-new-image + buffers.buffers-delete +
+
diff --git a/menus/colormap-menu.ui b/menus/colormap-menu.ui index 190c5611a9..faea81ca9e 100644 --- a/menus/colormap-menu.ui +++ b/menus/colormap-menu.ui @@ -2,15 +2,19 @@ - colormap.colormap-edit-color - colormap.colormap-delete-color - colormap.colormap-add-color-from-fg - colormap.colormap-add-color-from-bg -
- colormap.colormap-selection-replace - colormap.colormap-selection-add - colormap.colormap-selection-subtract - colormap.colormap-selection-intersect -
+ + Colormap Menu + + colormap.colormap-edit-color + colormap.colormap-delete-color + colormap.colormap-add-color-from-fg + colormap.colormap-add-color-from-bg +
+ colormap.colormap-selection-replace + colormap.colormap-selection-add + colormap.colormap-selection-subtract + colormap.colormap-selection-intersect +
+
diff --git a/menus/documents-menu.ui b/menus/documents-menu.ui index 9108d9d3f3..e284af7228 100644 --- a/menus/documents-menu.ui +++ b/menus/documents-menu.ui @@ -2,17 +2,21 @@ - documents.documents-open - documents.documents-raise-or-open - documents.documents-file-open-dialog - documents.documents-copy-location - documents.documents-show-in-file-manager - documents.documents-remove - documents.documents-clear -
- documents.documents-recreate-preview - documents.documents-reload-previews - documents.documents-remove-dangling -
+ + Documents Menu + + documents.documents-open + documents.documents-raise-or-open + documents.documents-file-open-dialog + documents.documents-copy-location + documents.documents-show-in-file-manager + documents.documents-remove + documents.documents-clear +
+ documents.documents-recreate-preview + documents.documents-reload-previews + documents.documents-remove-dangling +
+
diff --git a/menus/error-console-menu.ui b/menus/error-console-menu.ui index 953aee7480..4de036142e 100644 --- a/menus/error-console-menu.ui +++ b/menus/error-console-menu.ui @@ -2,17 +2,21 @@ - error-console.error-console-clear - error-console.error-console-select-all -
- error-console.error-console-save-all - error-console.error-console-save-selection -
- _Highlight - error-console.error-console-highlight-error - error-console.error-console-highlight-warning - error-console.error-console-highlight-info + Error Console Menu + + error-console.error-console-clear + error-console.error-console-select-all +
+ error-console.error-console-save-all + error-console.error-console-save-selection +
+ + _Highlight + error-console.error-console-highlight-error + error-console.error-console-highlight-warning + error-console.error-console-highlight-info +
diff --git a/menus/fonts-menu.ui b/menus/fonts-menu.ui index 3b58ccbc1f..1cfed3e560 100644 --- a/menus/fonts-menu.ui +++ b/menus/fonts-menu.ui @@ -2,8 +2,12 @@ -
- fonts.fonts-refresh -
+ + Fonts Menu + +
+ fonts.fonts-refresh +
+
diff --git a/menus/images-menu.ui b/menus/images-menu.ui index 8206d8eff8..53ffae7549 100644 --- a/menus/images-menu.ui +++ b/menus/images-menu.ui @@ -2,8 +2,12 @@ - images.images-raise-views - images.images-new-view - images.images-delete + + Images Menu + + images.images-raise-views + images.images-new-view + images.images-delete + diff --git a/menus/mypaint-brushes-menu.ui b/menus/mypaint-brushes-menu.ui index f8397176ef..75a66be19f 100644 --- a/menus/mypaint-brushes-menu.ui +++ b/menus/mypaint-brushes-menu.ui @@ -2,11 +2,15 @@ - mypaint-brushes.mypaint-brushes-copy-location - mypaint-brushes.mypaint-brushes-show-in-file-manager - mypaint-brushes.mypaint-brushes-delete -
- mypaint-brushes.mypaint-brushes-refresh -
+ + MyPaint Brushes Menu + + mypaint-brushes.mypaint-brushes-copy-location + mypaint-brushes.mypaint-brushes-show-in-file-manager + mypaint-brushes.mypaint-brushes-delete +
+ mypaint-brushes.mypaint-brushes-refresh +
+
diff --git a/menus/palettes-menu.ui b/menus/palettes-menu.ui index 526d23b0ce..e8113f588f 100644 --- a/menus/palettes-menu.ui +++ b/menus/palettes-menu.ui @@ -19,9 +19,9 @@
palettes.palettes-refresh
- - - Export as + + Export as + diff --git a/menus/patterns-menu.ui b/menus/patterns-menu.ui index dce4e9f8e3..b5eeb3dde7 100644 --- a/menus/patterns-menu.ui +++ b/menus/patterns-menu.ui @@ -2,21 +2,25 @@ - patterns.patterns-open-as-image + + Patterns Menu - + patterns.patterns-open-as-image - patterns.patterns-copy-location - patterns.patterns-show-in-file-manager - patterns.patterns-delete -
- patterns.patterns-refresh -
+ + + patterns.patterns-copy-location + patterns.patterns-show-in-file-manager + patterns.patterns-delete +
+ patterns.patterns-refresh +
+
diff --git a/menus/templates-menu.ui b/menus/templates-menu.ui index 8910f63bd0..c08dc8481b 100644 --- a/menus/templates-menu.ui +++ b/menus/templates-menu.ui @@ -2,12 +2,16 @@ - templates.templates-create-image -
- templates.templates-new - templates.templates-duplicate - templates.templates-edit - templates.templates-delete -
+ + Templates Menu + + templates.templates-create-image +
+ templates.templates-new + templates.templates-duplicate + templates.templates-edit + templates.templates-delete +
+
diff --git a/plug-ins/common/colormap-remap.c b/plug-ins/common/colormap-remap.c index ef1a9bc7da..9b81676938 100644 --- a/plug-ins/common/colormap-remap.c +++ b/plug-ins/common/colormap-remap.c @@ -186,7 +186,7 @@ remap_create_procedure (GimpPlugIn *plug_in, gimp_procedure_set_menu_label (procedure, _("R_earrange Colormap...")); gimp_procedure_set_icon_name (procedure, GIMP_ICON_COLORMAP); gimp_procedure_add_menu_path (procedure, "/Colors/Map/[Colormap]"); - gimp_procedure_add_menu_path (procedure, ""); + gimp_procedure_add_menu_path (procedure, "/Colormap Menu"); gimp_procedure_set_documentation (procedure, _("Rearrange the colormap"), diff --git a/plug-ins/python/gradients-save-as-css.py b/plug-ins/python/gradients-save-as-css.py index d41819fc6c..c78221f38b 100755 --- a/plug-ins/python/gradients-save-as-css.py +++ b/plug-ins/python/gradients-save-as-css.py @@ -218,7 +218,7 @@ class GradientsSaveAsCSS (Gimp.PlugIn): procedure.set_attribution("Joao S. O. Bueno", "(c) GPL V3.0 or later", "2011") - procedure.add_menu_path('') + procedure.add_menu_path('/Gradients Menu') procedure.add_argument_from_property(self, "run-mode") procedure.add_argument_from_property(self, "gradient") diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py index 0bb8dba087..a94fc0903e 100644 --- a/plug-ins/python/palette-offset.py +++ b/plug-ins/python/palette-offset.py @@ -102,7 +102,7 @@ class PaletteOffset (Gimp.PlugIn): procedure.add_argument_from_property(self, "palette") procedure.add_argument_from_property(self, "amount") procedure.add_return_value_from_property(self, "new-palette") - procedure.add_menu_path ('') + procedure.add_menu_path ('/Palettes Menu') else: procedure = None diff --git a/plug-ins/python/palette-sort.py b/plug-ins/python/palette-sort.py index 339241ea09..3574ad04f2 100755 --- a/plug-ins/python/palette-sort.py +++ b/plug-ins/python/palette-sort.py @@ -427,7 +427,7 @@ class PaletteSort (Gimp.PlugIn): procedure.set_attribution("João S. O. Bueno, Carol Spears, David Gowers", "João S. O. Bueno, Carol Spears, David Gowers", "2006-2014") - procedure.add_menu_path ('') + procedure.add_menu_path ('/Palettes Menu') procedure.add_argument_from_property(self, "run-mode") procedure.add_argument_from_property(self, "palette") diff --git a/plug-ins/python/palette-to-gradient.py b/plug-ins/python/palette-to-gradient.py index c140ad8847..4cb1fd56f0 100644 --- a/plug-ins/python/palette-to-gradient.py +++ b/plug-ins/python/palette-to-gradient.py @@ -183,7 +183,7 @@ class PaletteToGradient (Gimp.PlugIn): procedure.add_argument_from_property(self, "palette") procedure.add_return_value_from_property(self, "new-gradient") - procedure.add_menu_path ('') + procedure.add_menu_path ('/Palettes Menu') return procedure diff --git a/plug-ins/script-fu/scripts/font-map.scm b/plug-ins/script-fu/scripts/font-map.scm index fc918db2d7..00700db1d3 100644 --- a/plug-ins/script-fu/scripts/font-map.scm +++ b/plug-ins/script-fu/scripts/font-map.scm @@ -174,4 +174,4 @@ ) (script-fu-menu-register "script-fu-font-map" - "") + "/Fonts Menu") diff --git a/plug-ins/script-fu/scripts/gradient-example.scm b/plug-ins/script-fu/scripts/gradient-example.scm index d7638b26fd..4ed5f41240 100644 --- a/plug-ins/script-fu/scripts/gradient-example.scm +++ b/plug-ins/script-fu/scripts/gradient-example.scm @@ -78,4 +78,4 @@ ) (script-fu-menu-register "script-fu-gradient-example" - "") + "/Gradients Menu") diff --git a/plug-ins/script-fu/scripts/mkbrush.scm b/plug-ins/script-fu/scripts/mkbrush.scm index 84c970a25e..92fb2344ec 100644 --- a/plug-ins/script-fu/scripts/mkbrush.scm +++ b/plug-ins/script-fu/scripts/mkbrush.scm @@ -73,7 +73,7 @@ ) (script-fu-menu-register "script-fu-make-brush-rectangular" - "") + "/Brushes Menu") (define (script-fu-make-brush-rectangular-feathered name width height @@ -144,7 +144,7 @@ ) (script-fu-menu-register "script-fu-make-brush-rectangular-feathered" - "") + "/Brushes Menu") (define (script-fu-make-brush-elliptical name width height spacing) @@ -199,7 +199,7 @@ ) (script-fu-menu-register "script-fu-make-brush-elliptical" - "") + "/Brushes Menu") (define (script-fu-make-brush-elliptical-feathered name @@ -269,4 +269,4 @@ ) (script-fu-menu-register "script-fu-make-brush-elliptical-feathered" - "") + "/Brushes Menu") diff --git a/plug-ins/script-fu/scripts/palette-export.scm b/plug-ins/script-fu/scripts/palette-export.scm index c73418a6e6..bc46c0ea5b 100644 --- a/plug-ins/script-fu/scripts/palette-export.scm +++ b/plug-ins/script-fu/scripts/palette-export.scm @@ -228,7 +228,7 @@ (string-append "palette." file-type) ) (script-fu-menu-register (string-append "gimp-palette-export-" export-type) - "/Export as") + "/Palettes Menu/Export as") ) (define (bad-file-name)