files-view: Omit some menu sections on Network View

These actions do not make sense on the virtual files of that view.
This commit is contained in:
António Fernandes 2024-01-27 14:41:15 +00:00
parent 6d47c4c1f3
commit fcbfcd4c5d
2 changed files with 11 additions and 2 deletions

View file

@ -8269,6 +8269,15 @@ update_selection_menu (NautilusFilesView *view,
nautilus_g_menu_replace_string_in_item (G_MENU (object), i,
"hidden-when",
(!show_scripts) ? "action-missing" : NULL);
if (NAUTILUS_IS_NETWORK_VIEW (priv->list_base))
{
object = gtk_builder_get_object (builder, "move-copy-section");
g_menu_remove_all (G_MENU (object));
object = gtk_builder_get_object (builder, "file-actions-section");
g_menu_remove_all (G_MENU (object));
}
}
static void

View file

@ -165,7 +165,7 @@
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
<section>
<section id="move-copy-section">
<item>
<attribute name="label" translatable="yes">Cu_t</attribute>
<attribute name="action">view.cut</attribute>
@ -183,7 +183,7 @@
<attribute name="action">view.copy-to</attribute>
</item>
</section>
<section>
<section id="file-actions-section">
<item>
<attribute name="label" translatable="yes">Rena_me…</attribute>
<attribute name="action">view.rename</attribute>