using namespace ARDOUR;
using namespace PBD;
-uint32_t RouteUI::_max_invert_buttons = 4;
+uint32_t RouteUI::_max_invert_buttons = 3;
RouteUI::RouteUI (ARDOUR::Session* sess)
: AxisView(sess)
if ((xml_node = _route->extra_xml ("GUI")) == 0) {
xml_node = new XMLNode ("GUI");
_route->add_extra_xml (*xml_node);
+ } else {
+ /* the Route has one, so it must have been loaded */
+ if (Stateful::loading_state_version < 3000) {
+ /* the GUI extra XML is in 2.X format; we must convert it to the new
+ format to avoid problems later
+ */
+
+ XMLNode* new_xml_node = new XMLNode (X_("GUI"));
+ XMLPropertyList old_gui_props = xml_node->properties ();
+ for (XMLPropertyIterator i = old_gui_props.begin(); i != old_gui_props.end(); ++i) {
+ new_xml_node->add_property ((*i)->name().c_str (), (*i)->value().c_str ());
+ }
+
+ XMLNodeList old_children = xml_node->children ();
+ for (XMLNodeConstIterator i = old_children.begin(); i != old_children.end(); ++i) {
+ XMLNode* new_child = new XMLNode (AutomationTimeAxisView::state_node_name);
+ new_child->add_property (X_("automation-id"), (*i)->name());
+
+ XMLPropertyList old_props = (*i)->properties ();
+ for (XMLPropertyIterator j = old_props.begin(); j != old_props.end(); ++j) {
+ new_child->add_property ((*j)->name().c_str (), (*j)->value().c_str ());
+ }
+
+ new_xml_node->add_child_nocopy (*new_child);
+ }
+
+ _route->add_extra_xml (*new_xml_node);
+ }
}
}
}
const string sym = ARDOUR::EventTypeMap::instance().to_symbol(param);
for (iter = kids.begin(); iter != kids.end(); ++iter) {
+
if ((*iter)->name() == AutomationTimeAxisView::state_node_name) {
XMLProperty* type = (*iter)->property("automation-id");
- if (type && type->value() == sym)
+ if (type && type->value() == sym) {
return *iter;
+ }
}
}
name_prompter.show_all ();
switch (name_prompter.run ()) {
-
case Gtk::RESPONSE_ACCEPT:
- name_prompter.get_result (result);
- if (result.length()) {
+ name_prompter.get_result (result);
+ if (result.length()) {
_route->set_name (result);
}
break;
RouteUI::save_as_template ()
{
sys::path path;
- Glib::ustring safe_name;
+ std::string safe_name;
string name;
path = ARDOUR::user_route_template_directory ();