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
This commit is contained in:
luisico 2021-05-04 09:51:10 +02:00
parent cd219c84f3
commit 79d7b2e598
2 changed files with 8 additions and 10 deletions

View file

@ -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);

View file

@ -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>