Use the value name when available. It's true that the sub-menu contains
entries to manage overall icons as well, but the common use case is
changing the icon for the particular value, so use the value name in the
menu entry.
The name is in the dict entry 'value_icon', which might not exist, be a file name, or be None. This is a path rooted at the 'tb_icons' directory. Icons that come from templates are in the 'template_icons' subdirectory, in which case a slash is used as the path separator.
This scheme could be used to replace the existing tag browser category icon selection. I didn't do that because the risk seemed high. The category icon dict is used in several places and in plugins. It also has meaning for search and user categories, where the new value icon stuff doesn't.
If the new facilities are not used then performance risk is near zero. Performance shouldn't be an issue if used because the icon dictionaries scale well. The exception might be templates. We have no control over the complexity or performance of user-written templates.
This PR fixes a few bugs I found while implementing the new feature.
- When right-clicking in tag browser white space, remove any context menu that depends on having an index.
- Remove general subcategorization menu options from the context menu. These are global, not part of context for the current index.
- Add a menu option to the config menu to open Prefs / L&F / Tag browser. This permits easily getting to the global subcat and display options, avoiding adding more menu lines to the config menu.
In the tag browser and booklist the icons resize automatically with the font. That doesn't happen in book details because there isn't any notion of a "row". With this option the user can make the size as desired. For more background see the first few posts of https://www.mobileread.com/forums/showthread.php?t=365537