From fc1e7dbb55939c708ce572d3a5c2518ea926a682 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sun, 4 Jan 2015 21:18:48 +0700 Subject: Move DPIReset and ColorsChanged signals into UIConfiguration --- gtk2_ardour/ardour_button.cc | 7 +++---- gtk2_ardour/ardour_display.cc | 1 - gtk2_ardour/ardour_dropdown.cc | 1 - gtk2_ardour/ardour_knob.cc | 3 +-- gtk2_ardour/ardour_ui.cc | 3 +-- gtk2_ardour/audio_clock.cc | 5 ++--- gtk2_ardour/automation_streamview.cc | 3 +-- gtk2_ardour/automation_time_axis.cc | 3 +-- gtk2_ardour/editor_canvas.cc | 3 +-- gtk2_ardour/gain_meter.cc | 5 ++--- gtk2_ardour/global_signals.h | 30 ------------------------------ gtk2_ardour/group_tabs.cc | 3 +-- gtk2_ardour/level_meter.cc | 3 +-- gtk2_ardour/meter_strip.cc | 9 ++++----- gtk2_ardour/meterbridge.cc | 5 ++--- gtk2_ardour/midi_streamview.cc | 3 +-- gtk2_ardour/mono_panner.cc | 3 +-- gtk2_ardour/panner2d.cc | 3 +-- gtk2_ardour/panner_interface.cc | 1 - gtk2_ardour/region_view.cc | 3 +-- gtk2_ardour/route_time_axis.cc | 3 +-- gtk2_ardour/stereo_panner.cc | 3 +-- gtk2_ardour/streamview.cc | 3 +-- gtk2_ardour/theme_manager.cc | 7 +------ gtk2_ardour/time_axis_view.cc | 3 +-- gtk2_ardour/ui_config.cc | 19 +++++++++++-------- gtk2_ardour/ui_config.h | 4 ++++ gtk2_ardour/verbose_cursor.cc | 3 +-- 28 files changed, 45 insertions(+), 97 deletions(-) delete mode 100644 gtk2_ardour/global_signals.h (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index c06c3629a5..7dca32e689 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -38,7 +38,6 @@ #include "ardour_button.h" #include "ardour_ui.h" -#include "global_signals.h" #include "i18n.h" @@ -96,7 +95,7 @@ ArdourButton::ArdourButton (Element e) , _update_colors (true) , _pattern_height (0) { - ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler)); } ArdourButton::ArdourButton (const std::string& str, Element e) @@ -135,8 +134,8 @@ ArdourButton::ArdourButton (const std::string& str, Element e) , _pattern_height (0) { set_text (str); - ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler)); - ARDOUR_UI_UTILS::DPIReset.connect (sigc::mem_fun (*this, &ArdourButton::on_name_changed)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &ArdourButton::on_name_changed)); } ArdourButton::~ArdourButton() diff --git a/gtk2_ardour/ardour_display.cc b/gtk2_ardour/ardour_display.cc index 40fe30899a..8a0c2fed74 100644 --- a/gtk2_ardour/ardour_display.cc +++ b/gtk2_ardour/ardour_display.cc @@ -36,7 +36,6 @@ #include "ardour_display.h" #include "ardour_ui.h" -#include "global_signals.h" #include "i18n.h" diff --git a/gtk2_ardour/ardour_dropdown.cc b/gtk2_ardour/ardour_dropdown.cc index 29efe34da3..25338cc620 100644 --- a/gtk2_ardour/ardour_dropdown.cc +++ b/gtk2_ardour/ardour_dropdown.cc @@ -35,7 +35,6 @@ #include "ardour_dropdown.h" #include "ardour_ui.h" -#include "global_signals.h" #include "i18n.h" diff --git a/gtk2_ardour/ardour_knob.cc b/gtk2_ardour/ardour_knob.cc index 17fbff2f7e..5cb671b465 100644 --- a/gtk2_ardour/ardour_knob.cc +++ b/gtk2_ardour/ardour_knob.cc @@ -36,7 +36,6 @@ #include "ardour_knob.h" #include "ardour_ui.h" -#include "global_signals.h" #include "timers.h" #include "canvas/colors.h" @@ -66,7 +65,7 @@ ArdourKnob::ArdourKnob (Element e, Flags flags) , _flags (flags) , _tooltip (this) { - ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourKnob::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourKnob::color_handler)); // watch automation :( Timers::rapid_connect (sigc::mem_fun (*this, &ArdourKnob::controllable_changed)); diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 52b088a95b..5486daf431 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -115,7 +115,6 @@ typedef uint64_t microseconds_t; #include "export_video_dialog.h" #include "export_video_infobox.h" #include "gain_meter.h" -#include "global_signals.h" #include "global_port_matrix.h" #include "gui_object.h" #include "gui_thread.h" @@ -445,7 +444,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir, UIConfi _process_thread = new ProcessThread (); _process_thread->init (); - DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets)); attach_to_engine (); } diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index b64e54e95e..528d917894 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -39,7 +39,6 @@ #include "ardour_ui.h" #include "audio_clock.h" -#include "global_signals.h" #include "utils.h" #include "keyboard.h" #include "gui_thread.h" @@ -121,8 +120,8 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string& clocks.push_back (this); } - ColorsChanged.connect (sigc::mem_fun (*this, &AudioClock::set_colors)); - DPIReset.connect (sigc::mem_fun (*this, &AudioClock::dpi_reset)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &AudioClock::set_colors)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &AudioClock::dpi_reset)); } AudioClock::~AudioClock () diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc index 7eaec7cae4..fc53054bce 100644 --- a/gtk2_ardour/automation_streamview.cc +++ b/gtk2_ardour/automation_streamview.cc @@ -34,7 +34,6 @@ #include "automation_region_view.h" #include "automation_streamview.h" #include "automation_time_axis.h" -#include "global_signals.h" #include "gui_thread.h" #include "public_editor.h" #include "region_selection.h" @@ -61,7 +60,7 @@ AutomationStreamView::AutomationStreamView (AutomationTimeAxisView& tv) color_handler (); - ColorsChanged.connect(sigc::mem_fun(*this, &AutomationStreamView::color_handler)); + UIConfiguration::ColorsChanged.connect(sigc::mem_fun(*this, &AutomationStreamView::color_handler)); } AutomationStreamView::~AutomationStreamView () diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index d5276e0cc5..197775ef79 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -39,7 +39,6 @@ #include "ardour_ui.h" #include "automation_time_axis.h" #include "automation_streamview.h" -#include "global_signals.h" #include "gui_thread.h" #include "route_time_axis.h" #include "automation_line.h" @@ -276,7 +275,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( /* make sure labels etc. are correct */ automation_state_changed (); - ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler)); _route->DropReferences.connect ( _route_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context () diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index f04c6682c2..f33dbe2684 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -39,7 +39,6 @@ #include "ardour_ui.h" #include "automation_time_axis.h" #include "editor.h" -#include "global_signals.h" #include "editing.h" #include "rgb_macros.h" #include "utils.h" @@ -273,7 +272,7 @@ Editor::initialize_canvas () initialize_rulers (); - ColorsChanged.connect (sigc::mem_fun (*this, &Editor::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &Editor::color_handler)); color_handler(); } diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 50592c7757..34bbc95cbc 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -36,7 +36,6 @@ #include "ardour_ui.h" #include "gain_meter.h" -#include "global_signals.h" #include "logmeter.h" #include "gui_thread.h" #include "keyboard.h" @@ -171,8 +170,8 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int RedrawMetrics.connect (sigc::mem_fun(*this, &GainMeterBase::redraw_metrics)); UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &GainMeterBase::on_theme_changed)); - ColorsChanged.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), false)); - DPIReset.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), true)); + UIConfiguration::ColorsChanged.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), false)); + UIConfiguration::DPIReset.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), true)); } GainMeterBase::~GainMeterBase () diff --git a/gtk2_ardour/global_signals.h b/gtk2_ardour/global_signals.h deleted file mode 100644 index f1abb8dbb8..0000000000 --- a/gtk2_ardour/global_signals.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2012 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtk_ardour_global_signals_h__ -#define __gtk_ardour_global_signals_h__ - -#include - -namespace ARDOUR_UI_UTILS { -extern sigc::signal ColorsChanged; -extern sigc::signal DPIReset; -} // namespace - -#endif /* __gtk_ardour_global_signals_h__ */ diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index 99a21668c1..cf4e758cd7 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -24,7 +24,6 @@ #include "gui_thread.h" #include "route_group_dialog.h" -#include "global_signals.h" #include "group_tabs.h" #include "keyboard.h" #include "i18n.h" @@ -46,7 +45,7 @@ GroupTabs::GroupTabs () , _dragging_new_tab (0) { add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK); - ColorsChanged.connect (sigc::mem_fun (*this, &GroupTabs::queue_draw)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &GroupTabs::queue_draw)); } GroupTabs::~GroupTabs () diff --git a/gtk2_ardour/level_meter.cc b/gtk2_ardour/level_meter.cc index 75cd5e60eb..ba8113d4c2 100644 --- a/gtk2_ardour/level_meter.cc +++ b/gtk2_ardour/level_meter.cc @@ -25,7 +25,6 @@ #include "pbd/fastlog.h" #include "ardour_ui.h" -#include "global_signals.h" #include "level_meter.h" #include "utils.h" #include "logmeter.h" @@ -59,7 +58,7 @@ LevelMeterBase::LevelMeterBase (Session* s, PBD::EventLoop::InvalidationRecord* Config->ParameterChanged.connect (_parameter_connection, parent_invalidator, boost::bind (&LevelMeterBase::parameter_changed, this, _1), gui_context()); ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun(*this, &LevelMeterBase::parameter_changed)); - ColorsChanged.connect (sigc::mem_fun (*this, &LevelMeterBase::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &LevelMeterBase::color_handler)); } LevelMeterBase::~LevelMeterBase () diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index f469aed600..cd33ba345b 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -35,7 +35,6 @@ #include #include "ardour_ui.h" -#include "global_signals.h" #include "logmeter.h" #include "gui_thread.h" #include "ardour_window.h" @@ -112,8 +111,8 @@ MeterStrip::MeterStrip (int metricmode, MeterType mt) nfo_vbox.show(); UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &MeterStrip::on_theme_changed)); - ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); - DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); } MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) @@ -300,8 +299,8 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) name_label.signal_button_release_event().connect (sigc::mem_fun(*this, &MeterStrip::name_label_button_release), false); UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &MeterStrip::on_theme_changed)); - ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); - DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&MeterStrip::parameter_changed, this, _1), gui_context()); sess->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&MeterStrip::parameter_changed, this, _1), gui_context()); diff --git a/gtk2_ardour/meterbridge.cc b/gtk2_ardour/meterbridge.cc index aaf1842c79..bdbee7f830 100644 --- a/gtk2_ardour/meterbridge.cc +++ b/gtk2_ardour/meterbridge.cc @@ -52,7 +52,6 @@ #include "route_sorter.h" #include "actions.h" #include "gui_thread.h" -#include "global_signals.h" #include "meter_patterns.h" #include "timers.h" @@ -174,8 +173,8 @@ Meterbridge::Meterbridge () viewport->set_border_width(0); UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &Meterbridge::on_theme_changed)); - ColorsChanged.connect (sigc::mem_fun (*this, &Meterbridge::on_theme_changed)); - DPIReset.connect (sigc::mem_fun (*this, &Meterbridge::on_theme_changed)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &Meterbridge::on_theme_changed)); + UIConfiguration::DPIReset.connect (sigc::mem_fun (*this, &Meterbridge::on_theme_changed)); } Meterbridge::~Meterbridge () diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 5175cb35a8..9c54c2912e 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -35,7 +35,6 @@ #include "ardour/smf_source.h" #include "ardour_ui.h" -#include "global_signals.h" #include "gui_thread.h" #include "midi_region_view.h" #include "midi_streamview.h" @@ -86,7 +85,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv) color_handler (); - ColorsChanged.connect(sigc::mem_fun(*this, &MidiStreamView::color_handler)); + UIConfiguration::ColorsChanged.connect(sigc::mem_fun(*this, &MidiStreamView::color_handler)); note_range_adjustment.set_page_size(_highest_note - _lowest_note); note_range_adjustment.set_value(_lowest_note); diff --git a/gtk2_ardour/mono_panner.cc b/gtk2_ardour/mono_panner.cc index fd789ed035..496f67d007 100644 --- a/gtk2_ardour/mono_panner.cc +++ b/gtk2_ardour/mono_panner.cc @@ -39,7 +39,6 @@ #include "ardour/panner_shell.h" #include "ardour_ui.h" -#include "global_signals.h" #include "mono_panner.h" #include "mono_panner_editor.h" #include "rgb_macros.h" @@ -87,7 +86,7 @@ MonoPanner::MonoPanner (boost::shared_ptr p) _panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&MonoPanner::bypass_handler, this), gui_context()); _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), boost::bind (&MonoPanner::pannable_handler, this), gui_context()); - ColorsChanged.connect (sigc::mem_fun (*this, &MonoPanner::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &MonoPanner::color_handler)); set_tooltip (); } diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc index 23c4976861..a5c0830fc7 100644 --- a/gtk2_ardour/panner2d.cc +++ b/gtk2_ardour/panner2d.cc @@ -36,7 +36,6 @@ #include "canvas/colors.h" #include "ardour_ui.h" -#include "global_signals.h" #include "panner2d.h" #include "keyboard.h" #include "gui_thread.h" @@ -91,7 +90,7 @@ Panner2d::Panner2d (boost::shared_ptr p, int32_t h) have_colors = true; } - ColorsChanged.connect (sigc::mem_fun (*this, &Panner2d::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &Panner2d::color_handler)); panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&Panner2d::handle_state_change, this), gui_context()); diff --git a/gtk2_ardour/panner_interface.cc b/gtk2_ardour/panner_interface.cc index 0091cf592a..91c2d1772f 100644 --- a/gtk2_ardour/panner_interface.cc +++ b/gtk2_ardour/panner_interface.cc @@ -22,7 +22,6 @@ #include "gtkmm2ext/persistent_tooltip.h" #include "panner_interface.h" #include "panner_editor.h" -#include "global_signals.h" #include "i18n.h" diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 75e091f2d0..394edc120a 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -36,7 +36,6 @@ #include "canvas/colors.h" #include "ardour_ui.h" -#include "global_signals.h" #include "streamview.h" #include "region_view.h" #include "automation_region_view.h" @@ -191,7 +190,7 @@ RegionView::init (bool wfd) set_colors (); - ColorsChanged.connect (sigc::mem_fun (*this, &RegionView::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &RegionView::color_handler)); /* XXX sync mark drag? */ } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 94ed2a86f0..f7c21fa734 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -61,7 +61,6 @@ #include "ardour_button.h" #include "audio_streamview.h" #include "debug.h" -#include "global_signals.h" #include "route_time_axis.h" #include "automation_time_axis.h" #include "enums.h" @@ -308,7 +307,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr rt) } _editor.ZoomChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::reset_samples_per_pixel)); - ColorsChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::color_handler)); PropertyList* plist = new PropertyList(); diff --git a/gtk2_ardour/stereo_panner.cc b/gtk2_ardour/stereo_panner.cc index ab057c9147..cdd4d94f18 100644 --- a/gtk2_ardour/stereo_panner.cc +++ b/gtk2_ardour/stereo_panner.cc @@ -40,7 +40,6 @@ #include "canvas/colors.h" #include "ardour_ui.h" -#include "global_signals.h" #include "stereo_panner.h" #include "stereo_panner_editor.h" #include "rgb_macros.h" @@ -97,7 +96,7 @@ StereoPanner::StereoPanner (boost::shared_ptr p) _panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&StereoPanner::bypass_handler, this), gui_context()); _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), boost::bind (&StereoPanner::pannable_handler, this), gui_context()); - ColorsChanged.connect (sigc::mem_fun (*this, &StereoPanner::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &StereoPanner::color_handler)); set_tooltip (); } diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index fa3ed357bc..4a9ed0efe8 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -34,7 +34,6 @@ #include "canvas/debug.h" #include "streamview.h" -#include "global_signals.h" #include "region_view.h" #include "route_time_axis.h" #include "region_selection.h" @@ -86,7 +85,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g _trackview.session()->RecordStateChanged.connect (*this, invalidator (*this), boost::bind (&StreamView::sess_rec_enable_changed, this), gui_context()); } - ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler)); } StreamView::~StreamView () diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc index 1f1baa84f1..9e28990290 100644 --- a/gtk2_ardour/theme_manager.cc +++ b/gtk2_ardour/theme_manager.cc @@ -48,7 +48,6 @@ #include "theme_manager.h" #include "rgb_macros.h" #include "ardour_ui.h" -#include "global_signals.h" #include "utils.h" #include "i18n.h" @@ -59,10 +58,6 @@ using namespace PBD; using namespace ARDOUR; using namespace ARDOUR_UI_UTILS; -namespace ARDOUR_UI_UTILS { - sigc::signal ColorsChanged; -} - ThemeManager::ThemeManager() : dark_button (_("Dark Theme")) , light_button (_("Light Theme")) @@ -206,7 +201,7 @@ ThemeManager::ThemeManager() setup_aliases (); setup_modifiers (); - ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ThemeManager::colors_changed)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &ThemeManager::colors_changed)); } ThemeManager::~ThemeManager() diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 9deb7eb3e8..d4c1dbf508 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -43,7 +43,6 @@ #include "ardour_ui.h" #include "ardour_dialog.h" -#include "global_signals.h" #include "gui_thread.h" #include "public_editor.h" #include "time_axis_view.h" @@ -220,7 +219,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie time_axis_hbox.show(); top_hbox.pack_start (scroomer_placeholder, false, false); // OR pack_end to move after meters ? - ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler)); GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TimeAxisView::erase_ghost, this, _1), gui_context()); } diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 5783e91bbe..4deac80869 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -48,7 +48,6 @@ #include "ardour/filesystem_paths.h" #include "ardour_ui.h" -#include "global_signals.h" #include "ui_config.h" #include "i18n.h" @@ -64,6 +63,10 @@ UIConfiguration* UIConfiguration::_instance = 0; static const double hue_width = 18.0; +sigc::signal UIConfiguration::ColorsChanged; + +sigc::signal UIConfiguration::DPIReset; + UIConfiguration::UIConfiguration () : #undef UI_CONFIG_VARIABLE @@ -84,7 +87,7 @@ UIConfiguration::UIConfiguration () load_state(); - ARDOUR_UI_UTILS::ColorsChanged.connect (boost::bind (&UIConfiguration::colors_changed, this)); + ColorsChanged.connect (boost::bind (&UIConfiguration::colors_changed, this)); ParameterChanged.connect (sigc::mem_fun (*this, &UIConfiguration::parameter_changed)); } @@ -155,7 +158,7 @@ UIConfiguration::reset_dpi () gtk_settings_set_long_property (gtk_settings_get_default(), "gtk-xft-dpi", val, "ardour"); - ARDOUR_UI_UTILS::DPIReset(); //Emit Signal + DPIReset(); //Emit Signal } void @@ -236,7 +239,7 @@ UIConfiguration::load_defaults () if (ret == 0) { /* reload color theme */ load_color_theme (false); - ARDOUR_UI_UTILS::ColorsChanged (); /* EMIT SIGNAL */ + ColorsChanged (); /* EMIT SIGNAL */ } return ret; @@ -284,7 +287,7 @@ UIConfiguration::load_color_theme (bool allow_own) return -1; } - ARDOUR_UI_UTILS::ColorsChanged (); + ColorsChanged (); } else { warning << string_compose (_("Color file %1 not found"), basename) << endmsg; } @@ -676,7 +679,7 @@ UIConfiguration::set_color (string const& name, ArdourCanvas::Color color) i->second = color; colors_modified = true; - ARDOUR_UI_UTILS::ColorsChanged (); /* EMIT SIGNAL */ + ColorsChanged (); /* EMIT SIGNAL */ } void @@ -690,7 +693,7 @@ UIConfiguration::set_alias (string const & name, string const & alias) i->second = alias; aliases_modified = true; - ARDOUR_UI_UTILS::ColorsChanged (); /* EMIT SIGNAL */ + ColorsChanged (); /* EMIT SIGNAL */ } void @@ -705,7 +708,7 @@ UIConfiguration::set_modifier (string const & name, SVAModifier svam) m->second = svam; modifiers_modified = true; - ARDOUR_UI_UTILS::ColorsChanged (); /* EMIT SIGNAL */ + ColorsChanged (); /* EMIT SIGNAL */ } void diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h index 64463e3fcf..bd60173158 100644 --- a/gtk2_ardour/ui_config.h +++ b/gtk2_ardour/ui_config.h @@ -76,9 +76,13 @@ class UIConfiguration : public PBD::Stateful ArdourCanvas::HSV color_hsv (const std::string&) const; ArdourCanvas::SVAModifier modifier (const std::string&) const; + static sigc::signal ColorsChanged; + void reset_dpi (); void set_pango_fontsize (); + static sigc::signal DPIReset; + sigc::signal ParameterChanged; void map_parameters (boost::function&); diff --git a/gtk2_ardour/verbose_cursor.cc b/gtk2_ardour/verbose_cursor.cc index 26d3037886..ff0f7429f9 100644 --- a/gtk2_ardour/verbose_cursor.cc +++ b/gtk2_ardour/verbose_cursor.cc @@ -30,7 +30,6 @@ #include "audio_clock.h" #include "editor.h" #include "editor_drag.h" -#include "global_signals.h" #include "main_clock.h" #include "verbose_cursor.h" @@ -47,7 +46,7 @@ VerboseCursor::VerboseCursor (Editor* editor) _canvas_item->set_font_description (Pango::FontDescription (ARDOUR_UI::config()->get_LargerBoldFont())); color_handler (); - ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &VerboseCursor::color_handler)); + UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &VerboseCursor::color_handler)); } void -- cgit v1.2.3