summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchTreeWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
commit19928bb583e72802746b89e322f71ecc0fcb7427 (patch)
tree95912dc84d8c9dcf57939398514feaf148c1cd63 /src/gui/PatchTreeWindow.cpp
parent96f839e64de70a23210847e322d24690299287fe (diff)
downloadingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.gz
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.bz2
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.zip
The great ID refactoring of 2009.
Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchTreeWindow.cpp')
-rw-r--r--src/gui/PatchTreeWindow.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index f3a24920..0b699f64 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -25,6 +25,7 @@
#include "WindowFactory.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -88,8 +89,8 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
if (!pm->parent()) {
Gtk::TreeModel::iterator iter = _patch_treestore->append();
Gtk::TreeModel::Row row = *iter;
- if (pm->path() == "/") {
- row[_patch_tree_columns.name_col] = App::instance().engine()->uri();
+ if (pm->path().is_root()) {
+ row[_patch_tree_columns.name_col] = App::instance().engine()->uri().str();
} else {
row[_patch_tree_columns.name_col] = pm->path().name();
}
@@ -193,20 +194,18 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
Gtk::TreeModel::Row row = *active;
SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
- Glib::ustring patch_path = pm->path();
-
assert(pm);
if (_enable_signal)
- App::instance().engine()->set_variable(patch_path, "ingen:enabled", (bool)!pm->enabled());
+ App::instance().engine()->set_variable(pm->path(), "ingen:enabled", (bool)!pm->enabled());
}
void
-PatchTreeWindow::patch_variable_changed(const string& key, const Raul::Atom& value, const Path& path)
+PatchTreeWindow::patch_variable_changed(const URI& key, const Atom& value, const Path& path)
{
_enable_signal = false;
- if (key == "ingen:enabled" && value.type() == Atom::BOOL) {
+ if (key.str() == "ingen:enabled" && value.type() == Atom::BOOL) {
Gtk::TreeModel::iterator i = find_patch(_patch_treestore->children(), path);
if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;