13
0

Update GUI, session-format notifications, skip unusable in recent list

This commit is contained in:
Robin Gareus 2017-08-17 18:52:07 +02:00
parent 22055a07c0
commit 8ecbf0486f
2 changed files with 11 additions and 5 deletions

View File

@ -3702,7 +3702,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
}
catch (SessionException e) {
MessageDialog msg (string_compose(
_("Session \"%1 (snapshot %2)\" did not load successfully: %3"),
_("Session \"%1 (snapshot %2)\" did not load successfully:\n%3"),
path, snap_name, e.what()),
true,
Gtk::MESSAGE_INFO,
@ -3723,7 +3723,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
catch (...) {
MessageDialog msg (string_compose(
_("Session \"%1 (snapshot %2)\" did not load successfully"),
_("Session \"%1 (snapshot %2)\" did not load successfully."),
path, snap_name),
true,
Gtk::MESSAGE_INFO,

View File

@ -780,8 +780,6 @@ SessionDialog::redisplay_recent_sessions ()
continue;
}
Gtk::TreeModel::Row row = *(recent_session_model->append());
float sr;
SampleFormat sf;
std::string program_version;
@ -802,13 +800,21 @@ SessionDialog::redisplay_recent_sessions ()
std::string s = Glib::build_filename (dirname, state_file_basename + statefile_suffix);
int err = Session::get_info_from_path (s, sr, sf, program_version);
if (err < 0) {
// XML cannot be parsed, or unsuppored version
continue;
}
GStatBuf gsb;
g_stat (s.c_str(), &gsb);
Gtk::TreeModel::Row row = *(recent_session_model->append());
row[recent_session_columns.fullpath] = s;
row[recent_session_columns.time_modified] = gsb.st_mtime;
if (Session::get_info_from_path (s, sr, sf, program_version) == 0) {
if (err == 0) {
row[recent_session_columns.sample_rate] = rate_as_string (sr);
switch (sf) {
case FormatFloat: