mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
remove useless code from push2 gui dialog
This commit is contained in:
parent
9480dc1c6a
commit
4a159b817f
2 changed files with 0 additions and 138 deletions
|
|
@ -220,141 +220,6 @@ P2GUI::update_port_combos ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
P2GUI::build_available_action_menu ()
|
||||
{
|
||||
/* build a model of all available actions (needs to be tree structured
|
||||
* more)
|
||||
*/
|
||||
|
||||
available_action_model = TreeStore::create (action_columns);
|
||||
|
||||
vector<string> paths;
|
||||
vector<string> labels;
|
||||
vector<string> tooltips;
|
||||
vector<string> keys;
|
||||
vector<Glib::RefPtr<Gtk::Action> > actions;
|
||||
|
||||
Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
|
||||
|
||||
typedef std::map<string,TreeIter> NodeMap;
|
||||
NodeMap nodes;
|
||||
NodeMap::iterator r;
|
||||
|
||||
|
||||
vector<string>::iterator k;
|
||||
vector<string>::iterator p;
|
||||
vector<string>::iterator t;
|
||||
vector<string>::iterator l;
|
||||
|
||||
available_action_model->clear ();
|
||||
|
||||
TreeIter rowp;
|
||||
TreeModel::Row parent;
|
||||
|
||||
/* Disabled item (row 0) */
|
||||
|
||||
rowp = available_action_model->append();
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = _("Disabled");
|
||||
|
||||
/* Key aliasing */
|
||||
|
||||
rowp = available_action_model->append();
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = _("Shift");
|
||||
rowp = available_action_model->append();
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = _("Control");
|
||||
rowp = available_action_model->append();
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = _("Option");
|
||||
rowp = available_action_model->append();
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = _("CmdAlt");
|
||||
|
||||
|
||||
for (l = labels.begin(), k = keys.begin(), p = paths.begin(), t = tooltips.begin(); l != labels.end(); ++k, ++p, ++t, ++l) {
|
||||
|
||||
TreeModel::Row row;
|
||||
vector<string> parts;
|
||||
|
||||
parts.clear ();
|
||||
|
||||
split (*p, parts, '/');
|
||||
|
||||
if (parts.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//kinda kludgy way to avoid displaying menu items as mappable
|
||||
if ( parts[1] == _("Main_menu") )
|
||||
continue;
|
||||
if ( parts[1] == _("JACK") )
|
||||
continue;
|
||||
if ( parts[1] == _("redirectmenu") )
|
||||
continue;
|
||||
if ( parts[1] == _("Editor_menus") )
|
||||
continue;
|
||||
if ( parts[1] == _("RegionList") )
|
||||
continue;
|
||||
if ( parts[1] == _("ProcessorMenu") )
|
||||
continue;
|
||||
|
||||
if ((r = nodes.find (parts[1])) == nodes.end()) {
|
||||
|
||||
/* top level is missing */
|
||||
|
||||
TreeIter rowp;
|
||||
TreeModel::Row parent;
|
||||
rowp = available_action_model->append();
|
||||
nodes[parts[1]] = rowp;
|
||||
parent = *(rowp);
|
||||
parent[action_columns.name] = parts[1];
|
||||
|
||||
row = *(available_action_model->append (parent.children()));
|
||||
|
||||
} else {
|
||||
|
||||
row = *(available_action_model->append ((*r->second)->children()));
|
||||
|
||||
}
|
||||
|
||||
/* add this action */
|
||||
|
||||
if (l->empty ()) {
|
||||
row[action_columns.name] = *t;
|
||||
action_map[*t] = *p;
|
||||
} else {
|
||||
row[action_columns.name] = *l;
|
||||
action_map[*l] = *p;
|
||||
}
|
||||
|
||||
string path = (*p);
|
||||
/* ControlProtocol::access_action() is not interested in the
|
||||
legacy "<Actions>/" prefix part of a path.
|
||||
*/
|
||||
path = path.substr (strlen ("<Actions>/"));
|
||||
|
||||
row[action_columns.path] = path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
P2GUI::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;
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gtk::ListStore>
|
||||
P2GUI::build_midi_port_list (vector<string> const & ports, bool for_input)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,9 +91,6 @@ private:
|
|||
Glib::RefPtr<Gtk::TreeStore> available_action_model;
|
||||
std::map<std::string,std::string> action_map; // map from action names to paths
|
||||
|
||||
void build_available_action_menu ();
|
||||
bool find_action_in_model (const Gtk::TreeModel::iterator& iter, std::string const & action_path, Gtk::TreeModel::iterator* found);
|
||||
|
||||
struct PressureModeColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
PressureModeColumns() {
|
||||
add (mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue