add back-pointer to TempoMap from points, and push dirty=true into map
[ardour.git] / gtk2_ardour / session_dialog.cc
index a41078c49a1a83e0d5396dad3efbac26e83d6520..8ad6e2d38834a64ba6a2cc830fa9fa99b5747e70 100644 (file)
@@ -221,8 +221,11 @@ SessionDialog::meta_master_bus_profile (std::string script_path) const
                err = lua.do_file (script_path);
        } catch (luabridge::LuaException const& e) {
                err = -1;
+       }  catch (...) {
+               err = -1;
        }
 
+
        if (err) {
                return UINT32_MAX;
        }
@@ -262,6 +265,11 @@ SessionDialog::master_channel_count ()
 bool
 SessionDialog::use_session_template () const
 {
+       if (!back_button->sensitive () && !new_only) {
+               /* open session -- not create a new one */
+               return false;
+       }
+
        if (!load_template_override.empty()) {
                return true;
        }
@@ -366,7 +374,11 @@ SessionDialog::setup_recent_sessions ()
        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);
+#ifdef MIXBUS
+       recent_session_display.append_column (_("Created With"), recent_session_columns.created_with);
+#else
        recent_session_display.append_column (_("File Resolution"), recent_session_columns.disk_format);
+#endif
        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);
@@ -561,24 +573,25 @@ SessionDialog::populate_session_templates ()
 
        template_model->clear ();
 
-       //Add any Lua scripts (factory templates) found in the scripts folder
+       /* Add Lua Scripts dedicated to session-setup */
        LuaScriptList& ms (LuaScripting::instance ().scripts (LuaScriptInfo::SessionInit));
        for (LuaScriptList::const_iterator s = ms.begin(); s != ms.end(); ++s) {
                TreeModel::Row row = *(template_model->append ());
-               row[session_template_columns.name] = "Meta: " + (*s)->name;
+               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}");
        }
 
+       /* 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) {
                if (!((*s)->subtype & LuaScriptInfo::SessionSetup)) {
                        continue;
                }
                TreeModel::Row row = *(template_model->append ());
-               row[session_template_columns.name] = "Meta: " + (*s)->name;
+               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}");
@@ -604,8 +617,8 @@ SessionDialog::populate_session_templates ()
        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] = _("{Factory Template}");
-       row[session_template_columns.created_with_long] = _("{Factory Template}");
+       row[session_template_columns.created_with_short] = _("");
+       row[session_template_columns.created_with_long] = _("");
 
        //auto-select the first item in the list
        Gtk::TreeModel::Row first = template_model->children()[0];
@@ -854,6 +867,7 @@ SessionDialog::redisplay_recent_sessions ()
                        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.created_with] = program_version;
                }
 
                ++session_snapshot_count;