diff options
author | Robin Gareus <robin@gareus.org> | 2020-03-30 00:14:25 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-03-30 00:14:25 +0200 |
commit | e43cc9c7bbe8ca05f6a130e5a71bc6f7e19a2d03 (patch) | |
tree | 7f9b9ca064a28cf7a86bad8418eb483a79489717 | |
parent | 96b2b359639df7b35063ab720d9dd5c68714b75c (diff) |
Statusbar: add session-path display
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 13 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 3 |
4 files changed, 21 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 841f3198d3..e8524c6a4d 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1276,6 +1276,19 @@ ARDOUR_UI::update_format () } void +ARDOUR_UI::update_path_label () +{ + stringstream s; + s << X_("<span weight=\"ultralight\">") << _("Path") << X_("</span>: "); + if (_session) { + s << Gtkmm2ext::markup_escape_text (_session->path()); + } else { + s << "-"; + } + session_path_label.set_markup (s.str ()); +} + +void ARDOUR_UI::update_cpu_load () { const unsigned int x = _session ? _session->get_xrun_count () : 0; diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 19e7fc55dc..233d44ef95 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -613,6 +613,9 @@ private: Gtk::Label format_label; void update_format (); + Gtk::Label session_path_label; + void update_path_label (); + void every_second (); void every_point_one_seconds (); void every_point_zero_something_seconds (); diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 51ffd894af..c3e441db90 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -121,6 +121,8 @@ ARDOUR_UI::set_session (Session *s) virtual_keyboard_window->set_session (s); } + update_path_label (); + if (!_session) { WM::Manager::instance().set_session (s); /* Session option editor cannot exist across change-of-session */ diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index ecfb5d82ac..58f3e4162e 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -730,6 +730,7 @@ ARDOUR_UI::build_menu_bar () sample_rate_label.set_name ("SampleRate"); sample_rate_label.set_use_markup (); format_label.set_name ("Format"); + session_path_label.set_name ("Path"); format_label.set_use_markup (); #ifdef __APPLE__ @@ -747,12 +748,14 @@ ARDOUR_UI::build_menu_bar () hbox->pack_end (timecode_format_label, false, false, 6); hbox->pack_end (format_label, false, false, 6); hbox->pack_end (peak_thread_work_label, false, false, 6); + hbox->pack_end (session_path_label, false, false, 6); menu_hbox.pack_end (*ev, true, true, 2); menu_bar_base.set_name ("MainMenuBar"); menu_bar_base.add (menu_hbox); + _status_bar_visibility.add (&session_path_label ,X_("Path"), _("Path to Session"), 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); |