From 7c4ca637481420c82a1d985987418af6daf19439 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Jun 2008 17:56:39 +0000 Subject: 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 --- src/libs/gui/PatchPropertiesWindow.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/libs/gui/PatchPropertiesWindow.cpp') 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 #include "client/PatchModel.hpp" #include "PatchPropertiesWindow.hpp" +#include "App.hpp" using namespace std; @@ -50,11 +51,11 @@ PatchPropertiesWindow::set_patch(SharedPtr 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 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(); } -- cgit v1.2.1