remove Glib::ustring from gtk2_ardour
[ardour.git] / gtk2_ardour / route_ui.cc
index 334492fab3d144f2e57acc2ae2931dbe370cde88..ab83206a8c36f3bf18ffbdcea794f1941a574522 100644 (file)
@@ -1204,7 +1204,7 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
 }
 
 bool
-RouteUI::solo_safe_button_release (GdkEventButton* ev)
+RouteUI::solo_safe_button_release (GdkEventButton*)
 {
         _route->set_solo_safe (!(solo_safe_led->visual_state() > 0), this);
         return true;
@@ -1271,7 +1271,7 @@ RouteUI::ensure_xml_node ()
 }
 
 XMLNode*
-RouteUI::get_automation_child_xml_node (Evoral::Parameter param)
+RouteUI::get_automation_child_xml_node (Evoral::Parameter param, int version)
 {
        ensure_xml_node ();
 
@@ -1281,10 +1281,17 @@ RouteUI::get_automation_child_xml_node (Evoral::Parameter param)
        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 (version < 3000) {
+                       if ((*iter)->name() == sym) {
                                return *iter;
+                       }
+               } else {
+                       if ((*iter)->name() == AutomationTimeAxisView::state_node_name) {
+                               XMLProperty* type = (*iter)->property("automation-id");
+                               if (type && type->value() == sym)
+                                       return *iter;
+                       }
                }
        }
 
@@ -1340,9 +1347,9 @@ edit your ardour.rc file to set the\n\
        string prompt;
 
        if (is_track()) {
-               prompt  = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(this cannot be undone)"), _route->name());
+               prompt  = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
        } else {
-               prompt  = string_compose (_("Do you really want to remove bus \"%1\" ?\n(this cannot be undone)"), _route->name());
+               prompt  = string_compose (_("Do you really want to remove bus \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
        }
 
        choices.push_back (_("No, do nothing."));
@@ -1386,10 +1393,9 @@ RouteUI::route_rename ()
        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;
@@ -1540,7 +1546,7 @@ void
 RouteUI::save_as_template ()
 {
        sys::path path;
-       Glib::ustring safe_name;
+       std::string safe_name;
        string name;
 
        path = ARDOUR::user_route_template_directory ();