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/libs/gui/PatchPropertiesWindow.cpp | |
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/libs/gui/PatchPropertiesWindow.cpp')
-rw-r--r-- | src/libs/gui/PatchPropertiesWindow.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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(); } |