[nautilus] nautilus-window: only show notification in active window
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-window: only show notification in active window
- Date: Sun, 1 Mar 2015 14:31:46 +0000 (UTC)
commit 89ff8f721ceeb7c2d836467f38098053c5a9d220
Author: Carlos Soriano <csoriano gnome org>
Date: Sun Mar 1 15:29:43 2015 +0100
nautilus-window: only show notification in active window
So we don't show notification in all windows which can cause confusion
if another window is in a different directory.
src/nautilus-window.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index a340f0d..c1c909a 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1480,8 +1480,10 @@ nautilus_window_on_undo_changed (NautilusFileUndoManager *manager,
nautilus_file_undo_info_get_op_type (undo_info) == NAUTILUS_FILE_UNDO_OP_MOVE_TO_TRASH) {
files = nautilus_file_undo_info_trash_get_files (NAUTILUS_FILE_UNDO_INFO_TRASH (undo_info));
- /* Don't pop up a notification if user canceled the operation */
- if (g_list_length (files) > 0) {
+ /* Don't pop up a notification if user canceled the operation or the focus
+ * is not in the this window. This is an easy way to know from which window
+ * was the delete operation made */
+ if (g_list_length (files) > 0 && gtk_window_has_toplevel_focus (GTK_WINDOW (window))) {
notification = nautilus_notification_delete_new (window);
nautilus_notification_manager_add_notification (NAUTILUS_NOTIFICATION_MANAGER
(window->details->notification_manager),
GTK_WIDGET (notification));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]