summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-17 20:40:48 +0000
committerDavid Robillard <d@drobilla.net>2011-02-17 20:40:48 +0000
commit8ecf0ff34b126f56dd06d6febf7046c0e98fb87e (patch)
tree8def815f7a24417148313f304bc6ad2051983056 /src/gui
parente668b8c846175f90cf22b456c5e5a4cc85410da4 (diff)
downloadingen-8ecf0ff34b126f56dd06d6febf7046c0e98fb87e.tar.gz
ingen-8ecf0ff34b126f56dd06d6febf7046c0e98fb87e.tar.bz2
ingen-8ecf0ff34b126f56dd06d6febf7046c0e98fb87e.zip
Remove deprecated Om patch loading code (resolve ticket #32).
Om patch loading is better achieved with a script than trying to maintain this functionality in ingen (and the associated dead code maintenance and protocol headaches). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2984 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/LoadPatchWindow.cpp4
-rw-r--r--src/gui/LoadRemotePatchWindow.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp51
-rw-r--r--src/gui/ThreadedLoader.hpp14
-rw-r--r--src/gui/wscript1
5 files changed, 23 insertions, 49 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 882f1368..81066a8c 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -175,7 +175,7 @@ LoadPatchWindow::ok_clicked()
symbol = _patch->symbol();
}
- App::instance().loader()->load_patch(true, get_uri(), Path("/"),
+ App::instance().loader()->load_patch(true, get_uri(),
parent, symbol, _initial_data);
} else {
@@ -193,7 +193,7 @@ LoadPatchWindow::ok_clicked()
symbol = avoid_symbol_clash(symbol);
- App::instance().loader()->load_patch(false, *i, Path("/"),
+ App::instance().loader()->load_patch(false, *i,
_patch->path(), symbol, _initial_data);
}
}
diff --git a/src/gui/LoadRemotePatchWindow.cpp b/src/gui/LoadRemotePatchWindow.cpp
index 0ad4d5b5..f48bd0bc 100644
--- a/src/gui/LoadRemotePatchWindow.cpp
+++ b/src/gui/LoadRemotePatchWindow.cpp
@@ -140,7 +140,7 @@ LoadRemotePatchWindow::open_clicked()
if (!_patch->path().is_root())
parent = _patch->path().parent();
- App::instance().loader()->load_patch(true, uri, Path("/"),
+ App::instance().loader()->load_patch(true, uri,
parent, symbol, _initial_data);
hide();
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 2a9646e2..c60d8c4c 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -1,5 +1,5 @@
/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
+ * Copyright (C) 2007-2011 David Robillard <http://drobilla.net>
*
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
@@ -31,10 +31,8 @@ using namespace Raul;
namespace Ingen {
namespace GUI {
-
ThreadedLoader::ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris, SharedPtr<EngineInterface> engine)
: _engine(engine)
- , _deprecated_loader(uris, engine)
{
set_name("Loader");
@@ -44,7 +42,6 @@ ThreadedLoader::ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris, SharedPtr<Engi
warn << "Failed to load ingen_serialisation module, load disabled." << endl;
}
-
SharedPtr<Parser>
ThreadedLoader::parser()
{
@@ -56,7 +53,6 @@ ThreadedLoader::parser()
return world->parser();
}
-
void
ThreadedLoader::_whipped()
{
@@ -71,11 +67,10 @@ ThreadedLoader::_whipped()
}
void
-ThreadedLoader::load_patch(bool merge,
- const Glib::ustring& document_uri,
- optional<Path> data_path,
- optional<Path> engine_parent,
- optional<Symbol> engine_symbol,
+ThreadedLoader::load_patch(bool merge,
+ const Glib::ustring& document_uri,
+ optional<Path> engine_parent,
+ optional<Symbol> engine_symbol,
optional<GraphObject::Properties> engine_data)
{
_mutex.lock();
@@ -90,36 +85,22 @@ ThreadedLoader::load_patch(bool merge,
engine_base = engine_parent.get().base();
}
- // Filthy hack to load deprecated patches based on file extension
- if (document_uri.substr(document_uri.length()-3) == ".om") {
- _events.push_back(sigc::hide_return(sigc::bind(
- sigc::mem_fun(_deprecated_loader,
- &DeprecatedLoader::load_patch),
- document_uri,
- merge,
- engine_parent,
- engine_symbol,
- *engine_data,
- false)));
- } else {
- _events.push_back(sigc::hide_return(sigc::bind(
- sigc::mem_fun(world->parser().get(),
- &Ingen::Serialisation::Parser::parse_file),
- App::instance().world(),
- App::instance().world()->engine().get(),
- document_uri,
- data_path,
- engine_parent,
- engine_symbol,
- engine_data)));
- }
+ _events.push_back(
+ sigc::hide_return(
+ sigc::bind(sigc::mem_fun(world->parser().get(),
+ &Ingen::Serialisation::Parser::parse_file),
+ App::instance().world(),
+ App::instance().world()->engine().get(),
+ document_uri,
+ engine_parent,
+ engine_symbol,
+ engine_data)));
whip();
_mutex.unlock();
}
-
void
ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename)
{
@@ -134,7 +115,6 @@ ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename)
whip();
}
-
void
ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& filename)
{
@@ -146,6 +126,5 @@ ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& file
}
}
-
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index a6389df8..96c64af3 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -1,5 +1,5 @@
/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
+ * Copyright (C) 2007-2011 David Robillard <http://drobilla.net>
*
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
@@ -26,7 +26,6 @@
#include "raul/Slave.hpp"
#include <glibmm/thread.h>
#include "interface/EngineInterface.hpp"
-#include "client/DeprecatedLoader.hpp"
#include "serialisation/Serialiser.hpp"
#include "serialisation/Parser.hpp"
using std::string;
@@ -40,7 +39,6 @@ using namespace Serialisation;
namespace GUI {
-
/** Thread for loading patch files.
*
* This is a seperate thread so it can send all the loading message without
@@ -55,11 +53,11 @@ namespace GUI {
class ThreadedLoader : public Raul::Slave
{
public:
- ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris, SharedPtr<EngineInterface> engine);
+ ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris,
+ SharedPtr<EngineInterface> engine);
void load_patch(bool merge,
const Glib::ustring& document_uri,
- optional<Raul::Path> data_path,
optional<Raul::Path> engine_parent,
optional<Raul::Symbol> engine_symbol,
optional<GraphObject::Properties> engine_data);
@@ -79,12 +77,10 @@ private:
SharedPtr<EngineInterface> _engine;
- DeprecatedLoader _deprecated_loader;
- Glib::Mutex _mutex;
- list<Closure> _events;
+ Glib::Mutex _mutex;
+ list<Closure> _events;
};
-
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/wscript b/src/gui/wscript
index 54919362..8e6bf344 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -63,7 +63,6 @@ def build(bld):
LV2CORE
SLV2
SOUP
- XML2
''')
# Glade XML UI definition