projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
half-fix logic issue with solo-isolate controls
[ardour.git]
/
gtk2_ardour
/
keyeditor.cc
diff --git
a/gtk2_ardour/keyeditor.cc
b/gtk2_ardour/keyeditor.cc
index 6b1aec7f4ee7f22ca99a13dc01d3a081d1cd2829..96a9857412754f0feaec5deca478cbebea4ab47c 100644
(file)
--- a/
gtk2_ardour/keyeditor.cc
+++ b/
gtk2_ardour/keyeditor.cc
@@
-25,8
+25,10
@@
using namespace Gtk;
using namespace Gdk;
using namespace PBD;
using namespace Gdk;
using namespace PBD;
+using Gtkmm2ext::Keyboard;
+
KeyEditor::KeyEditor ()
KeyEditor::KeyEditor ()
- : ArdourDialog (_("
Shortcut Editor
"), false)
+ : ArdourDialog (_("
Key Bindings
"), false)
, unbind_button (_("Remove shortcut"))
, unbind_box (BUTTONBOX_END)
, unbind_button (_("Remove shortcut"))
, unbind_box (BUTTONBOX_END)
@@
-47,7
+49,7
@@
KeyEditor::KeyEditor ()
view.set_rules_hint (true);
view.set_name (X_("KeyEditorTree"));
view.set_rules_hint (true);
view.set_name (X_("KeyEditorTree"));
- view.get_selection()->signal_changed().connect (mem_fun (*this, &KeyEditor::action_selected));
+ view.get_selection()->signal_changed().connect (
sigc::
mem_fun (*this, &KeyEditor::action_selected));
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
@@
-63,7
+65,7
@@
KeyEditor::KeyEditor ()
unbind_box.set_spacing (6);
unbind_box.pack_start (*hint, false, true);
unbind_box.pack_start (unbind_button, false, false);
unbind_box.set_spacing (6);
unbind_box.pack_start (*hint, false, true);
unbind_box.pack_start (unbind_button, false, false);
- unbind_button.signal_clicked().connect (mem_fun (*this, &KeyEditor::unbind));
+ unbind_button.signal_clicked().connect (
sigc::
mem_fun (*this, &KeyEditor::unbind));
get_vbox()->pack_start (unbind_box, false, false);
unbind_box.show ();
get_vbox()->pack_start (unbind_box, false, false);
unbind_box.show ();
@@
-86,6
+88,8
@@
KeyEditor::unbind ()
unbind_button.set_sensitive (false);
unbind_button.set_sensitive (false);
+ cerr << "trying to unbind\n";
+
if (i != model->children().end()) {
string path = (*i)[columns.path];
if (i != model->children().end()) {
string path = (*i)[columns.path];
@@
-168,24
+172,21
@@
KeyEditor::on_key_release_event (GdkEventKey* ev)
goto out;
}
goto out;
}
+ cerr << "real lkeyval: " << ev->keyval << endl;
possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
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);
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) {
if (result) {
- bool known;
AccelKey key;
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);
}
}
}
}