Bug 564134 - Show a message when the screen orientation is locked/unlocked [r=mfinkle ui=madhava]

This commit is contained in:
Vivien Nicolas 2010-05-06 15:16:58 -04:00
Родитель 7437bd356b
Коммит 0dc5af0133
4 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -921,6 +921,11 @@ var BrowserUI = {
{
let locked = gPrefService.getBoolPref("toolkit.screen.lock");
gPrefService.setBoolPref("toolkit.screen.lock", !locked);
let strings = Elements.browserBundle;
let alerts = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
alerts.showAlertNotification(null, strings.getString("alertLockScreen"),
strings.getString("alertLockScreen." + (locked ? "locked" : "unlocked")), false, "", null);
break;
}
}

Просмотреть файл

@ -164,6 +164,7 @@
<key id="key_lockscreen" key="o" modifiers="accel,shift" command="cmd_lockscreen"/>
<!-- F5 on maemo is "home" which is a task switching key -->
#endif
<key id="key_lockscreen" key="o" modifiers="accel,shift" command="cmd_lockscreen"/>
<key id="key_reload2" key="r" modifiers="accel" command="cmd_reload"/>
<key id="key_forceReload2" key="r" modifiers="accel,shift" command="cmd_forceReload"/>
<key id="key_focusURL" key="l" modifiers="accel" command="cmd_openLocation"/>

Просмотреть файл

@ -832,7 +832,7 @@ XPInstallDownloadManager.prototype = {
return;
let strings = Elements.browserBundle;
var alerts = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
let alerts = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
alerts.showAlertNotification(URI_GENERIC_ICON_XPINSTALL, strings.getString("alertAddons"),
strings.getString("alertAddonsInstalling"), false, "", null);
},

Просмотреть файл

@ -57,6 +57,9 @@ alertAddons=Add-ons
alertAddonsInstalling=Installing add-on
alertAddonsInstalled=Installation complete. Restart required.
alertAddonsFail=Installation failed
alertLockScreen=Screen Orientation
alertLockScreen.locked=Locked
alertLockScreen.unlocked=Unlocked
# LOCALIZATION NOTE (alertAddonsDisabled): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals