rename function

pull/260/head
Matthias Bussonnier 11 years ago
parent 0f2f515a87
commit 589dce314e

@ -226,16 +226,16 @@ define([
return dct;
};
ShortcutManager.prototype.get_shortcut_for_action_name = function(name){
ShortcutManager.prototype.get_action_shortcut = function(name){
var ftree = flatten_shorttree(this._shortcuts);
var res = {};
for (var sht in ftree ){
if(ftree[sht] === name){
return sht
return sht;
}
}
return undefined;
}
};
ShortcutManager.prototype.help = function () {
var help = [];

@ -23,11 +23,11 @@ define(function(require){
* wether an action have a keybinding or not.
**/
var get_mode_for_action_id = function(name, notebook) {
var shortcut = notebook.keyboard_manager.command_shortcuts.get_shortcut_for_action_name(name);
var shortcut = notebook.keyboard_manager.command_shortcuts.get_action_shortcut(name);
if (shortcut) {
return 'command-shortcut';
}
shortcut = notebook.keyboard_manager.edit_shortcuts.get_shortcut_for_action_name(name);
shortcut = notebook.keyboard_manager.edit_shortcuts.get_action_shortcut(name);
if (shortcut) {
return 'edit-shortcut';
}
@ -133,8 +133,8 @@ define(function(require){
display: 'display'
};
var short = notebook.keyboard_manager.command_shortcuts.get_shortcut_for_action_name(action_id) ||
notebook.keyboard_manager.edit_shortcuts.get_shortcut_for_action_name(action_id);
var short = notebook.keyboard_manager.command_shortcuts.get_action_shortcut(action_id) ||
notebook.keyboard_manager.edit_shortcuts.get_action_shortcut(action_id);
if (short) {
short = QH.humanize_sequence(short);
}

Loading…
Cancel
Save