Add dialog to allow removal of plugin presets. Should fix #2662.

git-svn-id: svn://localhost/ardour2/branches/3.0@8196 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-12-06 04:29:06 +00:00
parent bf7b8df028
commit 3975355a5f
9 changed files with 167 additions and 3 deletions

View file

@ -148,6 +148,8 @@ class Plugin : public PBD::StatefulDestructible, public Latent
virtual bool has_editor() const = 0;
PBD::Signal0<void> PresetAdded;
PBD::Signal0<void> PresetRemoved;
PBD::Signal2<void,uint32_t,float> ParameterChanged;
/* NOTE: this block of virtual methods looks like the interface

View file

@ -221,6 +221,8 @@ Plugin::remove_preset (string name, string domain)
presets.erase (p->uri);
write_preset_file (envvar, domain);
PresetRemoved (); /* EMIT SIGNAL */
}
string
@ -309,7 +311,11 @@ Plugin::save_preset (string name, string domain)
presets.insert (make_pair (uri, PresetRecord (uri, name)));
free (uri);
return write_preset_file (envvar, domain);
bool const r = write_preset_file (envvar, domain);
PresetAdded (); /* EMIT SIGNAL */
return r;
}
PluginPtr