Bug 879982 - [Australis] Add Email Link widget; r=jaws
authorFelix H. Dahlke <fhd@ubercode.de>
Sat, 23 Nov 2013 01:40:18 +0100
changeset 157487 8ffcc8dc682b3953cec63a57505b280d65fb0d37
parent 157347 0e9b0466f19dfc17f1243f5072af18282e89918f
child 157488 3fdcc69225209b2df842850296a804f451143e81
push id25714
push usercbook@mozilla.com
push dateTue, 26 Nov 2013 11:39:03 +0000
treeherdermozilla-central@4a8c40940659 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs879982
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 879982 - [Australis] Add Email Link widget; r=jaws
browser/components/customizableui/src/CustomizableWidgets.jsm
browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
browser/themes/osx/browser.css
browser/themes/shared/browser.inc
browser/themes/shared/menupanel.inc.css
browser/themes/shared/toolbarbuttons.inc.css
--- a/browser/components/customizableui/src/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/src/CustomizableWidgets.jsm
@@ -774,9 +774,16 @@ const CustomizableWidgets = [{
 
           CustomizableUI.removeListener(listener);
           let panel = aDoc.getElementById(kPanelId);
           panel.removeEventListener("popupshowing", updateButton);
         }
       };
       CustomizableUI.addListener(listener);
     }
+  }, {
+    id: "email-link-button",
+    removable: true,
+    onCommand: function(aEvent) {
+      let win = aEvent.view;
+      win.MailIntegration.sendLinkForWindow(win.content);
+    }
   }];
--- a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
+++ b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
@@ -69,8 +69,11 @@ paste-button.tooltiptext = Paste
 
 # LOCALIZATION NOTE (feed-button.tooltiptext): Use the unicode ellipsis char,
 # \u2026, or use "..." if \u2026 doesn't suit traditions in your locale.
 feed-button.label = Subscribe
 feed-button.tooltiptext = Subscribe to this pageā€¦
 
 characterencoding-button.label = Character Encoding
 characterencoding-button.tooltiptext = Character encoding
+
+email-link-button.label = Email Link
+email-link-button.tooltiptext = Email Link
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -583,16 +583,20 @@ toolbar .toolbarbutton-1:not([type="menu
   #nav-bar-overflow-button@toolbarButtonPressed@ {
     -moz-image-region: rect(18px, 612px, 36px, 594px);
   }
 
   #nav-bar-overflow-button[open] {
     -moz-image-region: rect(36px, 612px, 54px, 594px);
   }
 
+  #email-link-button@toolbarButtonPressed@ {
+    -moz-image-region: rect(18px, 306px, 36px, 288px);
+  }
+
   /**
    * OSX has a unique set of icons when fullscreen is in the checked state.
    */
 
   #fullscreen-button[checked="true"]:not([cui-areatype="menu-panel"]) {
     -moz-image-region: rect(36px, 432px, 54px, 414px);
   }
 
@@ -732,16 +736,24 @@ toolbar .toolbarbutton-1:not([type="menu
   #social-share-button[cui-areatype="toolbar"] {
     -moz-image-region: rect(0, 612px, 36px, 576px);
   }
 
   #social-share-button[cui-areatype="toolbar"]:hover:active:not([disabled="true"]) {
     -moz-image-region: rect(36px, 612px, 72px, 576px);
   }
 
+  #email-link-button[cui-areatype="toolbar"] {
+    -moz-image-region: rect(0, 612px, 36px, 576px);
+  }
+
+  #email-link-button[cui-areatype="toolbar"]:hover:active:not([disabled="true"]) {
+    -moz-image-region: rect(36px, 612px, 72px, 576px);
+  }
+
   #characterencoding-button[cui-areatype="toolbar"] {
     -moz-image-region: rect(0, 648px, 36px, 612px);
   }
 
   #characterencoding-button[cui-areatype="toolbar"]:hover:active:not([disabled="true"]) {
     -moz-image-region: rect(36px, 648px, 72px, 612px);
   }
 
