summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-30 20:53:10 +0000
committerDavid Robillard <d@drobilla.net>2007-03-30 20:53:10 +0000
commitc27f759594a713c8c65ee6637aafa2d02b52bd8d (patch)
tree46e4d2a8266030f97802bc947686463eaaeac48d /src/progs
parent05ec343c42e99611ac1ff8c45b73a3e1dc4e0941 (diff)
downloadingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.tar.gz
ingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.tar.bz2
ingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.zip
Serialization fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@379 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp13
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp2
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp4
-rw-r--r--src/progs/ingenuity/ThreadedLoader.cpp2
-rw-r--r--src/progs/ingenuity/ThreadedLoader.h2
-rw-r--r--src/progs/patch_loader/patch_loader.cpp2
7 files changed, 19 insertions, 12 deletions
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index 0fed5cb9..783c6397 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -51,9 +51,9 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
Gtk::FileFilter filt;
filt.add_pattern("*.om");
- filt.set_name("Om patch files (DEPRECATED) (*.om)");
- filt.add_pattern("*.ingen.ttl");
- filt.set_name("Ingen patch files (*.ingen.ttl)");
+ filt.set_name("Om patch files (XML, DEPRECATED) (*.om)");
+ filt.add_pattern("*.ingen");
+ filt.set_name("Ingen patch files (RDF, *.ingen)");
set_filter(filt);
// Add global examples directory to "shortcut folders" (bookmarks)
@@ -118,14 +118,19 @@ LoadPatchWindow::ok_clicked()
optional<const string&> name;
optional<size_t> poly;
+ optional<Path> parent;
+
if (_poly_from_user_radio->get_active())
poly = _poly_spinbutton->get_value_as_int();
if (_replace)
App::instance().engine()->clear_patch(_patch->path());
+ if (_patch->path() != "/")
+ parent = _patch->path().parent();
+
App::instance().loader()->load_patch(true, get_filename(), "/",
- _initial_data, _patch->parent()->path(), name, poly);
+ _initial_data, parent, name, poly);
hide();
}
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index c3617cc9..7d3a252c 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -55,9 +55,9 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
Gtk::FileFilter filt;
filt.add_pattern("*.om");
- filt.set_name("Om patch files (DEPRECATED) (*.om)");
- filt.add_pattern("*.ingen.ttl");
- filt.set_name("Ingen patch files (*.ingen.ttl)");
+ filt.set_name("Om patch files (XML, DEPRECATED) (*.om)");
+ filt.add_pattern("*.ingen");
+ filt.set_name("Ingen patch files (RDF, *.ingen)");
set_filter(filt);
// Add global examples directory to "shortcut folders" (bookmarks)
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 0835bb97..d90c1c1c 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -133,6 +133,7 @@ PatchCanvas::add_node(SharedPtr<NodeModel> nm)
module = NodeModule::create(shared_this, nm);
add_item(module);
+ module->show();
_views.insert(std::make_pair(nm, module));
}
@@ -158,6 +159,7 @@ PatchCanvas::add_port(SharedPtr<PortModel> pm)
SharedPtr<PatchPortModule> view = PatchPortModule::create(shared_this, pm);
_views.insert(std::make_pair(pm, view));
add_item(view);
+ view->show();
}
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 556b690d..7556689b 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -281,8 +281,8 @@ PatchWindow::event_save_as()
if (result == Gtk::RESPONSE_OK) {
string filename = dialog.get_filename();
- if (filename.length() < 11 || filename.substr(filename.length()-10) != ".ingen.ttl")
- filename += ".ingen.ttl";
+ if (filename.length() < 7 || filename.substr(filename.length()-6) != ".ingen")
+ filename += ".ingen";
bool confirm = false;
std::fstream fin;
diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/progs/ingenuity/ThreadedLoader.cpp
index 7544d3fd..0ba2bb33 100644
--- a/src/progs/ingenuity/ThreadedLoader.cpp
+++ b/src/progs/ingenuity/ThreadedLoader.cpp
@@ -58,7 +58,7 @@ ThreadedLoader::load_patch(bool merge,
const string& data_base_uri,
const Path& data_path,
MetadataMap engine_data,
- const Path& engine_parent,
+ optional<Path> engine_parent,
optional<const string&> engine_name,
optional<size_t> engine_poly)
{
diff --git a/src/progs/ingenuity/ThreadedLoader.h b/src/progs/ingenuity/ThreadedLoader.h
index 54cb7833..4cab4acb 100644
--- a/src/progs/ingenuity/ThreadedLoader.h
+++ b/src/progs/ingenuity/ThreadedLoader.h
@@ -67,7 +67,7 @@ public:
const string& data_base_uri,
const Path& data_path,
MetadataMap engine_data,
- const Path& engine_parent,
+ optional<Path> engine_parent,
optional<const string&> engine_name = optional<const string&>(),
optional<size_t> engine_poly = optional<size_t>());
diff --git a/src/progs/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp
index d5243339..d25ac24f 100644
--- a/src/progs/patch_loader/patch_loader.cpp
+++ b/src/progs/patch_loader/patch_loader.cpp
@@ -73,7 +73,7 @@ int main(int argc, char** argv)
for (uint i=0; i < args_info.inputs_num; ++i) {
cerr << "FIXME: load patch under root" << endl;
cerr << "Load " << args_info.inputs[i] << endl;
- loader.load(args_info.inputs[i], "/", "");
+ loader.load(args_info.inputs[i], Path("/"), "");
}
return 0;