summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-15 06:37:32 +0000
committerDavid Robillard <d@drobilla.net>2006-06-15 06:37:32 +0000
commit5de93617e3a3b4e8fb488e4d50f2036b9cd54377 (patch)
treeed5aaf964cc87a4333b65c94d6adcf75384cc5f3
parent952be81efe150e37edbeff07a9b69ddb9c94b72a (diff)
Check for templates dir existence before adding bookmark
git-svn-id: svn://localhost/ardour2/trunk@604 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/new_session_dialog.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc
index 8889b9cd62..d1059cebe0 100644
--- a/gtk2_ardour/new_session_dialog.cc
+++ b/gtk2_ardour/new_session_dialog.cc
@@ -302,7 +302,11 @@ NewSessionDialog::NewSessionDialog()
if (!path.empty()) {
m_template->set_current_folder (path + X_("templates/"));
}
- m_template->add_shortcut_folder(ARDOUR::get_system_data_path() + X_("templates"));
+
+ const std::string sys_templates_dir = ARDOUR::get_system_data_path() + X_("templates");
+ if (Glib::file_test(sys_templates_dir, Glib::FILE_TEST_IS_DIR))
+ m_template->add_shortcut_folder(sys_templates_dir);
+
m_template->set_title(_("select template"));
Gtk::FileFilter* session_filter = manage (new (Gtk::FileFilter));
session_filter->add_pattern(X_("*.ardour"));