Bug 526919 - Lightweight theme notification bar hides when loading new page. r=dtownsend
authorDão Gottwald <dao@mozilla.com>
Fri, 13 Nov 2009 19:35:23 +0100
changeset 34831 43a29d8d9a972743b0402c8f331d573401e2ae8f
parent 34830 c3924062e8bc4ef8850cc08c9f291e2e4272c3fd
child 34832 ad22fb24b5e9c5ae493732e58974a3f23a2b201d
push idunknown
push userunknown
push dateunknown
reviewersdtownsend
bugs526919
milestone1.9.3a1pre
Bug 526919 - Lightweight theme notification bar hides when loading new page. r=dtownsend
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7119,19 +7119,21 @@ var LightWeightThemeWebInstaller = {
       callback: function () {
         LightWeightThemeWebInstaller._install(data);
       }
     }];
 
     this._removePreviousNotifications();
 
     var notificationBox = gBrowser.getNotificationBox();
-    notificationBox.appendNotification(message, "lwtheme-install-request", "",
-                                       notificationBox.PRIORITY_INFO_MEDIUM,
-                                       buttons);
+    var notificationBar =
+      notificationBox.appendNotification(message, "lwtheme-install-request", "",
+                                         notificationBox.PRIORITY_INFO_MEDIUM,
+                                         buttons);
+    notificationBar.persistence = 1;
   },
 
   _install: function (newTheme) {
     var previousTheme = this._manager.currentTheme;
     this._manager.currentTheme = newTheme;
     if (this._manager.currentTheme &&
         this._manager.currentTheme.id == newTheme.id)
       this._postInstallNotification(newTheme, previousTheme);
@@ -7155,20 +7157,23 @@ var LightWeightThemeWebInstaller = {
       callback: function () {
         BrowserOpenAddonsMgr("themes");
       }
     }];
 
     this._removePreviousNotifications();
 
     var notificationBox = gBrowser.getNotificationBox();
-    notificationBox.appendNotification(text("message"),
-                                       "lwtheme-install-notification", "",
-                                       notificationBox.PRIORITY_INFO_MEDIUM,
-                                       buttons);
+    var notificationBar =
+      notificationBox.appendNotification(text("message"),
+                                         "lwtheme-install-notification", "",
+                                         notificationBox.PRIORITY_INFO_MEDIUM,
+                                         buttons);
+    notificationBar.persistence = 1;
+    notificationBar.timeout = Date.now() + 20000; // 20 seconds
   },
 
   _removePreviousNotifications: function () {
     var box = gBrowser.getNotificationBox();
 
     ["lwtheme-install-request",
      "lwtheme-install-notification"].forEach(function (value) {
         var notification = box.getNotificationWithValue(value);