Bug 996363 - order OS X cloverleaf symbol correctly in ShortcutUtils.jsm, r=Unfocused

This commit is contained in:
Gijs Kruitbosch
2014-04-16 13:23:19 +01:00
parent 0e779874ed
commit 09fa188a97

View File

@@ -34,6 +34,7 @@ let ShortcutUtils = {
prettifyShortcut: function(aElemKey, aNoCloverLeaf) {
let elemString = "";
let elemMod = aElemKey.getAttribute("modifiers");
let haveCloverLeaf = false;
if (elemMod.match("accel")) {
if (Services.appinfo.OS == "Darwin") {
@@ -42,8 +43,7 @@ let ShortcutUtils = {
if (aNoCloverLeaf) {
elemString += "Cmd-";
} else {
elemString += PlatformKeys.GetStringFromName("VK_META") +
PlatformKeys.GetStringFromName("MODIFIER_SEPARATOR");
haveCloverLeaf = true;
}
} else {
elemString += PlatformKeys.GetStringFromName("VK_CONTROL") +
@@ -80,6 +80,11 @@ let ShortcutUtils = {
PlatformKeys.GetStringFromName("MODIFIER_SEPARATOR");
}
if (haveCloverLeaf) {
elemString += PlatformKeys.GetStringFromName("VK_META") +
PlatformKeys.GetStringFromName("MODIFIER_SEPARATOR");
}
let key;
let keyCode = aElemKey.getAttribute("keycode");
if (keyCode) {