diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index e987cfbe4e..1b646099d7 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -253,6 +253,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void on_timecode_source_dropdown_item_clicked (WavesDropdown*, int); void populate_timecode_source_dropdown (); void update_timecode_source_dropdown_items (); + void set_mtc_indicator_active (bool set_active); + void hide_mtc_indicator (); void update_bit_depth_button (); void update_sample_rate_dropdown (); @@ -786,6 +788,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr Gtk::Label* _dsp_load_label; Gtk::Label* _hd_load_label; Gtk::Label* _hd_remained_time_label; + + Gtk::Image* _mtc_idle_icon; + Gtk::Image* _mtc_sync_icon; /** A ProcessThread so that we have some thread-local buffers for use by * PluginEqGui::impulse_analysis (). diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 88030dfd72..5406189db1 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -92,7 +92,9 @@ ARDOUR_UI::create_editor () _sample_rate_dropdown = &editor->get_waves_dropdown("sample_rate_dropdown"); _display_format_dropdown = &editor->get_waves_dropdown("display_format_dropdown"); _timecode_source_dropdown = &editor->get_waves_dropdown("timecode_selector_dropdown"); - + _mtc_idle_icon = &editor->get_image("mtc_idle_icon"); + _mtc_sync_icon = &editor->get_image("mtc_sync_icon"); + _tracks_button = &editor->get_waves_button("tracks_button"); } @@ -204,6 +206,20 @@ ARDOUR_UI::update_timecode_source_dropdown_items() } } +void +ARDOUR_UI::set_mtc_indicator_active (bool set_active) +{ + _mtc_sync_icon->set_visible (set_active); + _mtc_idle_icon->set_visible (!set_active); +} + +void +ARDOUR_UI::hide_mtc_indicator () +{ + _mtc_sync_icon->set_visible (false); + _mtc_idle_icon->set_visible (false); +} + void ARDOUR_UI::on_display_format_dropdown_item_clicked (WavesDropdown* dropdown, int el_number) { diff --git a/gtk2_ardour/icons/mtc_idle.png b/gtk2_ardour/icons/mtc_idle.png new file mode 100644 index 0000000000..8bc246c03e Binary files /dev/null and b/gtk2_ardour/icons/mtc_idle.png differ diff --git a/gtk2_ardour/icons/mtc_sync.png b/gtk2_ardour/icons/mtc_sync.png new file mode 100644 index 0000000000..ff1a3f166f Binary files /dev/null and b/gtk2_ardour/icons/mtc_sync.png differ diff --git a/gtk2_ardour/ui/editor_window.xml b/gtk2_ardour/ui/editor_window.xml index bde6fdc6b0..fc62b2eac3 100644 --- a/gtk2_ardour/ui/editor_window.xml +++ b/gtk2_ardour/ui/editor_window.xml @@ -140,6 +140,23 @@ box.expand="true"> + + + + +