View Issue Details

IDProjectCategoryView StatusLast Update
0001345ardourbugspublic2008-11-20 23:50
Reportertimbyr Assigned Topaul  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0001345: Error dialog is displayed when starting ardour2 if directory ~/.ardour/templates doesn't exist
DescriptionAnnoying dialog always pops up unless ~/.ardour/templates exists containing the message "The folder contents could not be displayed"

error accessing 'file:///home/timbyr/.ardour2/templates': File not found

As I believe this directory will not be created until a template is saved it means that new users of ardour will always see this message which doesn't seem to be a great first impression.

A Patch is attached that should fix the issue by only setting the current folder of the template file chooser button if the user template directory exists.
TagsNo tags attached.

Activities

2006-12-02 13:13

 

non-existant-user-template-dir.patch (1,270 bytes)   
Index: gtk2_ardour/new_session_dialog.cc
===================================================================
--- gtk2_ardour/new_session_dialog.cc	(revision 1185)
+++ gtk2_ardour/new_session_dialog.cc	(working copy)
@@ -357,17 +357,29 @@
 	m_treeview->get_selection()->set_mode (Gtk::SELECTION_SINGLE);
 
 	std::string path = ARDOUR::get_user_ardour_path();
+	
 	if (path.empty()) {
 	        path = ARDOUR::get_system_data_path();
 	}
+
+	const char * const template_dir_name = X_("templates");
+
 	if (!path.empty()) {
-	        m_template->set_current_folder (path + X_("templates/"));
+		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);
+		}
 	}
 
-	const std::string sys_templates_dir = ARDOUR::get_system_data_path() + X_("templates");
+	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))
+	{
 		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"));

timbyr

2006-12-02 13:15

developer   ~0002844

I think this may only be an issue with recent versions of gtk+(2.10ish)

paul

2006-12-20 21:06

administrator   ~0002943

patch applied. to be committed soon.

Issue History

Date Modified Username Field Change
2006-12-02 13:13 timbyr New Issue
2006-12-02 13:13 timbyr File Added: non-existant-user-template-dir.patch
2006-12-02 13:15 timbyr Note Added: 0002844
2006-12-20 21:06 paul Status new => resolved
2006-12-20 21:06 paul Resolution open => fixed
2006-12-20 21:06 paul Assigned To => paul
2006-12-20 21:06 paul Note Added: 0002943
2008-11-20 23:50 seablade Status resolved => closed