#include <ardour/profile.h>
#include <gtkmm/stock.h>
+#include <gtkmm/label.h>
#include <gtkmm/accelkey.h>
#include <gtkmm/accelmap.h>
#include <gtkmm/uimanager.h>
#include <pbd/strsplit.h>
#include <pbd/replace_all.h>
+#include <ardour/profile.h>
+
#include "actions.h"
#include "keyboard.h"
#include "keyeditor.h"
+#include "utils.h"
#include "i18n.h"
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
- unbind_box.pack_start (unbind_button, false, false);
-
- unbind_button.signal_clicked().connect (mem_fun (*this, &KeyEditor::unbind));
get_vbox()->set_spacing (6);
get_vbox()->pack_start (scroller);
- get_vbox()->pack_start (unbind_box, false, false);
+
+ if (!ARDOUR::Profile->get_sae()) {
+
+ Label* hint = manage (new Label (_("Select an action, then press the key(s) to (re)set its shortcut")));
+ hint->show ();
+ 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));
+
+ get_vbox()->pack_start (unbind_box, false, false);
+ unbind_box.show ();
+ unbind_button.show ();
+
+ }
+
get_vbox()->set_border_width (12);
- scroller.show ();
view.show ();
- unbind_box.show ();
- unbind_button.show ();
+ scroller.show ();
+
unbind_button.set_sensitive (false);
}
goto out;
}
+ possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
+
bool result = AccelMap::change_entry (path,
ev->keyval,
(ModifierType) ev->state,
#ifdef GTKOSX
string label = (*k);
- replace_all (label, "<Mod5>", _("Command-"));
+
+ /* Gtk/Quartz maps:
+ NSAlternate/NSOption key to Mod1
+ NSCommand key to Meta
+ */
+
+ replace_all (label, "<Meta>", _("Command-"));
replace_all (label, "<Alt>", _("Option-"));
replace_all (label, "<Shift>", _("Shift-"));
+ replace_all (label, "<Control>", _("Control-"));
row[columns.binding] = label;
#else
row[columns.binding] = (*k);