mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
New session dialog defaults to the 'best' templates directory, clearing template file now works.
git-svn-id: svn://localhost/trunk/ardour2@496 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3732decd72
commit
62198e9c27
3 changed files with 22 additions and 4 deletions
|
|
@ -86,9 +86,14 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
|
|||
|
||||
}
|
||||
|
||||
std::string path = ARDOUR::find_config_file (X_("templates"));
|
||||
if (path != "") {
|
||||
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);
|
||||
m_new_session_dialog->set_default_response (Gtk::RESPONSE_OK);
|
||||
m_notebook->show_all_children();
|
||||
m_notebook->set_current_page(0);
|
||||
|
||||
|
|
@ -105,6 +110,7 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
|
|||
m_treeview->get_selection()->signal_changed().connect (mem_fun (*this, &NewSessionDialog::treeview_selection_changed));
|
||||
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));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -253,6 +259,7 @@ void
|
|||
NewSessionDialog::reset_name()
|
||||
{
|
||||
m_name->set_text(Glib::ustring());
|
||||
m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -318,17 +325,27 @@ NewSessionDialog::file_chosen ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
NewSessionDialog::template_chosen ()
|
||||
{
|
||||
if (m_template->get_filename() != "" ) {;
|
||||
m_new_session_dialog->set_response_sensitive (0, true);
|
||||
} else {
|
||||
m_new_session_dialog->set_response_sensitive (0, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col)
|
||||
{
|
||||
m_new_session_dialog->response (Gtk::RESPONSE_YES);
|
||||
}
|
||||
|
||||
/// @todo
|
||||
void
|
||||
NewSessionDialog::reset_template()
|
||||
{
|
||||
|
||||
m_template->set_filename("");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue