summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-09 18:12:07 +0000
committerDavid Robillard <d@drobilla.net>2011-03-09 18:12:07 +0000
commit7703427f6832cb3195580fda0ab506e7c2948032 (patch)
tree14cc6c96302cd0902dcf9ed1120798c6d31acbb2 /src/gui
parent2edb1283923b3c9b31d289342c74688975cb45fa (diff)
downloadingen-7703427f6832cb3195580fda0ab506e7c2948032.tar.gz
ingen-7703427f6832cb3195580fda0ab506e7c2948032.tar.bz2
ingen-7703427f6832cb3195580fda0ab506e7c2948032.zip
Update for new SLV2 API.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3058 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeMenu.cpp14
-rw-r--r--src/gui/PatchCanvas.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index b65a7e1f..806282fb 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -99,12 +99,12 @@ NodeMenu::init(SharedPtr<NodeModel> node)
if (presets) {
_presets_menu = Gtk::manage(new Gtk::Menu());
- for (unsigned i = 0; i < slv2_values_size(presets); ++i) {
- SLV2Value uri = slv2_values_get_at(presets, i);
+ SLV2_FOREACH(i, presets) {
+ SLV2Value uri = slv2_values_get(presets, i);
SLV2Values titles = slv2_plugin_get_value_for_subject(
plugin->slv2_plugin(), uri, title_pred);
if (titles) {
- SLV2Value title = slv2_values_get_at(titles, 0);
+ SLV2Value title = slv2_values_get_first(titles);
_presets_menu->items().push_back(
Gtk::Menu_Helpers::MenuElem(
slv2_value_as_string(title),
@@ -203,15 +203,15 @@ NodeMenu::on_preset_activated(const std::string& uri)
subject,
port_pred);
App::instance().engine()->bundle_begin();
- for (unsigned i = 0; i < slv2_values_size(ports); ++i) {
- SLV2Value uri = slv2_values_get_at(ports, i);
+ SLV2_FOREACH(i, ports) {
+ SLV2Value uri = slv2_values_get(ports, i);
SLV2Values values = slv2_plugin_get_value_for_subject(
plugin->slv2_plugin(), uri, value_pred);
SLV2Values symbols = slv2_plugin_get_value_for_subject(
plugin->slv2_plugin(), uri, symbol_pred);
if (values && symbols) {
- SLV2Value val = slv2_values_get_at(values, 0);
- SLV2Value sym = slv2_values_get_at(symbols, 0);
+ SLV2Value val = slv2_values_get_first(values);
+ SLV2Value sym = slv2_values_get_first(symbols);
App::instance().engine()->set_property(
node->path().base() + slv2_value_as_string(sym),
App::instance().uris().ingen_value,
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 52702b30..8f76e281 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -249,8 +249,8 @@ PatchCanvas::build_plugin_menu()
SLV2PluginClasses classes = slv2_world_get_plugin_classes(PluginModel::slv2_world());
LV2Children children;
- for (unsigned i = 0; i < slv2_plugin_classes_size(classes); ++i) {
- SLV2PluginClass c = slv2_plugin_classes_get_at(classes, i);
+ SLV2_FOREACH(i, classes) {
+ SLV2PluginClass c = slv2_plugin_classes_get(classes, i);
SLV2Value p = slv2_plugin_class_get_parent_uri(c);
if (!p)
p = slv2_plugin_class_get_uri(lv2_plugin);