Bug 688082 - Implement "You've entered full-screen" warning for Fennec. r=mfinkle
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 08 Nov 2011 10:36:06 -0800
changeset 81774 79690fc1fbf4
parent 81773 bda7e7fb45e8
child 81775 cde2fa77ea5d
push idunknown
push userunknown
push dateunknown
reviewersmfinkle
bugs688082
milestone10.0a1
Bug 688082 - Implement "You've entered full-screen" warning for Fennec. r=mfinkle
mobile/chrome/content/browser.js
mobile/locales/en-US/chrome/browser.properties
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -151,16 +151,19 @@ var BrowserApp = {
     Services.obs.addObserver(XPInstallObserver, "addon-install-started", false);
 
     window.addEventListener("fullscreen", function() {
       sendMessageToJava({
         gecko: {
           type: window.fullScreen ? "ToggleChrome:Show" : "ToggleChrome:Hide"
         }       
       });
+
+      if (!window.fullScreen)
+        NativeWindow.toast.show(Strings.browser.GetStringFromName("alertFullScreenToast"), "short");
     }, false);
 
     NativeWindow.init();
     Downloads.init();
 
     // Init LoginManager
     Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
 
--- a/mobile/locales/en-US/chrome/browser.properties
+++ b/mobile/locales/en-US/chrome/browser.properties
@@ -104,16 +104,18 @@ alertAddonsDisabled=#1 incompatible add-
 alertDownloads=Downloads
 alertDownloadsStart=Downloading: %S
 alertDownloadsDone=%S has finished downloading
 alertCantOpenDownload=Can't open file. Tap to save it.
 alertDownloadsSize=Download too big
 alertDownloadsNoSpace=Not enough storage space
 alertDownloadsToast=Download started…
 
+alertFullScreenToast=Press BACK to leave full-screen mode
+
 downloadCancelPromptTitle=Cancel Download
 downloadCancelPromptMessage=Do you want to cancel this download?
 
 # Notifications
 notificationRestart.normal=Restart to complete changes.
 notificationRestart.update=Add-ons updated. Restart to complete changes.
 notificationRestart.blocked=Unsafe add-ons installed. Restart to disable.
 notificationRestart.button=Restart