Bug 596329 - Disable "Save as PDF" on platforms where it doesn't work [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 14 Sep 2010 13:46:49 -0700
changeset 66582 79354a0ee236ecd3eddab83478826983dbbc3c9a
parent 66581 9baaf4a05692ad7bba1a93244fac62245b1f120c
child 66583 813715d4abe19855988afe5ebbd474a226557ecd
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs596329
Bug 596329 - Disable "Save as PDF" on platforms where it doesn't work [r=mfinkle]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -1091,17 +1091,19 @@ var TapHighlightHelper = {
     this._overlay.style.display = "none";
   }
 };
 
 var PageActions = {
   init: function init() {
     this.register("pageaction-reset", this.updatePagePermissions, this);
     this.register("pageaction-password", this.updateForgetPassword, this);
+#ifdef NS_PRINTING
     this.register("pageaction-saveas", this.updatePageSaveAs, this);
+#endif
     this.register("pageaction-share", this.updateShare, this);
     this.register("pageaction-search", BrowserSearch.updatePageSearchEngines, BrowserSearch);
   },
 
   /**
    * @param aId id of a pageaction element
    * @param aCallback function that takes an element and returns true if it should be visible
    * @param aThisObj (optional) scope object for aCallback
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -337,18 +337,20 @@
           <image id="identity-popup-encryption-icon"/>
           <description id="identity-popup-encryption-label"/>
         </vbox>
       </hbox>
 
       <hbox id="pageactions-container" class="window-width" hidden="true">
         <pageaction id="pageaction-findinpage" title="&pageactions.findInPage;"
           onclick="FindHelperUI.show();"/>
+#ifdef NS_PRINTING
         <pageaction id="pageaction-saveas" title="&pageactions.saveas.pdf;"
           onclick="PageActions.savePageAsPDF();"/>
+#endif
         <pageaction id="pageaction-share" title="&pageactions.share.page;"
           onclick="SharingUI.show(getBrowser().currentURI.spec, getBrowser().contentTitle);"/>
         <pageaction id="pageaction-password" title="&pageactions.password.forget;"
           onclick="PageActions.forgetPassword(); PageActions.hideItem(this);"/>
         <pageaction id="pageaction-reset" title="&pageactions.reset;"
           onclick="PageActions.clearPagePermissions(); PageActions.hideItem(this);"/>
         <pageaction id="pageaction-search" title="&pageactions.search.addNew;"/>
       </hbox>