From cfd73dfa220bc7ba3011d3bd9ddd9d5d5e3be079 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Nov 2012 01:38:11 +0000 Subject: Don't do top level Glib things if Glib is already initialized. This fixed running the GUI in Gtkmm hosts like Ardour. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4831 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/App.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 4174fbac..ec7321b7 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -74,9 +74,6 @@ App::App(Ingen::World* world) , _enable_signal(true) , _requested_plugins(false) { - Glib::set_application_name("Ingen"); - gtk_window_set_default_icon_name("ingen"); - WidgetFactory::get_widget_derived("connect_win", _connect_window); WidgetFactory::get_widget_derived("messages_win", _messages_window); WidgetFactory::get_widget_derived("graph_tree_win", _graph_tree_window); @@ -100,7 +97,12 @@ App::~App() SharedPtr App::create(Ingen::World* world) { - _main = new Gtk::Main(&world->argc(), &world->argv()); + _main = Gtk::Main::instance(); + if (!_main) { + Glib::set_application_name("Ingen"); + gtk_window_set_default_icon_name("ingen"); + _main = new Gtk::Main(&world->argc(), &world->argv()); + } App* app = new App(world); -- cgit v1.2.1