Bug 1293467 - Explicitely show icon on tab received notification on Windows. r?markh draft
authorEdouard Oger <eoger@fastmail.com>
Thu, 18 Aug 2016 19:34:49 -0700
changeset 405179 771a393a12e4943df312a2d92ccf5f3663f876b9
parent 404988 01748a2b1a463f24efd9cd8abad9ccfd76b037b8
child 529379 a017581d1f617b9bcae85553bc502a6dde4aab17
push id27421
push userbmo:eoger@fastmail.com
push dateThu, 25 Aug 2016 00:15:42 +0000
reviewersmarkh
bugs1293467
milestone51.0a1
Bug 1293467 - Explicitely show icon on tab received notification on Windows. r?markh MozReview-Commit-ID: 5KxqqrfJiuo
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -2385,17 +2385,23 @@ BrowserGlue.prototype = {
         body = body.replace("#2", deviceName);
       }
 
       const clickCallback = (subject, topic, data) => {
         if (topic == "alertclickcallback") {
           win.gBrowser.selectedTab = firstTab;
         }
       }
-      AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
+
+      // Specify an icon because on Windows no icon is shown at the moment
+      let imageURL;
+      if (AppConstants.platform == "win") {
+        imageURL = "chrome://branding/content/icon64.png";
+      }
+      AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback);
     } catch (ex) {
       Cu.reportError("Error displaying tab(s) received by Sync: " + ex);
     }
   },
 
   _onDeviceDisconnected() {
     let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties");
     let title = bundle.GetStringFromName("deviceDisconnectedNotification.title");