Bug 465692 - Update the text of the Private Browsing prompt; r,ui-r=beltzner ui-r=faaborg
☠☠ backed out by 01f6bd8265fd ☠ ☠
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Thu, 01 Jan 2009 22:34:43 +0330
changeset 23219 cdeb81e07974609a49ed46351a45fafb5537dad6
parent 23218 314c9e78f9e1a86431015f2ef327dc05f8841e09
child 23220 01f6bd8265fd4505ae7c4442eb9c612bfd72cdbd
push id4401
push userehsan.akhgari@gmail.com
push dateThu, 01 Jan 2009 19:24:32 +0000
treeherdermozilla-central@cdeb81e07974 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbeltzner, faaborg
bugs465692
milestone1.9.2a1pre
Bug 465692 - Update the text of the Private Browsing prompt; r,ui-r=beltzner ui-r=faaborg
browser/base/content/browser.js
browser/locales/en-US/chrome/browser/browser.properties
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6868,33 +6868,39 @@ let gPrivateBrowsingUI = {
     catch (ex) { }
 
     var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].
                         getService(Ci.nsIStringBundleService);
     var pbBundle = bundleService.createBundle("chrome://browser/locale/browser.properties");
     var brandBundle = bundleService.createBundle("chrome://branding/locale/brand.properties");
 
     var appName = brandBundle.GetStringFromName("brandShortName");
+# On Mac, no title should be displayed.
+#ifdef XP_MACOSX
+    var dialogTitle = "";
+#else
     var dialogTitle = pbBundle.GetStringFromName("privateBrowsingDialogTitle");
+#endif
+    var header = pbBundle.GetStringFromName("privateBrowsingMessageHeader");
     var message = pbBundle.formatStringFromName("privateBrowsingMessage", [appName], 1);
 
     var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                         getService(Ci.nsIPromptService);
 
     var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +
                 promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +
                 promptService.BUTTON_POS_0_DEFAULT;
 
     var neverAsk = {value:false};
     var button0Title = pbBundle.GetStringFromName("privateBrowsingYesTitle");
     var button1Title = pbBundle.GetStringFromName("privateBrowsingNoTitle");
     var neverAskText = pbBundle.GetStringFromName("privateBrowsingNeverAsk");
 
     var result;
-    var choice = promptService.confirmEx(null, dialogTitle, message,
+    var choice = promptService.confirmEx(null, dialogTitle, header + "\n\n" + message,
                                flags, button0Title, button1Title, null,
                                neverAskText, neverAsk);
 
     switch (choice) {
     case 0: // Start Private Browsing
       result = true;
       if (neverAsk.value)
         gPrefService.setBoolPref("browser.privatebrowsing.dont_prompt_on_enter", true);
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -164,12 +164,13 @@ safebrowsing.notAnAttackButton.label=This isn't an attack siteā€¦
 safebrowsing.notAnAttackButton.accessKey=A
 
 # Private Browsing Confirmation dialog
 # LOCALIZATION NOTE (privateBrowsingMessage): %S will be replaced
 # by the name of the application.
 # LOCALIZATION NOTE (privateBrowsingYesTitle, privateBrowsingNoTitle, privateBrowsingNeverAsk):
 # Access keys are specified by prefixing the desired letter with an ampersand.
 privateBrowsingDialogTitle=Start Private Browsing
+privateBrowsingMessageHeader=Would you like to start Private Browsing?
 privateBrowsingMessage=%S will save your current tabs for when you are done with your Private Browsing session.
 privateBrowsingYesTitle=&Start Private Browsing
 privateBrowsingNoTitle=&Cancel
 privateBrowsingNeverAsk=&Do not show this message again