diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-20 18:16:32 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-20 18:16:32 +0100 |
commit | 17881b3221311bbf90afa951d2f29194e1f0ad35 (patch) | |
tree | 179b242a3614cd632dc59d936889800abc883702 /gtk2_ardour/session_dialog.cc | |
parent | bbe62da55a5fb06ba39e02c9671a94ab6e24bb08 (diff) |
update UI, new info API, display created_version in tooltip
Diffstat (limited to 'gtk2_ardour/session_dialog.cc')
-rw-r--r-- | gtk2_ardour/session_dialog.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 5ad245eeb5..71df823ee0 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -734,6 +734,7 @@ SessionDialog::redisplay_recent_sessions () float sr; SampleFormat sf; + std::string created_version; std::string state_file_basename; @@ -755,10 +756,9 @@ SessionDialog::redisplay_recent_sessions () g_stat (s.c_str(), &gsb); row[recent_session_columns.fullpath] = s; - row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname); row[recent_session_columns.time_modified] = gsb.st_mtime; - if (Session::get_info_from_path (s, sr, sf) == 0) { + if (Session::get_info_from_path (s, sr, sf, created_version) == 0) { row[recent_session_columns.sample_rate] = rate_as_string (sr); switch (sf) { case FormatFloat: @@ -776,6 +776,12 @@ SessionDialog::redisplay_recent_sessions () row[recent_session_columns.disk_format] = "--"; } + if (created_version.empty()) { + row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname); + } else { + row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname + "\n" + created_version); + } + ++session_snapshot_count; if (state_file_names.size() > 1) { @@ -794,7 +800,11 @@ SessionDialog::redisplay_recent_sessions () child_row[recent_session_columns.visible_name] = *i2; child_row[recent_session_columns.fullpath] = s; - child_row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname); + if (created_version.empty()) { + child_row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname); + } else { + child_row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname + "\n" + created_version); + } g_stat (s.c_str(), &gsb); child_row[recent_session_columns.time_modified] = gsb.st_mtime; @@ -805,7 +815,7 @@ SessionDialog::redisplay_recent_sessions () most_recent = gsb.st_mtime; } #if 0 - if (Session::get_info_from_path (s, sr, sf) == 0) { + if (Session::get_info_from_path (s, sr, sf, created_version) == 0) { child_row[recent_session_columns.sample_rate] = rate_as_string (sr); switch (sf) { case FormatFloat: |