Changeset 2092

Show
Ignore:
Timestamp:
06/03/09 17:47:48 (15 months ago)
Author:
drobilla
Message:

Don't treat non-plugin metadata as plugin data.

Location:
trunk/ingen/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/ingen/src/client/ClientStore.cpp

    r2063 r2092  
    275275 
    276276        bool is_path = Path::is_valid(uri.str()); 
    277         bool is_meta = uri.substr(0, 8) == "meta:#"; 
     277        bool is_meta = uri.substr(0, 6) == "meta:#"; 
    278278 
    279279        if (!(is_path || is_meta)) { 
    280280                const URI& type_uri = properties.find("rdf:type")->second.get_uri(); 
    281                 SharedPtr<PluginModel> p(new PluginModel(uri, type_uri, properties)); 
    282                 add_plugin(p); 
     281                if (Plugin::type_from_uri(type_uri.str()) != Plugin::NIL) { 
     282                        SharedPtr<PluginModel> p(new PluginModel(uri, type_uri, properties)); 
     283                        add_plugin(p); 
     284                        return; 
     285                } 
     286        } 
     287 
     288        string path_str = is_meta ? (string("/") + uri.chop_start("#")) : uri.str(); 
     289        if (!Path::is_valid(path_str)) { 
     290                cerr << "ERROR: Bad path: " << uri.str() << " - " << path_str << endl; 
    283291                return; 
    284292        } 
  • trunk/ingen/src/common/interface/Plugin.hpp

    r2000 r2092  
    3030{ 
    3131public: 
    32         enum Type { LV2, LADSPA, Internal, Patch }; 
     32        enum Type { NIL, LV2, LADSPA, Internal, Patch }; 
    3333 
    3434        virtual Type type() const = 0; 
     
    5353                else if (uri == "ingen:Patch") 
    5454                        return Patch; 
    55                 else 
    56                         std::cerr << "WARNING: Unknown plugin type " << uri << std::endl; 
    57                 return Internal; 
     55                return NIL; 
    5856        } 
    5957}; 
  • trunk/ingen/src/gui/LoadPluginWindow.cpp

    r2052 r2092  
    246246        case Plugin::Patch: 
    247247                row[_plugins_columns._col_type] = "Patch"; 
     248                break; 
     249        case Plugin::NIL: 
     250                row[_plugins_columns._col_type] = "?"; 
    248251                break; 
    249252        }