<menuitem action='UseSoftwareMonitoring'/>
<menuitem action='UseExternalMonitoring'/>
</menu>
+ <menu action='Plugins'>
+ <menuitem action='DisableAllPlugins'/>
+ <menuitem action='ABAllPlugins'/>
+ </menu>
<menu action='Metering'>
<menu action='MeteringFallOffRate'>
<menuitem action='MeterFalloffOff'/>
</menu>
</menubar>
- <popup name='redirectmenu'>
+ <popup name='processormenu'>
<menuitem action='newplugin'/>
<menuitem action='newinsert'/>
<menuitem action='newsend'/>
KeyEditor::KeyEditor ()
: ArdourDialog (_("Keybinding Editor"), false)
{
+ can_bind = false;
+ last_state = 0;
+
model = TreeStore::create(columns);
view.set_model (model);
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
+
get_vbox()->pack_start (scroller);
+ get_vbox()->set_border_width (12);
scroller.show ();
view.show ();
{
}
+bool
+KeyEditor::on_key_press_event (GdkEventKey* ev)
+{
+ can_bind = true;
+ last_state = ev->state;
+}
+
bool
KeyEditor::on_key_release_event (GdkEventKey* ev)
{
+ if (!can_bind || ev->state != last_state) {
+ return false;
+ }
+
TreeModel::iterator i = view.get_selection()->get_selected();
if (i != model->children().end()) {
string path = (*i)[columns.path];
+ if (!(*i)[columns.bindable]) {
+ goto out;
+ }
+
bool result = AccelMap::change_entry (path,
ev->keyval,
(ModifierType) ev->state,
}
+ out:
+ can_bind = false;
return true;
}
nodes[parts[1]] = rowp;
parent = *(rowp);
parent[columns.action] = parts[1];
+ parent[columns.bindable] = false;
row = *(model->append (parent.children()));
row[columns.action] = (*l);
row[columns.path] = (*p);
+ row[columns.bindable] = true;
if (*k == ActionManager::unbound_string) {
row[columns.binding] = string();
protected:
void on_show ();
void on_unmap ();
+ bool on_key_press_event (GdkEventKey*);
bool on_key_release_event (GdkEventKey*);
private:
add (action);
add (binding);
add (path);
+ add (bindable);
}
Gtk::TreeModelColumn<Glib::ustring> action;
Gtk::TreeModelColumn<std::string> binding;
Gtk::TreeModelColumn<std::string> path;
+ Gtk::TreeModelColumn<bool> bindable;
};
Gtk::ScrolledWindow scroller;
Glib::RefPtr<Gtk::TreeStore> model;
KeyEditorColumns columns;
+ bool can_bind;
+ guint last_state;
+
void action_selected ();
void populate ();
};
processor_display.set_size_request (-1, 40);
processor_display.get_column(0)->set_sizing(TREE_VIEW_COLUMN_FIXED);
processor_display.get_column(0)->set_fixed_width(48);
+ processor_display.set_enable_search (false);
processor_display.add_object_drag (columns.processor.index(), "redirects");
processor_display.signal_object_drop.connect (mem_fun (*this, &ProcessorBox::object_drop));