[FR] KnownPluginList::addToMenu()

#1

Shouldn’t addToMenu() check if the plug-in exists before it’s added to the menu?

    static bool addToMenu (const KnownPluginList::PluginTree& tree, PopupMenu& m,
                           const OwnedArray<PluginDescription>& allPlugins,
                           const String& currentlyTickedPluginID)
    {
        bool isTicked = false;

        for (auto* sub : tree.subFolders)
        {
            PopupMenu subMenu;
            const bool isItemTicked = addToMenu (*sub, subMenu, allPlugins, currentlyTickedPluginID);
            isTicked = isTicked || isItemTicked;

            m.addSubMenu (sub->folder, subMenu, true, nullptr, isItemTicked, 0);
        }

        for (auto* plugin : tree.plugins)
        {
            auto name = plugin->name;
        
            /////////////////////// Add This...
        
            if (File::isAbsolutePath (plugin->fileOrIdentifier))
                {
                const File f (plugin->fileOrIdentifier);
                
                if (! f.exists())
                    continue;
                }
        
            ///////////////////////

            if (containsDuplicateNames (tree.plugins, name))
                name << " (" << plugin->pluginFormatName << ')';

            const bool isItemTicked = plugin->matchesIdentifierString (currentlyTickedPluginID);
            isTicked = isTicked || isItemTicked;

            m.addItem (allPlugins.indexOf (plugin) + menuIdBase, name, true, isItemTicked);
        }

        return isTicked;
    }

Cheers,

Rail

0 Likes

#2

Can you please move this to the Feature Request forum.

Thanks,

Rail

0 Likes

#3

Do you not have the pencil icon available?

For some reason I do and am able to edit other people’s titles and tags.

0 Likes

#4

No I don’t - that was an option I had at one point, but they changed the forum software or something (probably when I changed from a Pro to Indie) and I lost that privilege.

Without an elevated privilege you can only edit your post within a set time period.

Rail

0 Likes