From 173b00777963376fd441256a4aadac9e6425af97 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 28 May 2015 12:46:31 -0400 Subject: rearrange and redesign UIConfiguration/ARDOUR_UI APIs to allow correct initialization. We need to be able to set an environment variable *before* gtk_init() is called, but also to load the color theme right after gtk_init() and before the rest of the GUI is created. --- gtk2_ardour/ui_config.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/ui_config.h') diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h index c9f950d947..285bc5366a 100644 --- a/gtk2_ardour/ui_config.h +++ b/gtk2_ardour/ui_config.h @@ -48,6 +48,7 @@ class UIConfiguration : public PBD::Stateful int load_state (); int save_state (); int load_defaults (); + int load_color_theme (bool allow_own=true); int set_state (const XMLNode&, int version); XMLNode& get_state (void); @@ -79,6 +80,16 @@ class UIConfiguration : public PBD::Stateful void map_parameters (boost::function&); void parameter_changed (std::string); + + /** called before initializing any part of the GUI. Sets up + * any runtime environment required to make the GUI work + * in specific ways. + */ + int pre_gui_init (); + + /** called after the GUI toolkit has been initialized. + */ + UIConfiguration* post_gui_init (); #undef UI_CONFIG_VARIABLE #define UI_CONFIG_VARIABLE(Type,var,name,value) \ @@ -118,7 +129,6 @@ class UIConfiguration : public PBD::Stateful void load_modifiers (XMLNode const &); void reset_gtk_theme (); void colors_changed (); - int load_color_theme (bool allow_own=true); uint32_t block_save; }; -- cgit v1.2.3