[gnome-documents] notifications: don't show indexing notifications in preview



commit 776ede7b106ea05698bb9db6ee42853001331d90
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Feb 6 15:46:40 2013 -0500

    notifications: don't show indexing notifications in preview
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690504

 src/notifications.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/notifications.js b/src/notifications.js
index 7de1ae0..dfac914 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -30,6 +30,7 @@ const _ = imports.gettext.gettext;
 
 const Application = imports.application;
 const Utils = imports.utils;
+const WindowMode = imports.windowMode;
 
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
@@ -115,9 +116,15 @@ const IndexingNotification = new Lang.Class({
         }
 
         Application.application.connectJS('miners-changed', Lang.bind(this, this._checkNotification));
+        Application.modeController.connect('window-mode-changed', Lang.bind(this, this._checkNotification));
     },
 
     _checkNotification: function() {
+        if (Application.modeController.getWindowMode() == WindowMode.WindowMode.PREVIEW) {
+            this._destroy(false);
+            return;
+        }
+
         let isIndexingLocal = false;
         let isIndexingRemote = false;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]