From 17881b3221311bbf90afa951d2f29194e1f0ad35 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 20 Jan 2017 18:16:32 +0100 Subject: update UI, new info API, display created_version in tooltip --- gtk2_ardour/session_dialog.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour') 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: -- cgit v1.2.3