Use XMLNode::set_property API in ARDOUR_UI class
authorTim Mayberry <mojofunk@gmail.com>
Sun, 28 Aug 2016 23:12:35 +0000 (09:12 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 18 Apr 2017 23:36:55 +0000 (09:36 +1000)
gtk2_ardour/ardour_ui_ed.cc

index f8fa6a7b41fc361ec37ebfcb106a0ce39c5a3423..3eb063993352160034cda192c41a56a88d1acb43 100644 (file)
@@ -772,7 +772,7 @@ ARDOUR_UI::save_ardour_state ()
        Config->add_extra_xml (*node);
 
        XMLNode* window_node = new XMLNode (X_("UI"));
-       window_node->add_property (_status_bar_visibility.get_state_name().c_str(), _status_bar_visibility.get_state_value ());
+       window_node->set_property (_status_bar_visibility.get_state_name().c_str(), _status_bar_visibility.get_state_value ());
 
        /* main window */
 
@@ -781,10 +781,10 @@ ARDOUR_UI::save_ardour_state ()
        _main_window.get_size (mw, mh);
 
        XMLNode main_window_node (X_("Main"));
-       main_window_node.add_property (X_("x"), PBD::to_string (mx, std::dec));
-       main_window_node.add_property (X_("y"), PBD::to_string (my, std::dec));
-       main_window_node.add_property (X_("w"), PBD::to_string (mw, std::dec));
-       main_window_node.add_property (X_("h"), PBD::to_string (mh, std::dec));
+       main_window_node.set_property (X_("x"), mx);
+       main_window_node.set_property (X_("y"), my);
+       main_window_node.set_property (X_("w"), mw);
+       main_window_node.set_property (X_("h"), mh);
 
        string current_tab;
        int current_page_number = _tabs.get_current_page ();
@@ -796,7 +796,7 @@ ARDOUR_UI::save_ardour_state ()
                current_tab = "preferences";
        }
 
-       main_window_node.add_property (X_("current-tab"), current_tab);
+       main_window_node.set_property (X_("current-tab"), current_tab);
 
        /* Windows */