Skip to content
  • Jehan's avatar
    app, libgimp, pdb: factorize a bunch of similar code into gimp_pdb_get_resource(). · d439e9ff
    Jehan authored
    Rather than reimplementing the same checks for every possible resource data
    type, just do it once and redirect to the correct factory container.
    
    For the libgimp API, we leave per-type functions `gimp_*_get_by_name()` (where *
    can be brush|gradient|font|palette|pattern so far), but internally they all use
    gimp_pdb_get_resource().
    
    Note that eventually we want these functions to return a list of resources as it
    should be possible to have several resources of a given type with the same name
    (since they are made by third-party who might have had the same idea of a name).
    d439e9ff