From 19928bb583e72802746b89e322f71ecc0fcb7427 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 04:05:32 +0000 Subject: 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 --- src/gui/PatchTreeWindow.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/gui/PatchTreeWindow.cpp') 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 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 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; -- cgit v1.2.1