mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
Move ARDOUR_UI::ThemeChanged signal into Gtkmm2ext::UI
This means ThemeManager no longer depends on ARDOUR_UI git-svn-id: svn://localhost/ardour2/trunk@2057 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e7a1e2c18e
commit
7092ef3d08
7 changed files with 14 additions and 20 deletions
|
|
@ -97,7 +97,6 @@ sigc::signal<void,bool> ARDOUR_UI::Blink;
|
|||
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
|
||||
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
|
||||
sigc::signal<void,nframes_t, bool, nframes_t> ARDOUR_UI::Clock;
|
||||
sigc::signal<int,string> ThemeChanged;
|
||||
|
||||
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
||||
|
||||
|
|
@ -208,8 +207,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
|||
gettimeofday (&last_peak_grab, 0);
|
||||
gettimeofday (&last_shuttle_request, 0);
|
||||
|
||||
ThemeChanged.connect (mem_fun(*this, &ARDOUR_UI::load_rcfile));
|
||||
|
||||
ARDOUR::Diskstream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
|
||||
ARDOUR::Diskstream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
|
||||
|
||||
|
|
@ -1526,7 +1523,8 @@ ARDOUR_UI::setup_theme ()
|
|||
cerr << "Loading ui configuration file " << rcfile << endl;
|
||||
}
|
||||
|
||||
ThemeChanged (rcfile); //EMIT SIGNAL
|
||||
load_rcfile(rcfile);
|
||||
|
||||
theme_manager->setup_theme();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ namespace ALSA {
|
|||
class MultiChannelDevice;
|
||||
}
|
||||
|
||||
extern sigc::signal<int,string> ThemeChanged;
|
||||
|
||||
#define FRAME_NAME "BaseFrame"
|
||||
|
||||
class ARDOUR_UI : public Gtkmm2ext::UI
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <gtkmm2ext/fastmeter.h>
|
||||
#include <gtkmm2ext/stop_signal.h>
|
||||
#include <gtkmm2ext/barcontroller.h>
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <midi++/manager.h>
|
||||
#include <pbd/fastlog.h>
|
||||
|
||||
|
|
@ -211,7 +212,7 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
|
|||
ResetAllPeakDisplays.connect (mem_fun(*this, &GainMeter::reset_peak_display));
|
||||
ResetGroupPeakDisplays.connect (mem_fun(*this, &GainMeter::reset_group_peak_display));
|
||||
|
||||
ThemeChanged.connect (mem_fun(*this, &GainMeter::redraw_pixmaps));
|
||||
UI::instance()->theme_changed.connect (mem_fun(*this, &GainMeter::on_theme_changed));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -317,11 +318,10 @@ GainMeter::meter_metrics_expose (GdkEventExpose *ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
GainMeter::redraw_pixmaps(string blah)
|
||||
void
|
||||
GainMeter::on_theme_changed()
|
||||
{
|
||||
style_changed = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
GainMeter::~GainMeter ()
|
||||
|
|
|
|||
|
|
@ -186,7 +186,8 @@ class GainMeter : public Gtk::VBox
|
|||
static Glib::RefPtr<Gdk::Pixbuf> slider;
|
||||
static Glib::RefPtr<Gdk::Pixbuf> rail;
|
||||
static int setup_slider_pix ();
|
||||
int redraw_pixmaps(string);
|
||||
|
||||
void on_theme_changed ();
|
||||
bool style_changed;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include "theme_manager.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
@ -178,14 +177,10 @@ ThemeManager::button_press_event (GdkEventButton* ev)
|
|||
void
|
||||
ThemeManager::load_rc(int which)
|
||||
{
|
||||
|
||||
if (which == 1) {
|
||||
Config->set_ui_rc_file("ardour2_ui_dark.rc");
|
||||
cerr << "dark theme selected" << endl;
|
||||
|
||||
} else {
|
||||
Config->set_ui_rc_file("ardour2_ui_light.rc");
|
||||
cerr << "light theme selected" << endl;
|
||||
}
|
||||
|
||||
sys::path rc_file_path;
|
||||
|
|
@ -193,10 +188,7 @@ ThemeManager::load_rc(int which)
|
|||
find_file_in_search_path (ardour_search_path() + system_config_search_path(),
|
||||
Config->get_ui_rc_file(), rc_file_path);
|
||||
|
||||
ThemeChanged(rc_file_path.to_string()); //EMIT SIGNAL
|
||||
|
||||
cerr << "load_rc() called " << rc_file_path.to_string() << endl;
|
||||
|
||||
Gtkmm2ext::UI::instance()->load_rcfile (rc_file_path.to_string());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ UI::load_rcfile (string path)
|
|||
|
||||
|
||||
RC::reset_styles(Gtk::Settings::get_default());
|
||||
|
||||
theme_changed.emit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,8 @@ class UI : public Receiver, public AbstractUI<UIRequest>
|
|||
sigc::signal<void> starting;
|
||||
sigc::signal<void> stopping;
|
||||
|
||||
sigc::signal<void> theme_changed;
|
||||
|
||||
static bool just_hide_it (GdkEventAny *, Gtk::Window *);
|
||||
|
||||
static pthread_t the_gui_thread() { return gui_thread; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue