Changeset 1250

Show
Ignore:
Timestamp:
06/09/08 10:56:39 (3 months ago)
Author:
drobilla
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ingen/src/libs/gui/App.cpp

    r1208 r1250  
    107107        rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); 
    108108        rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#"); 
     109        rdf_world.add_prefix("dc", "http://purl.org/dc/elements/1.1/"); 
    109110         
    110111        PluginModel::set_rdf_world(rdf_world); 
  • ingen/src/libs/gui/PatchPropertiesWindow.cpp

    r949 r1250  
    2020#include "client/PatchModel.hpp" 
    2121#include "PatchPropertiesWindow.hpp" 
     22#include "App.hpp" 
    2223 
    2324using namespace std; 
     
    5152        _patch_model = patch_model; 
    5253         
    53         const Atom& author_atom = _patch_model->get_variable("author"); 
     54        const Atom& author_atom = _patch_model->get_variable("dc:creator"); 
    5455        _author_entry->set_text( 
    5556                (author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" ); 
    5657 
    57         const Atom& desc_atom = _patch_model->get_variable("description"); 
     58        const Atom& desc_atom = _patch_model->get_variable("dc:description"); 
    5859        _textview->get_buffer()->set_text( 
    5960                (desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" ); 
     
    6465PatchPropertiesWindow::cancel_clicked() 
    6566{ 
    66         const Atom& author_atom = _patch_model->get_variable("author"); 
     67        const Atom& author_atom = _patch_model->get_variable("dc:creator"); 
    6768        _author_entry->set_text( 
    6869                (author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" ); 
    6970 
    70         const Atom& desc_atom = _patch_model->get_variable("description"); 
     71        const Atom& desc_atom = _patch_model->get_variable("dc:description"); 
    7172        _textview->get_buffer()->set_text( 
    7273                (desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" ); 
     
    7980PatchPropertiesWindow::ok_clicked() 
    8081{ 
    81         cerr << "FIXME: patch properties\n"; 
    82  
    83         //m_patch_model->set_variable("author", Atom(_author_entry->get_text().c_str())); 
    84         //m_patch_model->set_variable("description", Atom(_textview->get_buffer()->get_text().c_str())); 
     82        App::instance().engine()->set_variable(_patch_model->path(), "dc:creator", 
     83                Atom(_author_entry->get_text())); 
     84        App::instance().engine()->set_variable(_patch_model->path(), "dc:description", 
     85               Atom(_textview->get_buffer()->get_text())); 
    8586        hide(); 
    8687} 
  • ingen/src/progs/ingen/main.cpp

    r1198 r1250  
    9494        world->rdf_world->add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); 
    9595        world->rdf_world->add_prefix("doap", "http://usefulinc.com/ns/doap#"); 
     96        world->rdf_world->add_prefix("dc", "http://purl.org/dc/elements/1.1/"); 
    9697 
    9798        /* Run engine */