summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/PatchWindow.cpp4
-rw-r--r--src/libs/gui/ThreadedLoader.cpp13
-rw-r--r--src/libs/gui/ThreadedLoader.hpp4
3 files changed, 8 insertions, 13 deletions
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp
index b0b87c5e..e92f0fd7 100644
--- a/src/libs/gui/PatchWindow.cpp
+++ b/src/libs/gui/PatchWindow.cpp
@@ -306,7 +306,7 @@ PatchWindow::event_save()
if (_patch->filename() == "")
event_save_as();
else
- App::instance().loader()->save_patch(_patch, _patch->filename(), false);
+ App::instance().loader()->save_patch(_patch, _patch->filename());
}
@@ -363,7 +363,7 @@ PatchWindow::event_save_as()
fin.close();
if (confirm) {
- App::instance().loader()->save_patch(_patch, filename, true);
+ App::instance().loader()->save_patch(_patch, filename);
_patch->set_filename(filename);
//_patch->set_metadata("filename", Atom(filename.c_str()));
}
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 63c5bf3c..ecabe5e1 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -113,13 +113,13 @@ ThreadedLoader::load_patch(bool merge,
void
-ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename, bool recursive)
+ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename)
{
_mutex.lock();
_events.push_back(sigc::hide_return(sigc::bind(
sigc::mem_fun(this, &ThreadedLoader::save_patch_event),
- model, filename, recursive)));
+ model, filename)));
_mutex.unlock();
@@ -128,14 +128,9 @@ ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename,
void
-ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& filename, bool recursive)
+ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& filename)
{
- if (recursive)
- cerr << "FIXME: Recursive save." << endl;
-
- _serializer.start_to_filename(filename);
- _serializer.serialize(model);
- _serializer.finish();
+ _serializer.to_file(model, filename);
}
diff --git a/src/libs/gui/ThreadedLoader.hpp b/src/libs/gui/ThreadedLoader.hpp
index e8574f6f..a08ee158 100644
--- a/src/libs/gui/ThreadedLoader.hpp
+++ b/src/libs/gui/ThreadedLoader.hpp
@@ -69,11 +69,11 @@ public:
optional<const string&> engine_name = optional<const string&>(),
optional<size_t> engine_poly = optional<size_t>());
- void save_patch(SharedPtr<PatchModel> model, const string& filename, bool recursive);
+ void save_patch(SharedPtr<PatchModel> model, const string& filename);
private:
- void save_patch_event(SharedPtr<PatchModel> model, const string& filename, bool recursive);
+ void save_patch_event(SharedPtr<PatchModel> model, const string& filename);
/** Returns nothing and takes no parameters (because they have all been bound) */
typedef sigc::slot<void> Closure;