summaryrefslogtreecommitdiff
path: root/gtk2_ardour/keyeditor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-17 13:54:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-17 13:54:04 +0000
commit29d677e6681b02d6940346ac88a432558b6c2a43 (patch)
tree9db8a282b8f139e90518d31e89ef1ca0f3548114 /gtk2_ardour/keyeditor.cc
parentd0cc6edadfd793b5207a63226402eedc15f101b4 (diff)
allow use of Return, KP_Enter and more in key binding editor; better display of such bindings; potential fix for "crashes" caused by an endless loop of enter/hide events involving the verbose canvas cursor
git-svn-id: svn://localhost/ardour2/branches/3.0@6109 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/keyeditor.cc')
-rw-r--r--gtk2_ardour/keyeditor.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc
index b909812f10..b8bfb5677b 100644
--- a/gtk2_ardour/keyeditor.cc
+++ b/gtk2_ardour/keyeditor.cc
@@ -86,6 +86,8 @@ KeyEditor::unbind ()
unbind_button.set_sensitive (false);
+ cerr << "trying to unbind\n";
+
if (i != model->children().end()) {
string path = (*i)[columns.path];
@@ -168,24 +170,21 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
goto out;
}
+ cerr << "real lkeyval: " << ev->keyval << endl;
possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
+ cerr << "using keyval = " << ev->keyval << endl;
+
bool result = AccelMap::change_entry (path,
ev->keyval,
ModifierType (Keyboard::RelevantModifierKeyMask & ev->state),
true);
+ cerr << "New binding to " << ev->keyval << " worked: " << result << endl;
+
if (result) {
- bool known;
AccelKey key;
-
- known = ActionManager::lookup_entry (path, key);
-
- if (known) {
- (*i)[columns.binding] = ActionManager::ui_manager->get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod()));
- } else {
- (*i)[columns.binding] = string();
- }
+ (*i)[columns.binding] = ActionManager::get_key_representation (path, key);
}
}