fix all surfaces' available action menus

Note: this replicated code is ridiculous
This commit is contained in:
Paul Davis 2019-03-20 14:23:23 -07:00
parent cf2fa0ae84
commit acbd12c885
4 changed files with 32 additions and 32 deletions

View file

@ -416,27 +416,27 @@ CC121GUI::build_available_action_menu ()
} }
//kinda kludgy way to avoid displaying menu items as mappable //kinda kludgy way to avoid displaying menu items as mappable
if ( parts[1] == _("Main Menu") ) if (parts[0] == _("Main Menu") )
continue; continue;
if ( parts[1] == _("JACK") ) if (parts[0] == _("JACK") )
continue; continue;
if ( parts[1] == _("redirectmenu") ) if (parts[0] == _("redirectmenu") )
continue; continue;
if ( parts[1] == _("RegionList") ) if (parts[0] == _("RegionList") )
continue; continue;
if ( parts[1] == _("ProcessorMenu") ) if (parts[0] == _("ProcessorMenu") )
continue; continue;
if ((r = nodes.find (parts[1])) == nodes.end()) { if ((r = nodes.find (parts[0])) == nodes.end()) {
/* top level is missing */ /* top level is missing */
TreeIter rowp; TreeIter rowp;
TreeModel::Row parent; TreeModel::Row parent;
rowp = available_action_model->append(); rowp = available_action_model->append();
nodes[parts[1]] = rowp; nodes[parts[0]] = rowp;
parent = *(rowp); parent = *(rowp);
parent[action_columns.name] = parts[1]; parent[action_columns.name] = parts[0];
row = *(available_action_model->append (parent.children())); row = *(available_action_model->append (parent.children()));

View file

@ -413,27 +413,27 @@ FPGUI::build_available_action_menu ()
} }
//kinda kludgy way to avoid displaying menu items as mappable //kinda kludgy way to avoid displaying menu items as mappable
if ( parts[1] == _("Main Menu") ) if (parts[0] == _("Main Menu") )
continue; continue;
if ( parts[1] == _("JACK") ) if (parts[0] == _("JACK") )
continue; continue;
if ( parts[1] == _("redirectmenu") ) if (parts[0] == _("redirectmenu") )
continue; continue;
if ( parts[1] == _("RegionList") ) if (parts[0] == _("RegionList") )
continue; continue;
if ( parts[1] == _("ProcessorMenu") ) if (parts[0] == _("ProcessorMenu") )
continue; continue;
if ((r = nodes.find (parts[1])) == nodes.end()) { if ((r = nodes.find (parts[0])) == nodes.end()) {
/* top level is missing */ /* top level is missing */
TreeIter rowp; TreeIter rowp;
TreeModel::Row parent; TreeModel::Row parent;
rowp = available_action_model->append(); rowp = available_action_model->append();
nodes[parts[1]] = rowp; nodes[parts[0]] = rowp;
parent = *(rowp); parent = *(rowp);
parent[action_columns.name] = parts[1]; parent[action_columns.name] = parts[0];
row = *(available_action_model->append (parent.children())); row = *(available_action_model->append (parent.children()));

View file

@ -392,27 +392,27 @@ FP8GUI::build_available_action_menu ()
} }
//kinda kludgy way to avoid displaying menu items as mappable //kinda kludgy way to avoid displaying menu items as mappable
if ( parts[1] == _("Main Menu") ) if (parts[0] == _("Main Menu") )
continue; continue;
if ( parts[1] == _("JACK") ) if (parts[0] == _("JACK") )
continue; continue;
if ( parts[1] == _("redirectmenu") ) if (parts[0] == _("redirectmenu") )
continue; continue;
if ( parts[1] == _("RegionList") ) if (parts[0] == _("RegionList") )
continue; continue;
if ( parts[1] == _("ProcessorMenu") ) if (parts[0] == _("ProcessorMenu") )
continue; continue;
if ((r = nodes.find (parts[1])) == nodes.end()) { if ((r = nodes.find (parts[0])) == nodes.end()) {
/* top level is missing */ /* top level is missing */
TreeIter rowp; TreeIter rowp;
TreeModel::Row parent; TreeModel::Row parent;
rowp = available_action_model->append(); rowp = available_action_model->append();
nodes[parts[1]] = rowp; nodes[parts[0]] = rowp;
parent = *(rowp); parent = *(rowp);
parent[action_columns.name] = parts[1]; parent[action_columns.name] = parts[0];
row = *(available_action_model->append (parent.children())); row = *(available_action_model->append (parent.children()));

View file

@ -422,27 +422,27 @@ US2400ProtocolGUI::build_available_action_menu ()
} }
/* kinda kludgy way to avoid displaying menu items as mappable */ /* kinda kludgy way to avoid displaying menu items as mappable */
if (parts[1] == _("Main Menu")) if (parts[0] == _("Main Menu"))
continue; continue;
if (parts[1] == _("JACK")) if (parts[0] == _("JACK"))
continue; continue;
if (parts[1] == _("redirectmenu")) if (parts[0] == _("redirectmenu"))
continue; continue;
if (parts[1] == _("RegionList")) if (parts[0] == _("RegionList"))
continue; continue;
if (parts[1] == _("ProcessorMenu")) if (parts[0] == _("ProcessorMenu"))
continue; continue;
if ((r = nodes.find (parts[1])) == nodes.end()) { if ((r = nodes.find (parts[0])) == nodes.end()) {
/* top level is missing */ /* top level is missing */
TreeIter rowp; TreeIter rowp;
TreeModel::Row parent; TreeModel::Row parent;
rowp = available_action_model->append(); rowp = available_action_model->append();
nodes[parts[1]] = rowp; nodes[parts[0]] = rowp;
parent = *(rowp); parent = *(rowp);
parent[available_action_columns.name] = parts[1]; parent[available_action_columns.name] = parts[0];
row = *(available_action_model->append (parent.children())); row = *(available_action_model->append (parent.children()));