[nautilus] files-view: Bring "Open with..." options together
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: Bring "Open with..." options together
- Date: Sun, 18 Jul 2021 17:52:54 +0000 (UTC)
commit 79d7b2e598a4ab27e68a595f5ca45c186c3514bd
Author: luisico <luisico gmail com>
Date: Tue May 4 09:51:10 2021 +0200
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
src/nautilus-files-view.c | 4 ++--
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>
@@ -76,13 +81,6 @@
<attribute name="hidden-when">action-disabled</attribute>
</item>
</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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]