diff options
author | David Robillard <d@drobilla.net> | 2008-06-09 17:56:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-06-09 17:56:39 +0000 |
commit | 7c4ca637481420c82a1d985987418af6daf19439 (patch) | |
tree | 1e5bcc0daaf6cc45f7cd36f70d98b0998b66b0fe /src | |
parent | 4e736d0b31c56a7ab397c7399b3a53f726466c78 (diff) | |
download | ingen-7c4ca637481420c82a1d985987418af6daf19439.tar.gz ingen-7c4ca637481420c82a1d985987418af6daf19439.tar.bz2 ingen-7c4ca637481420c82a1d985987418af6daf19439.zip |
Store information from patch properties window.
Currently stored as variables but some other mechanism probably needs to exist to specifically set RDF data
for the patch (not wrapped up in a variable) to make the RDF of a patch more sane and like an LV2 plugin.
Fixes ticket #94.
git-svn-id: http://svn.drobilla.net/lad/ingen@1250 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/gui/App.cpp | 1 | ||||
-rw-r--r-- | src/libs/gui/PatchPropertiesWindow.cpp | 17 | ||||
-rw-r--r-- | src/progs/ingen/main.cpp | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index 8b3013ad..736ec4bb 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -106,6 +106,7 @@ App::App(Ingen::Shared::World* world) rdf_world.add_prefix("lv2", "http://lv2plug.in/ns/lv2core#"); rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#"); + rdf_world.add_prefix("dc", "http://purl.org/dc/elements/1.1/"); PluginModel::set_rdf_world(rdf_world); diff --git a/src/libs/gui/PatchPropertiesWindow.cpp b/src/libs/gui/PatchPropertiesWindow.cpp index d8e98e34..f4003d31 100644 --- a/src/libs/gui/PatchPropertiesWindow.cpp +++ b/src/libs/gui/PatchPropertiesWindow.cpp @@ -19,6 +19,7 @@ #include <iostream> #include "client/PatchModel.hpp" #include "PatchPropertiesWindow.hpp" +#include "App.hpp" using namespace std; @@ -50,11 +51,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model) property_title() = patch_model->path() + " Properties"; _patch_model = patch_model; - const Atom& author_atom = _patch_model->get_variable("author"); + const Atom& author_atom = _patch_model->get_variable("dc:creator"); _author_entry->set_text( (author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" ); - const Atom& desc_atom = _patch_model->get_variable("description"); + const Atom& desc_atom = _patch_model->get_variable("dc:description"); _textview->get_buffer()->set_text( (desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" ); } @@ -63,11 +64,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model) void PatchPropertiesWindow::cancel_clicked() { - const Atom& author_atom = _patch_model->get_variable("author"); + const Atom& author_atom = _patch_model->get_variable("dc:creator"); _author_entry->set_text( (author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" ); - const Atom& desc_atom = _patch_model->get_variable("description"); + const Atom& desc_atom = _patch_model->get_variable("dc:description"); _textview->get_buffer()->set_text( (desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" ); @@ -78,10 +79,10 @@ PatchPropertiesWindow::cancel_clicked() void PatchPropertiesWindow::ok_clicked() { - cerr << "FIXME: patch properties\n"; - - //m_patch_model->set_variable("author", Atom(_author_entry->get_text().c_str())); - //m_patch_model->set_variable("description", Atom(_textview->get_buffer()->get_text().c_str())); + App::instance().engine()->set_variable(_patch_model->path(), "dc:creator", + Atom(_author_entry->get_text())); + App::instance().engine()->set_variable(_patch_model->path(), "dc:description", + Atom(_textview->get_buffer()->get_text())); hide(); } diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp index 57380250..13992c17 100644 --- a/src/progs/ingen/main.cpp +++ b/src/progs/ingen/main.cpp @@ -93,6 +93,7 @@ main(int argc, char** argv) world->rdf_world->add_prefix("lv2", "http://lv2plug.in/ns/lv2core#"); world->rdf_world->add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); world->rdf_world->add_prefix("doap", "http://usefulinc.com/ns/doap#"); + world->rdf_world->add_prefix("dc", "http://purl.org/dc/elements/1.1/"); /* Run engine */ if (args.engine_flag) { |