recent_session_display.set_model (recent_session_model);
recent_session_display.append_column (_("Session Name"), recent_session_columns.visible_name);
recent_session_display.append_column (_("Sample Rate"), recent_session_columns.sample_rate);
recent_session_display.set_model (recent_session_model);
recent_session_display.append_column (_("Session Name"), recent_session_columns.visible_name);
recent_session_display.append_column (_("Sample Rate"), recent_session_columns.sample_rate);
recent_session_display.append_column (_("Last Modified"), recent_session_columns.time_formatted);
recent_session_display.set_headers_visible (true);
recent_session_display.get_selection()->set_mode (SELECTION_SINGLE);
recent_session_display.append_column (_("Last Modified"), recent_session_columns.time_formatted);
recent_session_display.set_headers_visible (true);
recent_session_display.get_selection()->set_mode (SELECTION_SINGLE);
archive_filter.set_name (_("Session Archives"));
existing_session_chooser.add_filter (archive_filter);
archive_filter.set_name (_("Session Archives"));
existing_session_chooser.add_filter (archive_filter);
- //Add any Lua scripts (factory templates) found in the scripts folder
+ /* Get Lua Scripts dedicated to session-setup */
+ LuaScriptList scripts (LuaScripting::instance ().scripts (LuaScriptInfo::SessionInit));
+
+ /* Add Lua Action Scripts which can also be used for session-setup */
LuaScriptList& as (LuaScripting::instance ().scripts (LuaScriptInfo::EditorAction));
for (LuaScriptList::const_iterator s = as.begin(); s != as.end(); ++s) {
LuaScriptList& as (LuaScripting::instance ().scripts (LuaScriptInfo::EditorAction));
for (LuaScriptList::const_iterator s = as.begin(); s != as.end(); ++s) {
- TreeModel::Row row;
- row = *(template_model->append ());
+ }
+
+ std::sort (scripts.begin(), scripts.end(), LuaScripting::Sorter());
+
+ for (LuaScriptList::const_iterator s = scripts.begin(); s != scripts.end(); ++s) {
+ TreeModel::Row row = *(template_model->append ());
row[session_template_columns.name] = (*s)->name;
row[session_template_columns.path] = "urn:ardour:" + (*s)->path;
row[session_template_columns.description] = (*s)->description;
row[session_template_columns.name] = (*s)->name;
row[session_template_columns.path] = "urn:ardour:" + (*s)->path;
row[session_template_columns.description] = (*s)->description;
- row[session_template_columns.created_with_short] = _("{Factory Template}");
- row[session_template_columns.created_with_long] = _("{Factory Template}");
+ row[session_template_columns.modified_with_short] = _("{Factory Template}");
+ row[session_template_columns.modified_with_long] = _("{Factory Template}");
//Add any "template sessions" found in the user's preferences folder
for (vector<TemplateInfo>::iterator x = templates.begin(); x != templates.end(); ++x) {
TreeModel::Row row;
//Add any "template sessions" found in the user's preferences folder
for (vector<TemplateInfo>::iterator x = templates.begin(); x != templates.end(); ++x) {
TreeModel::Row row;
row[session_template_columns.name] = (*x).name;
row[session_template_columns.path] = (*x).path;
row[session_template_columns.description] = (*x).description;
row[session_template_columns.name] = (*x).name;
row[session_template_columns.path] = (*x).path;
row[session_template_columns.description] = (*x).description;
- row[session_template_columns.created_with_long] = (*x).created_with;
- row[session_template_columns.created_with_short] = (*x).created_with.substr(0, (*x).created_with.find(" "));
+ row[session_template_columns.modified_with_long] = (*x).modified_with;
+ row[session_template_columns.modified_with_short] = (*x).modified_with.substr(0, (*x).modified_with.find(" "));
}
//Add an explicit 'Empty Template' item
TreeModel::Row row = *template_model->prepend ();
row[session_template_columns.name] = (_("Empty Template"));
row[session_template_columns.path] = string();
}
//Add an explicit 'Empty Template' item
TreeModel::Row row = *template_model->prepend ();
row[session_template_columns.name] = (_("Empty Template"));
row[session_template_columns.path] = string();
- row[session_template_columns.description] = _("An empty session with factory default settings.");
- row[session_template_columns.created_with_short] = _("");
- row[session_template_columns.created_with_long] = _("");
+ row[session_template_columns.description] = _("An empty session with factory default settings.\n\nSelect this option if you are importing files to mix.");
+ row[session_template_columns.modified_with_short] = _("");
+ row[session_template_columns.modified_with_long] = _("");
//determine the text in the new folder selector
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
new_folder_chooser.set_current_folder (poor_mans_glob (Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name)));
//determine the text in the new folder selector
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
new_folder_chooser.set_current_folder (poor_mans_glob (Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name)));
// point the new session file chooser at the parent directory of the current session
string session_parent_dir = Glib::path_get_dirname(ARDOUR_UI::instance()->the_session()->path());
new_folder_chooser.set_current_folder (session_parent_dir);
// point the new session file chooser at the parent directory of the current session
string session_parent_dir = Glib::path_get_dirname(ARDOUR_UI::instance()->the_session()->path());
new_folder_chooser.set_current_folder (session_parent_dir);
template_chooser.set_model (template_model);
template_chooser.append_column (_("Template"), session_template_columns.name);
#ifdef MIXBUS
template_chooser.set_model (template_model);
template_chooser.append_column (_("Template"), session_template_columns.name);
#ifdef MIXBUS
template_chooser.set_headers_visible (true);
template_chooser.get_selection()->set_mode (SELECTION_SINGLE);
template_chooser.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &SessionDialog::template_row_selected));
template_chooser.set_sensitive (true);
template_chooser.set_headers_visible (true);
template_chooser.get_selection()->set_mode (SELECTION_SINGLE);
template_chooser.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &SessionDialog::template_row_selected));
template_chooser.set_sensitive (true);
session_new_vbox.pack_start (*template_hbox, true, true);
session_new_vbox.pack_start (*folder_box, false, true);
session_new_vbox.pack_start (*template_hbox, true, true);
session_new_vbox.pack_start (*folder_box, false, true);
row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname);
} else {
row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname + "\n" + string_compose (_("Last modified with: %1"), program_version));
row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname);
} else {
row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname + "\n" + string_compose (_("Last modified with: %1"), program_version));
Gtk::TreeModel::Path tpath = recent_session_model->get_path(iter);
const bool is_child = tpath.up () && tpath.up ();
Gtk::TreeModel::Path tpath = recent_session_model->get_path(iter);
const bool is_child = tpath.up () && tpath.up ();
MenuList& items = m->items ();
items.push_back (MenuElem (s, sigc::bind (sigc::hide_return (sigc::ptr_fun (&PBD::open_folder)), s)));
if (!is_child) {
MenuList& items = m->items ();
items.push_back (MenuElem (s, sigc::bind (sigc::hide_return (sigc::ptr_fun (&PBD::open_folder)), s)));
if (!is_child) {