DrewNaylor / guinget

Unofficial GUI for Microsoft's Windows Package Manager (winget). Kinda like Synaptic, but for Windows. Not associated with either Microsoft or the Synaptic project, and Microsoft does not endorse this software.
Apache License 2.0
135 stars 3 forks source link

On startup, block menu items that aren't available when no packages are selected or too many packages are selected. #88

Closed DrewNaylor closed 3 years ago

DrewNaylor commented 3 years ago

May as well do it in this version.

DrewNaylor commented 3 years ago

Probably could do it by passing the selected items count to a sub, then checking the number. If it's greater than 0, allow everything. Otherwise if it's 0, block everything that requires packages to be selected. If it's equal to 1, allow everything that's available when one package is selected, but if it's not equal to 1, block everything that can only be used with one package.

DrewNaylor commented 3 years ago

I really can't figure out a way to make this work reliably when it gets unblocked during a cache update.