Bug 585810 Part 2a: Restore the Learn More link to the geolocation doorhanger r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Thu, 07 Apr 2011 23:45:52 +0100
changeset 7522 18a491487cd93ac4213420977f180cd516079d91
parent 7521 0c36ce76850c9fa5834ada53debc83c72ababc00
child 7523 ab3d7bdaa533bdf8ea6a3c2820528dc877a52065
push idunknown
push userunknown
push dateunknown
reviewersIanN
bugs585810
Bug 585810 Part 2a: Restore the Learn More link to the geolocation doorhanger r=IanN
suite/browser/navigator.css
suite/common/bindings/notification.xml
--- a/suite/browser/navigator.css
+++ b/suite/browser/navigator.css
@@ -91,16 +91,20 @@ searchbar {
 #notification-popup-box[anchorid="notification-popup-box"] > #default-notification-icon,
 #notification-popup-box[anchorid="geo-notification-icon"] > #geo-notification-icon,
 #notification-popup-box[anchorid="addons-notification-icon"] > #addons-notification-icon,
 #notification-popup-box[anchorid="indexedDB-notification-icon"] > #indexedDB-notification-icon,
 #notification-popup-box[anchorid="password-notification-icon"] > #password-notification-icon {
   display: -moz-box;
 }
 
+#geolocation-notification {
+  -moz-binding: url("chrome://communicator/content/bindings/notification.xml#geolocation-popup-notification");
+}
+
 #addon-install-started-notification {
   -moz-binding: url("chrome://communicator/content/bindings/notification.xml#addon-progress-popup-notification");
 }
 
 #toolbar-menubar[autohide="true"][inactive="true"]
 {
   min-height: 0px !important;
   height: 0px !important;
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -1744,20 +1744,25 @@
                                                   [site], 1);
             } else {
               message = this._stringBundle
                             .formatStringFromName(type + ".fileWantsToKnow",
                                                   [file], 1);
               secondaryActions.length = 1;
             }
 
+            var options = {
+              value: this._stringBundle.GetStringFromName(type + ".learnMore"),
+              href: this._urlFormatter.formatURLPref("browser." + type + ".warning.infoURL")
+            };
+
             PopupNotifications.show(this.activeBrowser,
                                     "geolocation", message,
                                     "geo-notification-icon", mainAction,
-                                    secondaryActions);
+                                    secondaryActions, options);
           ]]>
         </body>
       </method>
 
       <method name="promptIndexedDB">
         <parameter name="aRequestor"/>
         <parameter name="aWindow"/>
         <parameter name="aTopic"/>
@@ -2228,16 +2233,58 @@
         </xul:hbox>
         <xul:description anonid="messageText" class="messageText" flex="1" xbl:inherits="xbl:text=label"/>
         <xul:progressmeter mode="undetermined" xbl:inherits="mode,value=progress"/>
         <xul:label xbl:inherits="value=status"/>
       </xul:vbox>
     </content>
   </binding>
 
+  <binding id="geolocation-popup-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
+    <content align="start">
+      <xul:image class="popup-notification-icon" xbl:inherits="popupid"/>
+      <xul:vbox flex="1">
+        <xul:description class="popup-notification-description"
+                         xbl:inherits="xbl:text=label"/>
+        <xul:hbox class="popup-notification-button-container" align="center">
+          <xul:label class="text-link" xbl:inherits="value,href"/>
+          <xul:spacer flex="1"/>
+          <xul:button anonid="button"
+                      class="popup-notification-menubutton"
+                      type="menu-button"
+                      xbl:inherits="oncommand=buttoncommand,label=buttonlabel,accesskey=buttonaccesskey">
+            <xul:menupopup anonid="menupopup"
+                           xbl:inherits="oncommand=menucommand">
+              <children/>
+              <xul:menuitem class="menuitem-iconic popup-notification-closeitem"
+                            label="&closeNotificationItem.label;"
+                            xbl:inherits="oncommand=closeitemcommand"/>
+            </xul:menupopup>
+          </xul:button>
+        </xul:hbox>
+        <xul:label xbl:inherits="value=status"/>
+      </xul:vbox>
+      <xul:vbox pack="start">
+        <xul:toolbarbutton anonid="closebutton"
+                           class="messageCloseButton popup-notification-closebutton"
+                           xbl:inherits="oncommand=closebuttoncommand"
+                           tooltiptext="&closeNotification.tooltip;"/>
+      </xul:vbox>
+    </content>
+
+    <implementation>
+      <constructor>
+        <![CDATA[
+          this.setAttribute("value", this.notification.options.value);
+          this.setAttribute("href", this.notification.options.href);
+        ]]>
+      </constructor>
+    </implementation>
+  </binding>
+
   <binding id="addon-progress-popup-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
     <content align="start">
       <xul:image class="popup-notification-icon" xbl:inherits="popupid"/>
       <xul:vbox flex="1">
         <xul:description class="popup-notification-description"
                          xbl:inherits="xbl:text=label"/>
         <xul:hbox class="popup-notification-button-container" align="center">
           <xul:progressmeter mode="undetermined"