make commands panel more readable

pull/402/head
nightwing 2017-03-16 19:32:49 +04:00
rodzic 4802a51a01
commit 7c043d28c8
2 zmienionych plików z 16 dodań i 7 usunięć

Wyświetl plik

@ -106,22 +106,24 @@ define(function(require, exports, module) {
+ (available && this.getClassName(row))
+ (available ? "" : " notAvailable")
+ "' style='height:" + this.innerRowHeight + "px'>"
+ "<span class='keys'>" + keys + "</span>"
+ "<span class='caption'>"
+ this.replaceStrong((command.group || "General") + ": " + name)
+ "</span><span class='path'>"
+ (command.hint
? this.replaceStrong(command.hint)
: "")
+ this.replaceStrong(name)
+ "</span><span class='keys'>" + keys + "</span>"
+ "<span class='path'>"
+ ((command.group || "General"))
+ "</span></div>");
};
this.getText = function(node) {
var command = this.commands.commands[node.id];
if (!command) return "";
var keys = (command.bindKey || 0)[this.commands.platform] || "";
return (command.group || "General") + ": "
+ (command.displayName || command.name || node.id)
+ (command.hint ? "\n" + command.hint : "");
+ (command.hint ? "\n" + command.hint : "")
+ (keys ? "\n" + keys : "")
+ "\nPress F2 to change keybinding";
};
this.getClassName = function(row) {

Wyświetl plik

@ -94,6 +94,9 @@ define(function(require, exports, module) {
}, {
bindKey: "Shift-Enter",
exec: function() { execCommand(false, true); }
}, {
bindKey: "F2",
exec: function() { showKeyEditor(); }
}
]);
function forwardToTree() {
@ -166,6 +169,10 @@ define(function(require, exports, module) {
}
/***** Methods *****/
function showKeyEditor() {
commands.exec("openpreferences", null, { panel: "preferences.keybindings" });
}
/**
* Searches through the dataset