available_action_model->clear ();
- /* Because there are button bindings built in that are not
- in the key binding map, there needs to be a way to undo
- a profile edit. */
TreeIter rowp;
TreeModel::Row parent;
+
+ /* Disabled item (row 0) */
+
rowp = available_action_model->append();
parent = *(rowp);
- parent[action_columns.name] = _("Remove Binding");
+ parent[action_columns.name] = _("Disabled");
/* Key aliasing */
vector<pair<string,string> > actions;
actions.push_back (make_pair (string (_("Toggle Editor & Mixer Windows")), string (X_("Common/toggle-editor-mixer"))));
+ actions.push_back (make_pair (string (_("Show/Hide Mixer list")), string (X_("Common/ToggleMixerList"))));
+ actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
actions.push_back (make_pair (string (_("Show/Hide Editor mixer strip")), string (X_("Editor/show-editor-mixer"))));
build_action_combo (cb, actions, FaderPort::Mix, bs);
{
vector<pair<string,string> > actions;
- actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
- actions.push_back (make_pair (string("Toggle Summary"), string(X_("Editor/ToggleSummary"))));
actions.push_back (make_pair (string("Toggle Editor Lists"), string(X_("Editor/show-editor-list"))));
+ actions.push_back (make_pair (string("Toggle Summary"), string(X_("Editor/ToggleSummary"))));
+ actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
actions.push_back (make_pair (string (_("Zoom to Session")), string (X_("Editor/zoom-to-session"))));
- actions.push_back (make_pair (string (_("Zoom In")), string (X_("Editor/temporal-zoom-in"))));
- actions.push_back (make_pair (string (_("Zoom Out")), string (X_("Editor/temporal-zoom-out"))));
+
+// actions.push_back (make_pair (string (_("Zoom In")), string (X_("Editor/temporal-zoom-in"))));
+// actions.push_back (make_pair (string (_("Zoom Out")), string (X_("Editor/temporal-zoom-out"))));
build_action_combo (cb, actions, FaderPort::Proj, bs);
}
{
vector<pair<string,string> > actions;
- actions.push_back (make_pair (string("Toggle Locations"), string(X_("Window/toggle-locations"))));
+ actions.push_back (make_pair (string("Toggle Big Clock"), string(X_("Window/toggle-big-clock")))); //note: this would really make sense if the Big Clock had transport buttons on it
+ actions.push_back (make_pair (string("Toggle Locations window"), string(X_("Window/toggle-locations"))));
actions.push_back (make_pair (string("Toggle Metronome"), string(X_("Transport/ToggleClick"))));
- actions.push_back (make_pair (string("Toggle Sync"), string(X_("Transport/ToggleExternalSync"))));
- actions.push_back (make_pair (string("Set Playhead @pointer"), string(X_("Editor/set-playhead"))));
+ actions.push_back (make_pair (string("Toggle External Sync"), string(X_("Transport/ToggleExternalSync"))));
+ actions.push_back (make_pair (string("Toggle Follow Playhead"), string(X_("Editor/toggle-follow-playhead"))));
+
+// actions.push_back (make_pair (string("Set Playhead @pointer"), string(X_("Editor/set-playhead"))));
+
build_action_combo (cb, actions, FaderPort::Trns, bs);
}
+bool
+FPGUI::find_action_in_model (const TreeModel::iterator& iter, std::string const & action_path, TreeModel::iterator* found)
+{
+ TreeModel::Row row = *iter;
+ string path = row[action_columns.path];
+
+ if (path == action_path) {
+ *found = iter;
+ return true;
+ }
+
+ return false;
+}
+
void
FPGUI::build_user_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
{
cb.set_model (available_action_model);
cb.pack_start (action_columns.name);
cb.signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &FPGUI::action_changed), &cb, FaderPort::User, bs));
+
+ /* set the active "row" to the right value for the current button binding */
+
+ string current_action = fp.get_action (FaderPort::User, false, bs); /* lookup release action */
+
+ if (current_action.empty()) {
+ cb.set_active (0); /* "disabled" */
+ return;
+ }
+
+ TreeModel::iterator iter = available_action_model->children().end();
+
+ available_action_model->foreach_iter (sigc::bind (sigc::mem_fun (*this, &FPGUI::find_action_in_model), current_action, &iter));
+
+ if (iter != available_action_model->children().end()) {
+ cb.set_active (iter);
+ } else {
+ cb.set_active (0);
+ }
+
}
Glib::RefPtr<Gtk::ListStore>