2 Copyright (C) 2010 Paul Davis
3 Author: Johannes Mueller
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include <glib/gstdio.h>
27 #include <gtkmm/filechooserdialog.h>
28 #include <gtkmm/frame.h>
29 #include <gtkmm/liststore.h>
30 #include <gtkmm/notebook.h>
31 #include <gtkmm/progressbar.h>
32 #include <gtkmm/separator.h>
33 #include <gtkmm/scrolledwindow.h>
34 #include <gtkmm/stock.h>
35 #include <gtkmm/textview.h>
36 #include <gtkmm/treeiter.h>
37 #include <gtkmm/treeview.h>
39 #include "pbd/basename.h"
40 #include "pbd/error.h"
41 #include "pbd/file_archive.h"
42 #include "pbd/file_utils.h"
44 #include "pbd/xml++.h"
46 #include "gtkmm2ext/gui_thread.h"
48 #include "ardour/filesystem_paths.h"
49 #include "ardour/template_utils.h"
51 #include "progress_reporter.h"
53 #include "template_dialog.h"
58 using namespace ARDOUR;
60 class TemplateManager : public Gtk::HBox,
61 public ProgressReporter
64 virtual ~TemplateManager () {}
66 virtual void init () = 0;
67 void handle_dirty_description ();
69 PBD::Signal0<void> TemplatesImported;
74 void setup_model (const std::vector<ARDOUR::TemplateInfo>& templates);
76 void row_selection_changed ();
78 virtual void delete_selected_template () = 0;
79 bool adjust_plugin_paths (XMLNode* node, const std::string& name, const std::string& new_name) const;
81 struct SessionTemplateColumns : public Gtk::TreeModel::ColumnRecord {
82 SessionTemplateColumns () {
88 Gtk::TreeModelColumn<std::string> name;
89 Gtk::TreeModelColumn<std::string> path;
90 Gtk::TreeModelColumn<std::string> description;
93 Glib::RefPtr<Gtk::ListStore> _template_model;
94 SessionTemplateColumns _template_columns;
96 Gtk::TreeModel::const_iterator _current_selection;
98 Gtk::ProgressBar _progress_bar;
99 std::string _current_action;
102 void render_template_names (Gtk::CellRenderer* rnd, const Gtk::TreeModel::iterator& it);
103 void validate_edit (const Glib::ustring& path_string, const Glib::ustring& new_name);
106 void set_desc_dirty ();
108 bool key_event (GdkEventKey* ev);
110 virtual void rename_template (Gtk::TreeModel::iterator& item, const Glib::ustring& new_name) = 0;
112 virtual void save_template_desc ();
114 void export_all_templates ();
115 void import_template_set ();
117 virtual std::string templates_dir () const = 0;
118 virtual std::string template_file (const Gtk::TreeModel::const_iterator& item) const = 0;
120 virtual bool adjust_xml_tree (XMLTree& tree, const std::string& old_name, const std::string& new_name) const = 0;
122 Gtk::TreeView _template_treeview;
123 Gtk::CellRendererText _validating_cellrenderer;
124 Gtk::TreeView::Column _validated_column;
126 Gtk::TextView _description_editor;
127 Gtk::Button _save_desc;
130 Gtk::Button _remove_button;
131 Gtk::Button _rename_button;
133 Gtk::Button _export_all_templates_button;
134 Gtk::Button _import_template_set_button;
136 void update_progress_gui (float p);
139 class SessionTemplateManager : public TemplateManager
142 SessionTemplateManager () : TemplateManager () {}
143 ~SessionTemplateManager () {}
148 void rename_template (Gtk::TreeModel::iterator& item, const Glib::ustring& new_name);
149 void delete_selected_template ();
151 std::string templates_dir () const;
152 std::string template_file (const Gtk::TreeModel::const_iterator& item) const;
154 bool adjust_xml_tree (XMLTree& tree, const std::string& old_name, const std::string& new_name) const;
158 class RouteTemplateManager : public TemplateManager
161 RouteTemplateManager () : TemplateManager () {}
162 ~RouteTemplateManager () {}
167 void rename_template (Gtk::TreeModel::iterator& item, const Glib::ustring& new_name);
168 void delete_selected_template ();
170 std::string templates_dir () const;
171 std::string template_file (const Gtk::TreeModel::const_iterator& item) const;
173 bool adjust_xml_tree (XMLTree& tree, const std::string& old_name, const std::string& new_name) const;
178 TemplateDialog::TemplateDialog ()
179 : ArdourDialog ("Manage Templates")
181 Notebook* nb = manage (new Notebook);
183 SessionTemplateManager* session_tm = manage (new SessionTemplateManager);
184 nb->append_page (*session_tm, _("Session Templates"));
186 RouteTemplateManager* route_tm = manage (new RouteTemplateManager);
187 nb->append_page (*route_tm, _("Track Templates"));
189 get_vbox()->pack_start (*nb);
190 add_button (_("Ok"), Gtk::RESPONSE_OK);
192 get_vbox()->show_all();
197 session_tm->TemplatesImported.connect (*this, invalidator (*this), boost::bind (&RouteTemplateManager::init, route_tm), gui_context ());
198 route_tm->TemplatesImported.connect (*this, invalidator (*this), boost::bind (&SessionTemplateManager::init, session_tm), gui_context ());
200 signal_hide().connect (sigc::mem_fun (session_tm, &TemplateManager::handle_dirty_description));
201 signal_hide().connect (sigc::mem_fun (route_tm, &TemplateManager::handle_dirty_description));
202 nb->signal_switch_page().connect (boost::bind (&TemplateManager::handle_dirty_description, session_tm));
203 nb->signal_switch_page().connect (boost::bind (&TemplateManager::handle_dirty_description, route_tm));
206 TemplateManager::TemplateManager ()
208 , ProgressReporter ()
209 , _save_desc (_("Save Description"))
210 , _desc_dirty (false)
211 , _remove_button (_("Remove"))
212 , _rename_button (_("Rename"))
213 , _export_all_templates_button (_("Export all"))
214 , _import_template_set_button (_("Import"))
216 _template_model = ListStore::create (_template_columns);
217 _template_treeview.set_model (_template_model);
219 _validated_column.set_title (_("Template Name"));
220 _validated_column.pack_start (_validating_cellrenderer);
221 _template_treeview.append_column (_validated_column);
222 _validating_cellrenderer.property_editable() = true;
224 _validated_column.set_cell_data_func (_validating_cellrenderer, sigc::mem_fun (*this, &TemplateManager::render_template_names));
225 _validating_cellrenderer.signal_edited().connect (sigc::mem_fun (*this, &TemplateManager::validate_edit));
226 _template_treeview.signal_cursor_changed().connect (sigc::mem_fun (*this, &TemplateManager::row_selection_changed));
227 _template_treeview.signal_key_press_event().connect (sigc::mem_fun (*this, &TemplateManager::key_event));
229 ScrolledWindow* sw = manage (new ScrolledWindow);
230 sw->property_hscrollbar_policy() = POLICY_AUTOMATIC;
231 sw->add (_template_treeview);
232 sw->set_size_request (300, 200);
234 VBox* vb_btns = manage (new VBox);
235 vb_btns->set_spacing (4);
236 vb_btns->pack_start (_rename_button, false, false);
237 vb_btns->pack_start (_remove_button, false, false);
238 vb_btns->pack_start (_save_desc, false, false);
240 _rename_button.set_sensitive (false);
241 _rename_button.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::start_edit));
242 _remove_button.set_sensitive (false);
243 _remove_button.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::delete_selected_template));
245 vb_btns->pack_start (*(manage (new VSeparator ())));
247 vb_btns->pack_start (_export_all_templates_button, false, false);
248 vb_btns->pack_start (_import_template_set_button, false, false);
250 _export_all_templates_button.set_sensitive (false);
251 _export_all_templates_button.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::export_all_templates));
253 _import_template_set_button.set_sensitive (true);
254 _import_template_set_button.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::import_template_set));
258 VBox* vb = manage (new VBox);
259 vb->pack_start (*sw);
260 vb->pack_start (_progress_bar);
262 Frame* desc_frame = manage (new Frame (_("Description")));
264 _description_editor.set_wrap_mode (Gtk::WRAP_WORD);
265 _description_editor.set_size_request (300,400);
266 _description_editor.set_border_width (6);
268 _save_desc.set_sensitive (false);
269 _save_desc.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::save_template_desc));
271 _description_editor.get_buffer()->signal_changed().connect (sigc::mem_fun (*this, &TemplateManager::set_desc_dirty));
273 desc_frame->add (_description_editor);
276 pack_start (*desc_frame);
277 pack_start (*vb_btns);
279 show_all_children ();
280 _progress_bar.hide ();
284 TemplateManager::setup_model (const vector<TemplateInfo>& templates)
286 _template_model->clear ();
288 for (vector<TemplateInfo>::const_iterator it = templates.begin(); it != templates.end(); ++it) {
290 row = *(_template_model->append ());
292 row[_template_columns.name] = it->name;
293 row[_template_columns.path] = it->path;
294 row[_template_columns.description] = it->description;
297 _export_all_templates_button.set_sensitive (!templates.empty ());
301 TemplateManager::handle_dirty_description ()
303 if (_desc_dirty && _current_selection) {
304 ArdourDialog dlg (_("Description not saved"), true);
305 const string name = _current_selection->get_value (_template_columns.name);
306 Label msg (string_compose (_("The discription of template \"%1\" has been modfied but has not been saved yet.\n"
307 "Do you want to save it?"), name));
308 dlg.get_vbox()->pack_start (msg);
310 dlg.add_button (_("Save"), RESPONSE_ACCEPT);
311 dlg.add_button (_("Discard"), RESPONSE_REJECT);
312 dlg.set_default_response (RESPONSE_REJECT);
314 int response = dlg.run ();
316 if (response == RESPONSE_ACCEPT) {
317 save_template_desc ();
319 _description_editor.get_buffer()->set_text (_current_selection->get_value (_template_columns.description));
327 TemplateManager::row_selection_changed ()
329 handle_dirty_description ();
331 _current_selection = _template_treeview.get_selection()->get_selected ();
332 if (_current_selection) {
333 const string desc = _current_selection->get_value (_template_columns.description);
334 _description_editor.get_buffer()->set_text (desc);
336 _save_desc.set_sensitive (false);
339 _rename_button.set_sensitive (_current_selection);
340 _remove_button.set_sensitive (_current_selection);
344 TemplateManager::render_template_names (Gtk::CellRenderer*, const Gtk::TreeModel::iterator& it)
347 _validating_cellrenderer.property_text () = it->get_value (_template_columns.name);
352 TemplateManager::validate_edit (const Glib::ustring& path_string, const Glib::ustring& new_name)
354 const TreePath path (path_string);
355 TreeModel::iterator current = _template_model->get_iter (path);
357 if (current->get_value (_template_columns.name) == new_name) {
361 TreeModel::Children rows = _template_model->children ();
364 for (TreeModel::Children::const_iterator it = rows.begin(); it != rows.end(); ++it) {
365 if (it->get_value (_template_columns.name) == new_name) {
372 error << string_compose (_("Template of name \"%1\" already exists"), new_name) << endmsg;
377 rename_template (current, new_name);
381 TemplateManager::start_edit ()
383 TreeModel::Path path;
385 _template_treeview.get_cursor (path, col);
386 _template_treeview.set_cursor (path, *col, /*set_editing =*/ true);
390 TemplateManager::set_desc_dirty ()
393 _save_desc.set_sensitive (true);
397 TemplateManager::save_template_desc ()
399 const string file_path = template_file (_current_selection);
401 const string desc_txt = _description_editor.get_buffer()->get_text ();
402 _current_selection->set_value (_template_columns.description, desc_txt);
406 if (!tree.read(file_path)) {
407 error << string_compose (_("Could not parse template file \"%1\"."), file_path) << endmsg;
411 tree.root()->remove_nodes (X_("description"));
412 XMLNode* desc = new XMLNode (X_("description"));
414 XMLNode* dn = new XMLNode (X_("content"), desc_txt);
415 desc->add_child_nocopy (*dn);
417 tree.root()->add_child_nocopy (*desc);
419 if (!tree.write ()) {
420 error << string_compose(X_("Could not write to template file \"%1\"."), file_path) << endmsg;
424 _save_desc.set_sensitive (false);
429 TemplateManager::key_event (GdkEventKey* ev)
431 if (ev->keyval == GDK_KEY_F2) {
435 if (ev->keyval == GDK_KEY_Delete) {
436 delete_selected_template ();
444 bool accept_all_files (string const &, void *)
449 static void _set_progress (Progress* p, size_t n, size_t t)
451 p->set_progress (float (n) / float(t));
456 TemplateManager::export_all_templates ()
459 char* td = g_dir_make_tmp ("ardour-templates-XXXXXX", &err);
462 error << string_compose(_("Could not make tmpdir: %1"), err->message) << endmsg;
465 const string tmpdir (td);
467 g_clear_error (&err);
469 FileChooserDialog dialog(_("Save Exported Template Archive"), FILE_CHOOSER_ACTION_SAVE);
470 dialog.set_filename (X_("templates.tar.xz"));
472 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
473 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
475 FileFilter archive_filter;
476 archive_filter.add_pattern (X_("*.tar.xz"));
477 archive_filter.set_name (_("Template archives"));
478 dialog.add_filter (archive_filter);
480 int result = dialog.run ();
482 if (result != RESPONSE_OK || !dialog.get_filename().length()) {
483 PBD::remove_directory (tmpdir);
487 string filename = dialog.get_filename ();
488 if (filename.compare (filename.size () - 7, 7, ".tar.xz")) {
489 filename += ".tar.xz";
492 if (g_file_test (filename.c_str(), G_FILE_TEST_EXISTS)) {
493 ArdourDialog dlg (_("File exists"), true);
494 Label msg (string_compose (_("The file %1 already exists."), filename));
495 dlg.get_vbox()->pack_start (msg);
497 dlg.add_button (_("Overwrite"), RESPONSE_ACCEPT);
498 dlg.add_button (_("Cancel"), RESPONSE_REJECT);
499 dlg.set_default_response (RESPONSE_REJECT);
503 if (result == RESPONSE_REJECT) {
504 PBD::remove_directory (tmpdir);
509 PBD::copy_recurse (templates_dir (), Glib::build_filename (tmpdir, Glib::path_get_basename (templates_dir ())));
511 vector<string> files;
512 PBD::find_files_matching_regex (files, tmpdir, string ("\\.template$"), /* recurse = */ true);
514 vector<string>::const_iterator it;
515 for (it = files.begin(); it != files.end(); ++it) {
516 const string bn = PBD::basename_nosuffix (*it);
517 const string old_path = Glib::build_filename (templates_dir (), bn);
518 const string new_path = Glib::build_filename ("$TEMPLATEDIR", bn);
521 if (!tree.read (*it)) {
524 if (adjust_xml_tree (tree, old_path, new_path)) {
529 find_files_matching_filter (files, tmpdir, accept_all_files, 0, false, true, true);
531 std::map<std::string, std::string> filemap;
532 for (it = files.begin(); it != files.end(); ++it) {
533 filemap[*it] = it->substr (tmpdir.size()+1, it->size() - tmpdir.size() - 1);
536 _current_action = _("Exporting templates");
538 PBD::FileArchive ar (filename);
539 PBD::ScopedConnectionList progress_connection;
540 ar.progress.connect_same_thread (progress_connection, boost::bind (&_set_progress, this, _1, _2));
543 PBD::remove_directory (tmpdir);
547 TemplateManager::import_template_set ()
549 FileChooserDialog dialog (_("Import template archives"));
550 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
551 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
553 FileFilter archive_filter;
554 archive_filter.add_pattern (X_("*.tar.xz"));
555 archive_filter.set_name (_("Template archives"));
556 dialog.add_filter (archive_filter);
558 int result = dialog.run ();
560 if (result != RESPONSE_OK || !dialog.get_filename().length()) {
564 _current_action = _("Importing templates");
566 FileArchive ar (dialog.get_filename ());
567 PBD::ScopedConnectionList progress_connection;
568 ar.progress.connect_same_thread (progress_connection, boost::bind (&_set_progress, this, _1, _2));
569 ar.inflate (user_config_directory ());
571 vector<string> files;
572 PBD::find_files_matching_regex (files, templates_dir (), string ("\\.template$"), /* recurse = */ true);
574 vector<string>::const_iterator it;
575 for (it = files.begin(); it != files.end(); ++it) {
576 const string bn = PBD::basename_nosuffix (*it);
577 const string old_path = Glib::build_filename ("$TEMPLATEDIR", bn);
578 const string new_path = Glib::build_filename (templates_dir (), bn);
581 if (!tree.read (*it)) {
584 if (adjust_xml_tree (tree, old_path, new_path)) {
590 TemplatesImported (); /* emit signal */
594 TemplateManager::adjust_plugin_paths (XMLNode* node, const string& name, const string& new_name) const
596 bool adjusted = false;
598 const XMLNodeList& procs = node->children (X_("Processor"));
599 XMLNodeConstIterator pit;
600 for (pit = procs.begin(); pit != procs.end(); ++pit) {
601 XMLNode* lv2_node = (*pit)->child (X_("lv2"));
607 if (!lv2_node->get_property (X_("template-dir"), template_dir)) {
611 const int suffix_pos = template_dir.size() - name.size();
612 if (suffix_pos < 0) {
613 cerr << "Template name\"" << name << "\" longer than template-dir \"" << template_dir << "\", WTH?" << endl;
617 if (template_dir.compare (suffix_pos, template_dir.size(), name)) {
618 cerr << "Template name \"" << name << "\" no suffix of template-dir \"" << template_dir << "\"" << endl;
622 const string new_template_dir = template_dir.substr (0, suffix_pos) + new_name;
623 lv2_node->set_property (X_("template-dir"), new_template_dir);
632 TemplateManager::update_progress_gui (float p)
635 _progress_bar.hide ();
639 _progress_bar.show ();
640 _progress_bar.set_text (_current_action);
641 _progress_bar.set_fraction (p);
645 void SessionTemplateManager::init ()
647 vector<TemplateInfo> templates;
648 find_session_templates (templates, /* read_xml = */ true);
649 setup_model (templates);
651 _progress_bar.hide ();
654 void RouteTemplateManager::init ()
656 vector<TemplateInfo> templates;
657 find_route_templates (templates);
658 setup_model (templates);
660 _progress_bar.hide ();
666 SessionTemplateManager::rename_template (TreeModel::iterator& item, const Glib::ustring& new_name_)
668 const string old_path = item->get_value (_template_columns.path);
669 const string old_name = item->get_value (_template_columns.name);
670 const string new_name = string (new_name_);
672 const string old_file_old_path = Glib::build_filename (old_path, old_name+".template");
676 if (!tree.read(old_file_old_path)) {
677 error << string_compose (_("Could not parse template file \"%1\"."), old_file_old_path) << endmsg;
680 XMLNode* root = tree.root();
682 const XMLNode* const routes_node = root->child (X_("Routes"));
684 const XMLNodeList& routes = routes_node->children (X_("Route"));
685 XMLNodeConstIterator rit;
686 for (rit = routes.begin(); rit != routes.end(); ++rit) {
687 adjust_plugin_paths (*rit, old_name, new_name);
691 const string new_file_old_path = Glib::build_filename (old_path, new_name+".template");
693 tree.set_filename (new_file_old_path);
695 if (!tree.write ()) {
696 error << string_compose(_("Could not write to new template file \"%1\"."), new_file_old_path);
700 const string new_path = Glib::build_filename (user_template_directory (), new_name);
702 if (g_rename (old_path.c_str(), new_path.c_str()) != 0) {
703 error << string_compose (_("Could not rename template directory from \"%1\" to \"%2\": %3"),
704 old_path, new_path, strerror (errno)) << endmsg;
705 g_unlink (new_file_old_path.c_str());
709 const string old_file_new_path = Glib::build_filename (new_path, old_name+".template");
710 if (g_unlink (old_file_new_path.c_str())) {
711 error << string_compose (X_("Could not delete old template file \"%1\": %2"),
712 old_file_new_path, strerror (errno)) << endmsg;
715 item->set_value (_template_columns.name, new_name);
716 item->set_value (_template_columns.path, new_path);
720 SessionTemplateManager::delete_selected_template ()
722 if (!_current_selection) {
726 PBD::remove_directory (_current_selection->get_value (_template_columns.path));
728 _template_model->erase (_current_selection);
729 row_selection_changed ();
733 SessionTemplateManager::templates_dir () const
735 return user_template_directory ();
740 SessionTemplateManager::template_file (const TreeModel::const_iterator& item) const
742 const string path = item->get_value (_template_columns.path);
743 const string name = item->get_value (_template_columns.name);
744 return Glib::build_filename (path, name+".template");
748 SessionTemplateManager::adjust_xml_tree (XMLTree& tree, const std::string& old_name, const std::string& new_name) const
750 bool adjusted = false;
751 XMLNode* root = tree.root();
753 const XMLNode* const routes_node = root->child (X_("Routes"));
755 const XMLNodeList& routes = routes_node->children (X_("Route"));
756 XMLNodeConstIterator rit;
757 for (rit = routes.begin(); rit != routes.end(); ++rit) {
758 if (adjust_plugin_paths (*rit, old_name, new_name)) {
769 RouteTemplateManager::rename_template (TreeModel::iterator& item, const Glib::ustring& new_name)
771 const string old_name = item->get_value (_template_columns.name);
772 const string old_filepath = item->get_value (_template_columns.path);
773 const string new_filepath = Glib::build_filename (user_route_template_directory(), new_name+".template");
776 if (!tree.read (old_filepath)) {
777 error << string_compose (_("Could not parse template file \"%1\"."), old_filepath) << endmsg;
780 tree.root()->set_property (X_("name"), new_name);
781 tree.root()->children().front()->set_property (X_("name"), new_name);
783 const bool adjusted = adjust_plugin_paths (tree.root(), old_name, string (new_name));
785 const string old_state_dir = Glib::build_filename (user_route_template_directory(), old_name);
786 const string new_state_dir = Glib::build_filename (user_route_template_directory(), new_name);
789 if (g_file_test (old_state_dir.c_str(), G_FILE_TEST_EXISTS)) {
790 if (g_rename (old_state_dir.c_str(), new_state_dir.c_str()) != 0) {
791 error << string_compose (_("Could not rename state dir \"%1\" to \"%22\": %3"), old_state_dir, new_state_dir, strerror (errno)) << endmsg;
797 tree.set_filename (new_filepath);
799 if (!tree.write ()) {
800 error << string_compose(_("Could not write new template file \"%1\"."), new_filepath) << endmsg;
802 g_rename (new_state_dir.c_str(), old_state_dir.c_str());
807 if (g_unlink (old_filepath.c_str()) != 0) {
808 error << string_compose (_("Could not remove old template file \"%1\": %2"), old_filepath, strerror (errno)) << endmsg;
811 item->set_value (_template_columns.name, string (new_name));
812 item->set_value (_template_columns.path, new_filepath);
816 RouteTemplateManager::delete_selected_template ()
818 if (!_current_selection) {
822 const string file_path = _current_selection->get_value (_template_columns.path);
824 if (g_unlink (file_path.c_str()) != 0) {
825 error << string_compose(_("Could not delete template file \"%1\": %2"), file_path, strerror (errno)) << endmsg;
828 PBD::remove_directory (Glib::build_filename (user_route_template_directory (),
829 _current_selection->get_value (_template_columns.name)));
831 _template_model->erase (_current_selection);
832 row_selection_changed ();
836 RouteTemplateManager::templates_dir () const
838 return user_route_template_directory ();
843 RouteTemplateManager::template_file (const TreeModel::const_iterator& item) const
845 return item->get_value (_template_columns.path);
849 RouteTemplateManager::adjust_xml_tree (XMLTree& tree, const std::string& old_name, const std::string& new_name) const
851 return adjust_plugin_paths (tree.root(), old_name, string (new_name));