Be more sane about finding default template path.

git-svn-id: svn://localhost/trunk/ardour2@497 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge
2006-05-11 18:37:40 +00:00
parent 62198e9c27
commit 1268a8ab5f
2 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
#export G_DEBUG=fatal_criticals
export ARDOUR_PATH=./glade:./pixmaps:`pwd`:`cd ../ && pwd`
export ARDOUR_PATH=./glade:./pixmaps:.:..
export LD_LIBRARY_PATH=../libs/ardour:../libs/midi++2:../libs/pbd3:../libs/soundtouch:../libs/gtkmm2ext:../libs/sigc++2:../libs/glibmm2:../libs/gtkmm2/atk:../libs/gtkmm2/pango:../libs/gtkmm2/gdk:../libs/gtkmm2/gtk:../libs/libgnomecanvasmm:../libs/libglademm:$LD_LIBRARY_PATH

View File

@@ -85,12 +85,13 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
m_treeview->get_selection()->set_mode (Gtk::SELECTION_SINGLE);
}
std::string path = ARDOUR::find_config_file (X_("templates"));
if (path != "") {
std::string path = ARDOUR::get_user_ardour_path() + X_("templates/");
if (path == Glib::ustring()) {
path = ARDOUR::get_system_data_path() + X_("templates/");
}
if (path != Glib::ustring()) {
m_template->set_current_folder (path);
}
m_template->set_show_hidden (true);
m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false);
m_new_session_dialog->set_response_sensitive (0, false);
@@ -111,6 +112,7 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
m_treeview->signal_row_activated().connect (mem_fun (*this, &NewSessionDialog::recent_row_activated));
m_open_filechooser->signal_selection_changed ().connect (mem_fun (*this, &NewSessionDialog::file_chosen));
m_template->signal_selection_changed ().connect (mem_fun (*this, &NewSessionDialog::template_chosen));
m_name->grab_focus();
}
void