window: Drop nautilus_window_reset_menus()

This is used by NautilusFilesView, which is a layer violation. But
it's also useless, because the only thing it does is sync the
start/reload actions, and that's already done by the slot calling
nautilus_window_sync_allow_stop() anyway in the same situations
(i.e. when view starts or ends loading).

Drop it, to prepare the view to be reusable in FileChooser dialogs.

Part of: https://gitlab.gnome.org/GNOME/nautilus/-/work_items/3402
This commit is contained in:
António Fernandes 2024-04-28 00:12:03 +01:00
parent 3efa7fa6e8
commit 0f52276179
3 changed files with 1 additions and 14 deletions

View file

@ -8471,12 +8471,9 @@ nautilus_files_view_reset_view_menu (NautilusFilesView *view)
void
nautilus_files_view_update_toolbar_menus (NautilusFilesView *view)
{
NautilusWindow *window;
NautilusFilesViewPrivate *priv;
g_assert (NAUTILUS_IS_FILES_VIEW (view));
priv = nautilus_files_view_get_instance_private (view);
NautilusFilesViewPrivate *priv = nautilus_files_view_get_instance_private (view);
/* Don't update after destroy (#349551),
* or if we are not active.
@ -8486,8 +8483,6 @@ nautilus_files_view_update_toolbar_menus (NautilusFilesView *view)
{
return;
}
window = nautilus_files_view_get_window (view);
nautilus_window_reset_menus (window);
nautilus_files_view_update_actions_state (view);
nautilus_files_view_reset_view_menu (view);

View file

@ -860,12 +860,6 @@ update_cursor (NautilusWindow *window)
}
}
void
nautilus_window_reset_menus (NautilusWindow *window)
{
nautilus_window_sync_allow_stop (window, nautilus_window_get_active_slot (window));
}
void
nautilus_window_sync_allow_stop (NautilusWindow *window,
NautilusWindowSlot *slot)

View file

@ -81,8 +81,6 @@ GList * nautilus_window_get_slots (NautilusWindow *wind
void nautilus_window_slot_close (NautilusWindow *window,
NautilusWindowSlot *slot);
void nautilus_window_reset_menus (NautilusWindow *window);
void nautilus_window_show_about_dialog (NautilusWindow *window);
/* sync window GUI with current slot. Used when changing slots,