summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-18 01:38:11 +0000
committerDavid Robillard <d@drobilla.net>2012-11-18 01:38:11 +0000
commitcfd73dfa220bc7ba3011d3bd9ddd9d5d5e3be079 (patch)
tree1c112212652c996e7b9eed6ad2ed69e8ae1b613e /src
parentb4718b5cc8334489a1eb50df9db920bc0b01375c (diff)
downloadingen-cfd73dfa220bc7ba3011d3bd9ddd9d5d5e3be079.tar.gz
ingen-cfd73dfa220bc7ba3011d3bd9ddd9d5d5e3be079.tar.bz2
ingen-cfd73dfa220bc7ba3011d3bd9ddd9d5d5e3be079.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/gui/App.cpp10
1 files changed, 6 insertions, 4 deletions
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>
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);