Bug 826371 - Fix the private browsing autostart preference change confirmation on platforms without instant-apply (such as Windows); r=jdm
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 03 Jan 2013 14:16:46 -0500
changeset 123092 2c7919e052be4842e49a34e42cccd69866a8f748
parent 123091 e3594aa4c2a7eb5cf573ceb345dd25837eebb967
child 123093 66a7359f9be20cd36b9743501e173d1a193b2205
push idunknown
push userunknown
push dateunknown
reviewersjdm
bugs826371
milestone20.0a1
Bug 826371 - Fix the private browsing autostart preference change confirmation on platforms without instant-apply (such as Windows); r=jdm
browser/components/preferences/in-content/jar.mn
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/jar.mn
browser/components/preferences/privacy.xul
--- a/browser/components/preferences/in-content/jar.mn
+++ b/browser/components/preferences/in-content/jar.mn
@@ -5,17 +5,17 @@
 browser.jar:
 *  content/browser/preferences/in-content/preferences.js
    content/browser/preferences/in-content/landing.xul
 *  content/browser/preferences/in-content/preferences.xul
 *  content/browser/preferences/in-content/main.xul
    content/browser/preferences/in-content/main.js
 *  content/browser/preferences/in-content/tabs.xul
 *  content/browser/preferences/in-content/tabs.js
-   content/browser/preferences/in-content/privacy.xul
+*  content/browser/preferences/in-content/privacy.xul
 *  content/browser/preferences/in-content/privacy.js
 *  content/browser/preferences/in-content/advanced.xul
 *  content/browser/preferences/in-content/advanced.js
    content/browser/preferences/in-content/applications.xul
 *  content/browser/preferences/in-content/applications.js
    content/browser/preferences/in-content/content.xul
    content/browser/preferences/in-content/content.js
    content/browser/preferences/in-content/sync.xul
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -53,21 +53,26 @@
               type="bool"/>
   <preference id="privacy.sanitize.timeSpan"
               name="privacy.sanitize.timeSpan"
               type="int"/>
   <!-- Private Browsing -->
   <preference id="browser.privatebrowsing.autostart"
               name="browser.privatebrowsing.autostart"
               onchange="gPrivacyPane.updatePrivacyMicroControls();"
+#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
+              instantApply="true"
+#endif
               type="bool"/>
+#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
   <preference id="browser.privatebrowsing.keep_current_session"
               name="browser.privatebrowsing.keep_current_session"
               instantApply="true"
               type="bool"/>
+#endif
 
 </preferences>
 
 <hbox class="heading" data-category="panePrivacy" hidden="true">
   <image class="preference-icon" type="privacy"/>
   <html:h1>&panePrivacy.title;</html:h1>
 </hbox>
 
@@ -215,9 +220,9 @@
         <menuitem label="&locbar.both.label;" value="0"/>
         <menuitem label="&locbar.history.label;" value="1"/>
         <menuitem label="&locbar.bookmarks.label;" value="2"/>
         <menuitem label="&locbar.nothing.label;" value="-1"/>
       </menupopup>
     </menulist>
     <label>&locbar.post.label;</label>
   </hbox>
-</groupbox>
\ No newline at end of file
+</groupbox>
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -27,17 +27,17 @@ browser.jar:
     content/browser/preferences/handlers.css
 *   content/browser/preferences/languages.xul
     content/browser/preferences/languages.js
 *   content/browser/preferences/main.xul
     content/browser/preferences/main.js
 *   content/browser/preferences/permissions.xul
     content/browser/preferences/permissions.js
 *   content/browser/preferences/preferences.xul
-    content/browser/preferences/privacy.xul
+*   content/browser/preferences/privacy.xul
 *   content/browser/preferences/privacy.js
     content/browser/preferences/sanitize.xul
     content/browser/preferences/security.xul
     content/browser/preferences/security.js
     content/browser/preferences/selectBookmark.xul
     content/browser/preferences/selectBookmark.js
 #ifdef MOZ_SERVICES_SYNC
     content/browser/preferences/sync.xul
--- a/browser/components/preferences/privacy.xul
+++ b/browser/components/preferences/privacy.xul
@@ -65,21 +65,26 @@
       <preference id="privacy.sanitize.timeSpan"
                   name="privacy.sanitize.timeSpan"
                   type="int"/>
 
       <!-- Private Browsing -->
       <preference id="browser.privatebrowsing.autostart"
                   name="browser.privatebrowsing.autostart"
                   onchange="gPrivacyPane.updatePrivacyMicroControls();"
+#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
+                  instantApply="true"
+#endif
                   type="bool"/>
+#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
       <preference id="browser.privatebrowsing.keep_current_session"
                   name="browser.privatebrowsing.keep_current_session"
                   instantApply="true"
                   type="bool"/>
+#endif
 
     </preferences>
     
     <stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/>
     
     <script type="application/javascript" src="chrome://browser/content/preferences/privacy.js"/>
 
     <!-- Tracking -->