13
0

Fix plugin factory tags

* tag-file is loaded early on (before scanning plugin) retain factory
  set tag from file, don't use plugin-categories.
* load user plugin-tag file after factory plugin-tag file
This commit is contained in:
Robin Gareus 2018-01-30 03:59:47 +01:00
parent d282b91d96
commit 19f62d331c

View File

@ -1550,7 +1550,7 @@ PluginManager::load_tags ()
vector<std::string> tmp;
find_files_matching_pattern (tmp, plugin_metadata_search_path (), "plugin_tags");
for (vector<std::string>::const_iterator p = tmp.begin (); p != tmp.end(); ++p) {
for (vector<std::string>::const_reverse_iterator p = tmp.rbegin (); p != tmp.rend(); ++p) {
std::string path = *p;
info << string_compose (_("Loading plugin meta data file %1"), path) << endmsg;
if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
@ -1591,7 +1591,7 @@ PluginManager::set_tags (PluginType t, string id, string tag, bool factory, bool
if (i == ptags.end()) {
ptags.insert (ps);
} else {
if (!(*i).user_set || force || ((*i).user_set && !factory)) {
if (force || ((*i).user_set && !factory)) {
ptags.erase (ps);
ptags.insert (ps);
}