move creation of UIConfiguration object to precede creation of ArdourUI.
This is pretty kludgy but we need the UIConfiguration object (or any color management object) to be the first to connect to the ColorsChanged signal. Might be better to make the UIConfiguration object a delegate for the ThemeManager.
This commit is contained in:
@@ -233,8 +233,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
theArdourUI = this;
|
||||
}
|
||||
|
||||
ui_config = new UIConfiguration();
|
||||
|
||||
ui_config->ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
|
||||
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
|
||||
ui_config->map_parameters (pc);
|
||||
@@ -399,6 +397,12 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
attach_to_engine ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::create_configuration ()
|
||||
{
|
||||
ui_config = new UIConfiguration();
|
||||
}
|
||||
|
||||
GlobalPortMatrixWindow*
|
||||
ARDOUR_UI::create_global_port_matrix (ARDOUR::DataType type)
|
||||
{
|
||||
|
||||
@@ -168,6 +168,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
|
||||
static ARDOUR_UI *instance () { return theArdourUI; }
|
||||
static UIConfiguration *config () { return ui_config; }
|
||||
static void create_configuration();
|
||||
|
||||
PublicEditor& the_editor(){return *editor;}
|
||||
Mixer_UI* the_mixer() { return mixer; }
|
||||
|
||||
@@ -277,6 +277,7 @@ int main (int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
try {
|
||||
ARDOUR_UI::create_configuration ();
|
||||
ui = new ARDOUR_UI (&argc, &argv, localedir);
|
||||
} catch (failed_constructor& err) {
|
||||
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
|
||||
|
||||
Reference in New Issue
Block a user