From fda05ac64bfb4aeb4c6b05753d51d5039dcc6885 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 19 Aug 2016 21:41:31 +1000 Subject: [PATCH] Use ID::to_s() in gtk2_ardour instead of ID::print() --- gtk2_ardour/ardour_ui.cc | 25 ++++++++----------------- gtk2_ardour/editor.cc | 3 +-- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 67c92c24b0..bbfeebcdfa 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -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; } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 16be22768f..a8b8721e07 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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());