Add Status-bar snapshot name & modified indicator

This commit is contained in:
Robin Gareus
2020-10-01 18:27:59 +02:00
parent c8df8418dc
commit 5f6aa7ffdb
3 changed files with 14 additions and 1 deletions

View File

@@ -624,6 +624,8 @@ private:
Gtk::Label session_path_label;
void update_path_label ();
Gtk::Label snapshot_name_label;
void every_second ();
void every_point_one_seconds ();
void every_point_zero_something_seconds ();

View File

@@ -971,6 +971,11 @@ ARDOUR_UI::toggle_follow_edits ()
void
ARDOUR_UI::update_title ()
{
stringstream snap_label;
snap_label << X_("<span weight=\"ultralight\">")
<< _("Name")
<< X_("</span>: ");
if (_session) {
bool dirty = _session->dirty();
@@ -989,10 +994,13 @@ ARDOUR_UI::update_title ()
WindowTitle title (session_name);
title += Glib::get_application_name();
_main_window.set_title (title.get_string());
snap_label << Gtkmm2ext::markup_escape_text (session_name);
} else {
WindowTitle title (Glib::get_application_name());
_main_window.set_title (title.get_string());
snap_label << "-";
}
snapshot_name_label.set_markup (snap_label.str());
}

View File

@@ -745,6 +745,7 @@ ARDOUR_UI::build_menu_bar ()
sample_rate_label.set_use_markup ();
format_label.set_name ("Format");
session_path_label.set_name ("Path");
snapshot_name_label.set_name ("Name");
format_label.set_use_markup ();
ev_dsp->add (dsp_load_label);
@@ -774,6 +775,7 @@ ARDOUR_UI::build_menu_bar ()
hbox->pack_end (*ev_timecode, false, false, 6);
hbox->pack_end (*ev_format, false, false, 6);
hbox->pack_end (peak_thread_work_label, false, false, 6);
hbox->pack_end (snapshot_name_label, false, false, 6);
hbox->pack_end (*ev_path, false, false, 6);
menu_hbox.pack_end (*ev, true, true, 2);
@@ -782,6 +784,7 @@ ARDOUR_UI::build_menu_bar ()
menu_bar_base.add (menu_hbox);
_status_bar_visibility.add (&session_path_label ,X_("Path"), _("Path to Session"), false);
_status_bar_visibility.add (&snapshot_name_label ,X_("Name"), _("Snapshot Name and Modified Indicator"), false);
_status_bar_visibility.add (&peak_thread_work_label,X_("Peakfile"), _("Active Peak-file Work"), false);
_status_bar_visibility.add (&format_label, X_("Format"), _("File Format"), false);
_status_bar_visibility.add (&timecode_format_label, X_("TCFormat"), _("Timecode Format"), false);