diff options
author | luisico <luisico@gmail.com> | 2021-05-04 09:51:10 +0200 |
---|---|---|
committer | luisico <luisico@gmail.com> | 2021-07-18 17:52:31 +0200 |
commit | 79d7b2e598a4ab27e68a595f5ca45c186c3514bd (patch) | |
tree | ee4a6047c832b2d5466f918ce24dd6ab5e5ffa5b | |
parent | cd219c84f38deb7a8e3c51067cd37bb69aebc1c2 (diff) | |
download | nautilus-79d7b2e598a4ab27e68a595f5ca45c186c3514bd.tar.gz |
files-view: Bring "Open with..." options together
The right-click menu is arranged in a way in which "Open with default
application" and "Open With Other Application" are visually separated.
It's not comfortable for the user to need to scan the menu looking for
the "Open With Other Application" if the default option is not the
expected one.
This change just puts the two menu items under the same UI section, not
only bringing them visually together but also removing any line
separation between them since they can be considered to be part of the
same concept.
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1268
-rw-r--r-- | src/nautilus-files-view.c | 4 | ||||
-rw-r--r-- | src/resources/ui/nautilus-files-view-context-menus.ui | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index c8863bee6..b09883e55 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -8148,8 +8148,8 @@ update_selection_menu (NautilusFilesView *view, g_menu_item_set_icon (menu_item, app_icon); } - object = gtk_builder_get_object (builder, "open-with-default-application-section"); - g_menu_append_item (G_MENU (object), menu_item); + object = gtk_builder_get_object (builder, "open-with-application-section"); + g_menu_prepend_item (G_MENU (object), menu_item); g_free (item_label); g_object_unref (menu_item); diff --git a/src/resources/ui/nautilus-files-view-context-menus.ui b/src/resources/ui/nautilus-files-view-context-menus.ui index 27764c9a7..ac29451a7 100644 --- a/src/resources/ui/nautilus-files-view-context-menus.ui +++ b/src/resources/ui/nautilus-files-view-context-menus.ui @@ -44,7 +44,12 @@ <menu id="selection-menu"> <section id="new-folder-with-selection-section"> </section> - <section id="open-with-default-application-section"> + <section id="open-with-application-section"> + <item> + <attribute name="label" translatable="yes">Open With Other _Application</attribute> + <attribute name="action">view.open-with-other-application</attribute> + <attribute name="hidden-when">action-disabled</attribute> + </item> </section> <submenu> <attribute name="label" translatable="yes">_Scripts</attribute> @@ -78,13 +83,6 @@ </section> <section> <item> - <attribute name="label" translatable="yes">Open With Other _Application</attribute> - <attribute name="action">view.open-with-other-application</attribute> - <attribute name="hidden-when">action-disabled</attribute> - </item> - </section> - <section> - <item> <attribute name="label" translatable="yes">_Run as a Program</attribute> <attribute name="action">view.run-in-terminal</attribute> <attribute name="hidden-when">action-disabled</attribute> |