summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/LoadPatchWindow.cpp5
-rw-r--r--src/libs/gui/PatchCanvas.cpp10
-rw-r--r--src/libs/gui/ThreadedLoader.cpp18
3 files changed, 27 insertions, 6 deletions
diff --git a/src/libs/gui/LoadPatchWindow.cpp b/src/libs/gui/LoadPatchWindow.cpp
index 4a86515a..2f3b6af7 100644
--- a/src/libs/gui/LoadPatchWindow.cpp
+++ b/src/libs/gui/LoadPatchWindow.cpp
@@ -129,8 +129,9 @@ LoadPatchWindow::ok_clicked()
if (_replace)
App::instance().engine()->clear_patch(_patch->path());
- if (_patch->path() != "/")
- parent = _patch->path().parent();
+ //if (_patch->path() != "/")
+ // parent = _patch->path().parent();
+ parent = _patch->path();
_patch.reset();
hide();
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 135a28c8..2ea4496c 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -58,7 +58,9 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
, _last_click_x(0)
, _last_click_y(0)
, _refresh_menu(false)
+ , _menu(NULL)
, _internal_menu(NULL)
+ , _plugin_menu(NULL)
{
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
xml->get_widget("canvas_menu", _menu);
@@ -590,7 +592,7 @@ PatchCanvas::paste()
ClashAvoider avoider(*App::instance().store().get(), _patch->path(), clipboard);
//parser->parse_string(App::instance().world(), &avoider, str, _patch->path().base());
parser->parse_string(App::instance().world(), &avoider, str, "/",
- boost::optional<Glib::ustring>(), _patch->path());
+ boost::optional<Glib::ustring>(), (Glib::ustring)_patch->path());
for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) {
if (_patch->path() == "/" && i->first == "/") {
@@ -616,9 +618,13 @@ PatchCanvas::paste()
builder.build(_patch->path(), i->second);
}
+ //avoider.set_target(*App::instance().engine());
+
for (ClientStore::ConnectionRecords::const_iterator i = clipboard.connection_records().begin();
- i != clipboard.connection_records().end(); ++i)
+ i != clipboard.connection_records().end(); ++i) {
+ cout << "CONNECTING " << i->first << " -> " << i->second << endl;
App::instance().engine()->connect(i->first, i->second);
+ }
}
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 88dd4b1a..86c4ea1c 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -100,13 +100,27 @@ ThreadedLoader::load_patch(bool merge,
engine_data,
false)));
} else {
+ Glib::ustring engine_base = "";
+ if (engine_parent) {
+ if (merge)
+ engine_base = engine_parent.get();
+ else
+ engine_base = engine_parent.get().base();
+ }
+
+ cout << "ENGINE BASE 1: " << engine_base << endl;
+ if (merge && engine_parent.get() == "/" || !engine_parent)
+ engine_base = engine_base.substr(0, engine_base.find_last_of("/"));
+
+ cout << "ENGINE BASE: " << engine_base << endl;
+ cout << "PARENT: " << (engine_parent ? (string)engine_parent.get() : "NONE") << endl;
_events.push_back(sigc::hide_return(sigc::bind(
sigc::mem_fun(_parser.get(), &Ingen::Serialisation::Parser::parse_document),
App::instance().world(),
App::instance().world()->engine.get(),
data_base_uri, // document
- data_base_uri, // patch (root of document)
- engine_parent,
+ data_base_uri + data_path.substr(1), // object URI document
+ engine_base,
engine_symbol,
engine_data)));
}