summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-28 12:46:31 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-05-28 12:46:43 -0400
commit173b00777963376fd441256a4aadac9e6425af97 (patch)
tree73318ff1915b25aa1a5a6a2b0e3d372da18b02d0 /gtk2_ardour/main.cc
parent34d19ce8792cd2ad7012bc4d74c5012f697d87f0 (diff)
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.
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index abdfa35877..f43d1bd4f4 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -345,8 +345,15 @@ int main (int argc, char *argv[])
}
#endif
+ UIConfiguration* ui_config = new UIConfiguration;
+
+ if (ui_config->pre_gui_init ()) {
+ error << _("Could not complete pre-GUI initialization") << endmsg;
+ exit (1);
+ }
+
try {
- ui = new ARDOUR_UI (&argc, &argv, localedir.c_str());
+ ui = new ARDOUR_UI (&argc, &argv, localedir.c_str(), ui_config);
} catch (failed_constructor& err) {
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
exit (1);