Use new tag-search API
authorRobin Gareus <robin@gareus.org>
Wed, 31 Jan 2018 13:04:14 +0000 (14:04 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 31 Jan 2018 13:04:14 +0000 (14:04 +0100)
This fixes an issue where "By Tag" dropdown contained empty menu-items,
in case a hidden plugin is the only one with a given tag.

gtk2_ardour/mixer_ui.cc
gtk2_ardour/plugin_selector.cc

index daf0cf46b5628caa10db785c5f5d1069329b4a67..209644c5d1d15a514ff4241e4e30a6421179d119 100644 (file)
@@ -2684,7 +2684,7 @@ Mixer_UI::refill_tag_combo ()
 {
        PluginManager& mgr (PluginManager::instance());
 
-       std::vector<std::string> tags = mgr.get_all_tags (true);
+       std::vector<std::string> tags = mgr.get_all_tags (PluginManager::OnlyFavorites);
 
        favorite_plugins_tag_combo.clear();
        favorite_plugins_tag_combo.append_text (_("Show All"));
index 077c600ffde002253ae5d3b89cc2841b1ba1581f..e7e804482123a5137b4b981a89dd7ed1c5feaeb0 100644 (file)
@@ -1126,7 +1126,7 @@ PluginSelector::create_by_tags_menu (ARDOUR::PluginInfoList& all_plugs)
        by_tags->set_name("ArdourContextMenu");
        MenuList& by_tags_items = by_tags->items();
 
-       std::vector<std::string> all_tags = manager.get_all_tags(false);
+       std::vector<std::string> all_tags = manager.get_all_tags (PluginManager::NoHidden);
        for (vector<string>::iterator t = all_tags.begin(); t != all_tags.end(); ++t) {
                Gtk::Menu *submenu = new Gtk::Menu;
                by_tags_items.push_back (MenuElem (*t, *manage (submenu)));