summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bindings/Makefile.am10
-rw-r--r--src/libs/gui/App.cpp2
-rw-r--r--src/libs/gui/App.hpp4
-rw-r--r--src/libs/gui/ConnectWindow.cpp34
-rw-r--r--src/libs/gui/ConnectWindow.hpp2
-rw-r--r--src/libs/gui/LoadRemotePatchWindow.cpp6
-rw-r--r--src/libs/gui/PatchCanvas.cpp2
-rw-r--r--src/libs/gui/ThreadedLoader.cpp4
-rw-r--r--src/libs/gui/UploadPatchWindow.cpp2
-rw-r--r--src/libs/module/module.cpp2
10 files changed, 43 insertions, 25 deletions
diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am
index 8935eebb..083cb5a6 100644
--- a/src/bindings/Makefile.am
+++ b/src/bindings/Makefile.am
@@ -14,15 +14,17 @@ libingen_bindings_la_SOURCES = ingen_wrap.cxx
swig: ingen.i
swig -c++ -Wall $(FLAGS) -python ingen.i
+ingen_wrap.cxx: swig
+
libingen_bindings_la: swig ingen_wrap.cxx
-all-local:
+all-local: swig
ln -sf .libs/libingen_bindings.so _ingen.so
#libtool --mode=compile g++ -fPIC -shared $(CXXFLAGS) $(FLAGS) $(LIBS) -I/usr/include/python2.4 ingen_wrap.cxx -o libingen_python.so.0.0.0
endif
clean-local:
- rm *.cxx
- rm *.so
- rm *.o
+ rm -f *.cxx
+ rm -f *.so
+ rm -f *.o
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index d2407c9f..add26d8c 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -78,7 +78,7 @@ App::App(Ingen::Shared::World* world)
glade_xml->get_widget_derived("config_win", _config_window);
glade_xml->get_widget("about_win", _about_dialog);
- Raul::RDF::World& rdf_world = world->rdf_world;
+ Raul::RDF::World& rdf_world = *world->rdf_world;
rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
rdf_world.add_prefix("ingen", "http://drobilla.net/ns/ingen#");
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index 4ef36718..fd90426b 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -114,8 +114,8 @@ protected:
SharedPtr<EngineInterface> _engine;
SharedPtr<SigClientInterface> _client;
- SharedPtr<Store> _store;
- SharedPtr<ThreadedLoader> _loader;
+ SharedPtr<Store> _store;
+ SharedPtr<ThreadedLoader> _loader;
Configuration* _configuration;
diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp
index 703d784e..a1c89c88 100644
--- a/src/libs/gui/ConnectWindow.cpp
+++ b/src/libs/gui/ConnectWindow.cpp
@@ -100,6 +100,8 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
cerr << "Unable to find module entry point, internal engine unavailable." << endl;
_engine_module.reset();
}
+
+ server_toggled();
}
@@ -154,16 +156,21 @@ ConnectWindow::set_connected_to(SharedPtr<Shared::EngineInterface> engine)
} else {
_icon->set(Gtk::Stock::DISCONNECT, Gtk::ICON_SIZE_LARGE_TOOLBAR);
_progress_bar->set_fraction(0.0);
- _url_entry->set_sensitive(true);
_connect_button->set_sensitive(true);
_disconnect_button->set_sensitive(false);
- _port_spinbutton->set_sensitive(false);
- _launch_radio->set_sensitive(true);
+
if (_new_engine)
_internal_radio->set_sensitive(true);
else
_internal_radio->set_sensitive(false);
- server_toggled();
+
+ _server_radio->set_sensitive(true);
+ _launch_radio->set_sensitive(true);
+
+ if ( _mode == CONNECT_REMOTE )
+ _url_entry->set_sensitive(true);
+ else if ( _mode == LAUNCH_REMOTE )
+ _port_spinbutton->set_sensitive(true);
_progress_label->set_text(string("Disconnected"));
}
@@ -186,6 +193,13 @@ ConnectWindow::connect()
_disconnect_button->set_label("gtk-cancel");
_disconnect_button->set_sensitive(true);
+ // Avoid user messing with our parameters whilst we're trying to connect.
+ _server_radio->set_sensitive(false);
+ _launch_radio->set_sensitive(false);
+ _internal_radio->set_sensitive(false);
+ _url_entry->set_sensitive(false);
+ _port_spinbutton->set_sensitive(false);
+
_connect_stage = 0;
if (_mode == CONNECT_REMOTE) {
@@ -207,7 +221,7 @@ ConnectWindow::connect()
int port = _port_spinbutton->get_value_as_int();
char port_str[6];
snprintf(port_str, 6, "%u", port);
- const string cmd = string("ingen --port=").append(port_str);
+ const string cmd = string("ingen -e --engine-port=").append(port_str);
if (Raul::Process::launch(cmd)) {
SharedPtr<EngineInterface> engine(
@@ -229,11 +243,11 @@ ConnectWindow::connect()
} else if (_mode == INTERNAL) {
assert(_new_engine);
- SharedPtr<Ingen::Engine> engine(_new_engine(App::instance().world()));
+ _engine = SharedPtr<Ingen::Engine>(_new_engine(App::instance().world()));
- engine->start_jack_driver();
+ _engine->start_jack_driver();
- SharedPtr<Ingen::EngineInterface> engine_interface = engine->new_queued_interface();
+ SharedPtr<Ingen::EngineInterface> engine_interface = _engine->new_queued_interface();
ThreadedSigClientInterface* tsci = new ThreadedSigClientInterface(Ingen::event_queue_size);
SharedPtr<SigClientInterface> client(tsci);
@@ -242,10 +256,10 @@ ConnectWindow::connect()
engine_interface->set_responder(SharedPtr<Ingen::Shared::Responder>(new Ingen::DirectResponder(client, 1)));
- engine->activate();
+ _engine->activate();
Glib::signal_timeout().connect(
- sigc::mem_fun(engine.get(), &Ingen::Engine::main_iteration), 1000);
+ sigc::mem_fun(_engine.get(), &Ingen::Engine::main_iteration), 1000);
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 100);
diff --git a/src/libs/gui/ConnectWindow.hpp b/src/libs/gui/ConnectWindow.hpp
index 2ea86f0a..f8cd8db8 100644
--- a/src/libs/gui/ConnectWindow.hpp
+++ b/src/libs/gui/ConnectWindow.hpp
@@ -78,6 +78,8 @@ private:
SharedPtr<Glib::Module> _engine_module;
Ingen::Engine* (*_new_engine)(Ingen::Shared::World* world);
+ SharedPtr<Ingen::Engine> _engine;
+
Gtk::Image* _icon;
Gtk::ProgressBar* _progress_bar;
Gtk::Label* _progress_label;
diff --git a/src/libs/gui/LoadRemotePatchWindow.cpp b/src/libs/gui/LoadRemotePatchWindow.cpp
index 276a0485..b5caf351 100644
--- a/src/libs/gui/LoadRemotePatchWindow.cpp
+++ b/src/libs/gui/LoadRemotePatchWindow.cpp
@@ -66,17 +66,17 @@ LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
set_patch(patch);
_initial_data = data;
- RDF::Model model(App::instance().world()->rdf_world,
+ RDF::Model model(*App::instance().world()->rdf_world,
"http://rdf.drobilla.net/ingen_patches/index.ttl",
"http://rdf.drobilla.net/ingen_patches/");
- RDF::Query query(App::instance().world()->rdf_world, Glib::ustring(
+ RDF::Query query(*App::instance().world()->rdf_world, Glib::ustring(
"SELECT DISTINCT ?name ?uri WHERE {"
" ?uri a ingen:Patch ;"
" doap:name ?name ."
"}"));
- RDF::Query::Results results = query.run(App::instance().world()->rdf_world, model);
+ RDF::Query::Results results = query.run(*App::instance().world()->rdf_world, model);
for (RDF::Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
Gtk::TreeModel::iterator iter = _liststore->append();
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 0e591445..3f2423c0 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -453,7 +453,7 @@ PatchCanvas::destroy_selection()
void
PatchCanvas::copy_selection()
{
- Serializer serializer(App::instance().world()->rdf_world);
+ Serializer serializer(*App::instance().world()->rdf_world);
serializer.start_to_string();
for (list<boost::shared_ptr<Item> >::iterator m = _selected_items.begin(); m != _selected_items.end(); ++m) {
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 630303b6..22b0a8d9 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -32,7 +32,7 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
: _serialisation_module(Ingen::Shared::load_module("ingen_serialisation"))
, _engine(engine)
, _deprecated_loader(engine)
- , _serializer(App::instance().world()->rdf_world)
+ , _serializer(*App::instance().world()->rdf_world)
{
set_name("Loader");
@@ -97,7 +97,7 @@ ThreadedLoader::load_patch(bool merge,
_events.push_back(sigc::hide_return(sigc::bind(
sigc::mem_fun(_loader.get(), &Ingen::Serialisation::Loader::load),
App::instance().engine(),
- &App::instance().world()->rdf_world,
+ App::instance().world()->rdf_world,
data_base_uri,
engine_parent,
(engine_name) ? engine_name.get() : "",
diff --git a/src/libs/gui/UploadPatchWindow.cpp b/src/libs/gui/UploadPatchWindow.cpp
index aec4d8e6..0aaddde8 100644
--- a/src/libs/gui/UploadPatchWindow.cpp
+++ b/src/libs/gui/UploadPatchWindow.cpp
@@ -248,7 +248,7 @@ UploadPatchWindow::upload_clicked()
_upload_progress->set_fraction(0.0);
_upload_progress->set_text("");
- Serializer s(App::instance().world()->rdf_world);
+ Serializer s(*App::instance().world()->rdf_world);
s.start_to_string();
s.serialize(_patch);
const string str = s.finish();
diff --git a/src/libs/module/module.cpp b/src/libs/module/module.cpp
index 4e342670..68ddc2b5 100644
--- a/src/libs/module/module.cpp
+++ b/src/libs/module/module.cpp
@@ -26,7 +26,7 @@
namespace Ingen {
namespace Shared {
-World* world;
+World* world = NULL;
World*
get_world()