[gnome-documents] notifications: use the miner display name property only if not empty



commit de7c4f106a5e7cc8e1a3424fcac3fe0dc5766766
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Feb 6 15:27:51 2013 -0500

    notifications: use the miner display name property only if not empty
    
    This will help for the edge case where an older version of the miner,
    without the property, is picked up (e.g. in JHBuild).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690502

 src/notifications.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/notifications.js b/src/notifications.js
index ca928f8..7de1ae0 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -149,9 +149,13 @@ const IndexingNotification = new Lang.Class({
         this._timeoutId = 0;
 
         let primary = null;
+        let miner = null;
 
         if (Application.application.minersRunning.length == 1) {
-            let miner = Application.application.minersRunning[0];
+            miner = Application.application.minersRunning[0];
+        }
+
+        if (miner && miner.DisplayName) {
             primary = _("Fetching documents from %s").format(miner.DisplayName);
         } else {
             primary = _("Fetching documents from online accounts");


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