summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchPropertiesWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-12 00:23:16 +0000
committerDavid Robillard <d@drobilla.net>2008-10-12 00:23:16 +0000
commit57698964f1e88b2b74a0ce31ffaba3044d884dac (patch)
treeaa9ca938f024000b60fa9d49be490b2446a5a789 /src/gui/PatchPropertiesWindow.cpp
parentfa9837f95a2d3be3f5eb94fcbf8222bb208d87db (diff)
downloadingen-57698964f1e88b2b74a0ce31ffaba3044d884dac.tar.gz
ingen-57698964f1e88b2b74a0ce31ffaba3044d884dac.tar.bz2
ingen-57698964f1e88b2b74a0ce31ffaba3044d884dac.zip
Eliminate redundant ingen ontology parts, and save ingen Patchage in an LV2 compatible format.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1651 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchPropertiesWindow.cpp')
-rw-r--r--src/gui/PatchPropertiesWindow.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/gui/PatchPropertiesWindow.cpp b/src/gui/PatchPropertiesWindow.cpp
index f4003d31..caf81452 100644
--- a/src/gui/PatchPropertiesWindow.cpp
+++ b/src/gui/PatchPropertiesWindow.cpp
@@ -30,6 +30,7 @@ namespace GUI {
PatchPropertiesWindow::PatchPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
+ glade_xml->get_widget("properties_name_entry", _name_entry);
glade_xml->get_widget("properties_author_entry", _author_entry);
glade_xml->get_widget("properties_description_textview", _textview);
glade_xml->get_widget("properties_cancel_button", _cancel_button);
@@ -51,11 +52,15 @@ 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("dc:creator");
+ const Atom& name_atom = _patch_model->get_property("doap:name");
+ _name_entry->set_text(
+ (name_atom.type() == Atom::STRING) ? name_atom.get_string() : "" );
+
+ const Atom& author_atom = _patch_model->get_property("dc:creator");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_variable("dc:description");
+ const Atom& desc_atom = _patch_model->get_property("dc:description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -64,11 +69,15 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = _patch_model->get_variable("dc:creator");
+ const Atom& name_atom = _patch_model->get_property("doap:name");
+ _name_entry->set_text(
+ (name_atom.type() == Atom::STRING) ? name_atom.get_string() : "" );
+
+ const Atom& author_atom = _patch_model->get_property("dc:creator");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_variable("dc:description");
+ const Atom& desc_atom = _patch_model->get_property("dc:description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
@@ -79,9 +88,11 @@ PatchPropertiesWindow::cancel_clicked()
void
PatchPropertiesWindow::ok_clicked()
{
- App::instance().engine()->set_variable(_patch_model->path(), "dc:creator",
+ App::instance().engine()->set_property(_patch_model->path(), "doap:name",
+ Atom(_name_entry->get_text()));
+ App::instance().engine()->set_property(_patch_model->path(), "dc:creator",
Atom(_author_entry->get_text()));
- App::instance().engine()->set_variable(_patch_model->path(), "dc:description",
+ App::instance().engine()->set_property(_patch_model->path(), "dc:description",
Atom(_textview->get_buffer()->get_text()));
hide();
}