config: lookup cat from subcat
having `set_category()` + `set_subcategory()` pairs of calls to setup the location in the preferences tree where a plugin node needs to be attached to, with corresponding pairs of option records in the plugin option sets, is silly, inefficient and bug prone. all we need is the subcat records and we can look up the corresponding cat from the data table when it comes to time to build the tree. here we take a step forward to address this, adding cat data to the subcat data table, and a lookup function making use of it. note, qt and macos tree construction are done a little differently from each other, so while the change here is entirely sufficient to rid the core option set of category hints as far as the macos code is concerned, more work in a subsequent commit will be needed for qt. thus the purge of `set_category()` must be postponed for a later commit and so for now we must just ignore those records. a subcat table entry was added for `SUBCAT_HIDDEN` since for now the qt code could potentially look this up and we should preserve the existing behaviour for it for now.
Showing
- include/vlc_config_cat.h 50 additions, 39 deletionsinclude/vlc_config_cat.h
- modules/gui/macosx/preferences/prefs.m 12 additions, 12 deletionsmodules/gui/macosx/preferences/prefs.m
- modules/gui/qt/dialogs/preferences/complete_preferences.cpp 8 additions, 4 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.cpp
- modules/gui/qt/dialogs/preferences/complete_preferences.hpp 5 additions, 7 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.hpp
Loading
Please register or sign in to comment