diff options
author | Corey Berla <corey@berla.me> | 2023-01-20 10:15:41 -0800 |
---|---|---|
committer | Corey Berla <corey@berla.me> | 2023-04-07 20:36:32 -0700 |
commit | 06d2e5d6eb0f9e6c4605dc56c7d2f25ace60bed7 (patch) | |
tree | 9cc81676970411d9ae64d3baf0548f98c7d6461c | |
parent | baab8d3ad5168800b90e06b98070d250714d1b0e (diff) | |
download | nautilus-06d2e5d6eb0f9e6c4605dc56c7d2f25ace60bed7.tar.gz |
list-base: Don't notify selection-changed on every call to remove_file
In an effort to work around an issue where the floating status bar
displayed incorrect information upon deleting the last file in a folder,
6981ad8777f2fe6d50e8c9a66d274a324aef79cb implemented a hack where
nautilus_files_view_notify_selection_changed() was called on every
call to remove_file. This is unnecessary and wasteful. Instead, lets
simply call nautilus_files_view_display_selection_info() when checking
for the empty state.
Related: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2338
-rw-r--r-- | src/nautilus-files-view.c | 1 | ||||
-rw-r--r-- | src/nautilus-list-base.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index ca78f4bce..ac34619f2 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -3783,6 +3783,7 @@ real_check_empty_states (NautilusFilesView *view) } gtk_stack_set_visible_child (GTK_STACK (priv->stack), priv->empty_view_page); + nautilus_files_view_display_selection_info (view); } else { diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c index 8d16c682e..c91ca7554 100644 --- a/src/nautilus-list-base.c +++ b/src/nautilus-list-base.c @@ -1160,7 +1160,6 @@ real_remove_file (NautilusFilesView *files_view, if (item != NULL) { nautilus_view_model_remove_item (priv->model, item, directory); - nautilus_files_view_notify_selection_changed (files_view); } } |