@@ -1004,16 +1016,26 @@ toolbar .toolbarbutton-1:not([type="menu
     -moz-image-region: rect(0px, 1472px, 64px, 1408px);
   }
 
   #preferences-button[cui-areatype="menu-panel"],
   toolbarpaletteitem[place="palette"] > #preferences-button {
     -moz-image-region: rect(0px, 1536px, 64px, 1472px);
   }
 
+  #email-link-button[cui-areatype="menu-panel"],
+  toolbarpaletteitem[place="palette"] > #email-link-button {
+    -moz-image-region: rect(0px, 896px, 64px, 832px);
+  }
+
+  /* This is temporary until we have an email-link icon (Bug 932235) */
+  #email-link-button > image {
+    transform: scale(-1, -1);
+  }
+
   /* Footer and wide panel control icons */
   #edit-controls@inAnyPanel@ > toolbarbutton,
   #zoom-controls@inAnyPanel@ > toolbarbutton,
   toolbarpaletteitem[place="palette"] > #edit-controls > toolbarbutton,
   toolbarpaletteitem[place="palette"] > #zoom-controls > toolbarbutton {
     list-style-image: url(chrome://browser/skin/menuPanel-small@2x.png);
   }
 
--- a/browser/themes/shared/browser.inc
+++ b/browser/themes/shared/browser.inc
@@ -1,4 +1,4 @@
 %filter substitution
 
-%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button, #zoom-out-button, #zoom-reset-button, #zoom-in-button, #sync-button, #feed-button, #tabview-button, #webrtc-status-button, #social-share-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button
+%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button, #zoom-out-button, #zoom-reset-button, #zoom-in-button, #sync-button, #feed-button, #tabview-button, #webrtc-status-button, #social-share-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button
 %define inAnyPanel :-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem)
--- a/browser/themes/shared/menupanel.inc.css
+++ b/browser/themes/shared/menupanel.inc.css
@@ -55,16 +55,27 @@ toolbarpaletteitem[place="palette"] > #f
   -moz-image-region: rect(0px, 416px, 32px, 384px);
 }
 
 #social-share-button[cui-areatype="menu-panel"],
 toolbarpaletteitem[place="palette"] > #social-share-button {
   -moz-image-region: rect(0px, 448px, 32px, 416px);
 }
 
+#email-link-button[cui-areatype="menu-panel"],
+toolbarpaletteitem[place="palette"] > #email-link-button {
+  -moz-image-region: rect(0, 448px, 32px, 416px);
+}
+
+/* This is temporary until we have an email-link icon (Bug 932235) */
+#email-link-button[cui-areatype="menu-panel"] > image,
+toolbarpaletteitem[place="palette"] > #email-link-button > image {
+  transform: scale(-1, -1);
+}
+
 #characterencoding-button[cui-areatype="menu-panel"],
 toolbarpaletteitem[place="palette"] > #characterencoding-button {
   -moz-image-region: rect(0px, 480px, 32px, 448px);
 }
 
 #new-window-button[cui-areatype="menu-panel"],
 toolbarpaletteitem[place="palette"] > #new-window-button {
   -moz-image-region: rect(0px, 512px, 32px, 480px);
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -64,16 +64,22 @@
 #feed-button[cui-areatype="toolbar"] {
   -moz-image-region: rect(0, 288px, 18px, 270px);
 }
 
 #social-share-button[cui-areatype="toolbar"] {
   -moz-image-region: rect(0px, 306px, 18px, 288px);
 }
 
+#email-link-button[cui-areatype="toolbar"] {
+  -moz-image-region: rect(0, 306px, 18px, 288px);
+  /* This is temporary until we have an email-link icon (Bug 932235) */
+  transform: scale(-1, -1);
+}
+
 #characterencoding-button[cui-areatype="toolbar"]{
   -moz-image-region: rect(0, 324px, 18px, 306px);
 }
 
 #new-window-button[cui-areatype="toolbar"] {
   -moz-image-region: rect(0, 342px, 18px, 324px);
 }