summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
committerDavid Robillard <d@drobilla.net>2018-01-21 01:05:26 +0100
commitee32624cd2b473e299e822ed10b58ca408698e4b (patch)
treef922c16385018df140c34a4280315357ed9f06b8 /src/gui
parentd356d1854a01a09bda32185647a8bd01b09df3d3 (diff)
downloadingen-ee32624cd2b473e299e822ed10b58ca408698e4b.tar.gz
ingen-ee32624cd2b473e299e822ed10b58ca408698e4b.tar.bz2
ingen-ee32624cd2b473e299e822ed10b58ca408698e4b.zip
Remove glib dependency from engine and core library
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ingen_gui.cpp19
-rw-r--r--src/gui/wscript4
2 files changed, 22 insertions, 1 deletions
diff --git a/src/gui/ingen_gui.cpp b/src/gui/ingen_gui.cpp
index 097de5cf..83e41a7e 100644
--- a/src/gui/ingen_gui.cpp
+++ b/src/gui/ingen_gui.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2018 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -14,7 +14,10 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "ingen/Configuration.hpp"
#include "ingen/Module.hpp"
+#include "ingen/client/ThreadedSigClientInterface.hpp"
+
#include "App.hpp"
namespace Ingen {
@@ -22,8 +25,22 @@ namespace GUI {
struct GUIModule : public Module {
void load(World* world) {
+ using Client::SigClientInterface;
+ using Client::ThreadedSigClientInterface;
+
+ std::string uri = world->conf().option("connect").ptr<char>();
+ if (!world->interface()) {
+ SPtr<SigClientInterface> client(new ThreadedSigClientInterface());
+ world->set_interface(world->new_interface(URI(uri), client));
+ } else if (!dynamic_ptr_cast<Client::SigClientInterface>(
+ world->interface()->respondee())) {
+ SPtr<SigClientInterface> client(new ThreadedSigClientInterface());
+ world->interface()->set_respondee(client);
+ }
+
app = GUI::App::create(world);
}
+
void run(World* world) {
app->run();
}
diff --git a/src/gui/wscript b/src/gui/wscript
index 3c804d05..160afc03 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -9,6 +9,10 @@ def options(ctx):
help='use light coloured theme')
def configure(conf):
+ autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM',
+ atleast_version='2.14.0', mandatory=False)
+ autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
+ atleast_version='2.14.0', mandatory=False)
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
atleast_version='2.12.0', mandatory=False)
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='NEW_GTKMM',