[nautilus/gnome-3-30] window-slot: Recreate trash bar for new files
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-30] window-slot: Recreate trash bar for new files
- Date: Wed, 21 Nov 2018 12:46:54 +0000 (UTC)
commit 05a9dbcc90379df749031c209171b4ad32bdf739
Author: Ernestas Kulik <ekulik redhat com>
Date: Sat Nov 17 09:22:04 2018 +0000
window-slot: Recreate trash bar for new files
Currently, the code only removes the bar when the trash monitor state
changes to empty, but should also create it when files are freshly
trashed.
Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/747
(cherry picked from commit 7d6586588295204e28ce1c84561fa94c21f1c53c)
src/nautilus-window-slot.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index f221d0c8e..787bb5b7d 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -174,6 +174,7 @@ static GMenu* real_get_extensions_background_menu (NautilusWindowSlot *self);
static void real_set_templates_menu (NautilusWindowSlot *self,
GMenu *menu);
static GMenu* real_get_templates_menu (NautilusWindowSlot *self);
+static void nautilus_window_slot_setup_extra_location_widgets (NautilusWindowSlot *self);
void
nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
@@ -2699,10 +2700,16 @@ trash_state_changed_cb (NautilusTrashMonitor *monitor,
directory = nautilus_directory_get (location);
- if (nautilus_directory_is_in_trash (directory) &&
- nautilus_trash_monitor_is_empty ())
+ if (nautilus_directory_is_in_trash (directory))
{
- nautilus_window_slot_remove_extra_location_widgets (user_data);
+ if (nautilus_trash_monitor_is_empty ())
+ {
+ nautilus_window_slot_remove_extra_location_widgets (user_data);
+ }
+ else
+ {
+ nautilus_window_slot_setup_extra_location_widgets (user_data);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]