Use ID::to_s() in gtk2_ardour instead of ID::print()
authorTim Mayberry <mojofunk@gmail.com>
Fri, 19 Aug 2016 11:41:31 +0000 (21:41 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 18 Apr 2017 21:49:58 +0000 (07:49 +1000)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/editor.cc

index 67c92c24b02ef8af709535534f53f666ab75e23b..bbfeebcdfa9a65e979215ed743614b7a8872b40d 100644 (file)
@@ -851,24 +851,15 @@ XMLNode&
 ARDOUR_UI::get_transport_controllable_state ()
 {
        XMLNode* node = new XMLNode(X_("TransportControllables"));
-       char buf[64];
 
-       roll_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("roll"), buf);
-       stop_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("stop"), buf);
-       goto_start_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("goto_start"), buf);
-       goto_end_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("goto_end"), buf);
-       auto_loop_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("auto_loop"), buf);
-       play_selection_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("play_selection"), buf);
-       rec_controllable->id().print (buf, sizeof (buf));
-       node->add_property (X_("rec"), buf);
-       shuttle_box.controllable()->id().print (buf, sizeof (buf));
-       node->add_property (X_("shuttle"), buf);
+       node->add_property (X_("roll"), roll_controllable->id().to_s());
+       node->add_property (X_("stop"), stop_controllable->id().to_s());
+       node->add_property (X_("goto_start"), goto_start_controllable->id().to_s());
+       node->add_property (X_("goto_end"), goto_end_controllable->id().to_s());
+       node->add_property (X_("auto_loop"), auto_loop_controllable->id().to_s());
+       node->add_property (X_("play_selection"), play_selection_controllable->id().to_s());
+       node->add_property (X_("rec"), rec_controllable->id().to_s());
+       node->add_property (X_("shuttle"), shuttle_box.controllable()->id().to_s());
 
        return *node;
 }
index 16be22768fa3c016c62dac9b276055fe0cfbfe8f..a8b8721e07a37de0e4b2c52221dbd5f07c824bfa 100644 (file)
@@ -2593,8 +2593,7 @@ Editor::get_state ()
        char buf[32];
        LocaleGuard lg;
 
-       id().print (buf, sizeof (buf));
-       node->add_property ("id", buf);
+       node->add_property ("id", id().to_s ());
 
        node->add_child_nocopy (Tabbable::get_state());