summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2009-08-27 18:12:00 +0000
committerBen Loftis <ben@glw.com>2009-08-27 18:12:00 +0000
commit5d3fa897277ad087a817007a1a9b640771c86088 (patch)
tree3915257d1677b9703919448a78ed64131331cb88
parentfaeffc40bcd5b965fe13d95deccc31a01381ee7e (diff)
add shortcuts to both SYSTEM and USER templates folder.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5599 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/new_session_dialog.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc
index 023b6063ba..f7634c8458 100644
--- a/gtk2_ardour/new_session_dialog.cc
+++ b/gtk2_ardour/new_session_dialog.cc
@@ -399,20 +399,21 @@ NewSessionDialog::NewSessionDialog()
const char * const template_dir_name = X_("templates");
- if (!path.empty()) {
- string user_template_path = path + template_dir_name;
-
- if (Glib::file_test(user_template_path, Glib::FILE_TEST_IS_DIR))
- {
- m_template->set_current_folder (user_template_path);
- }
+ //if SYSTEM template folder exists, add it to the file chooser
+ const std::string sys_templates_path = ARDOUR::get_system_data_path() + template_dir_name;
+printf("system template path = %s\n", sys_templates_path.c_str());
+ if (Glib::file_test(sys_templates_path, Glib::FILE_TEST_IS_DIR))
+ {
+ m_template->add_shortcut_folder(sys_templates_path);
+ m_template->set_current_folder (sys_templates_path);
}
- const std::string sys_templates_dir = ARDOUR::get_system_data_path() + template_dir_name;
-
- if (Glib::file_test(sys_templates_dir, Glib::FILE_TEST_IS_DIR))
+ //if USER template folder exists, add it to the file chooser
+ const std::string user_template_path = ARDOUR::get_user_ardour_path() + template_dir_name;
+ if (Glib::file_test(user_template_path, Glib::FILE_TEST_IS_DIR))
{
- m_template->add_shortcut_folder(sys_templates_dir);
+ m_template->add_shortcut_folder(user_template_path);
+ m_template->set_current_folder (user_template_path);
}
m_template->set_title(_("select template"));