Commits on Source (7)
-
this stuff is used by prefs, and is not even used by help currently.
74046ea9 -
it is used only to define the structure of `categories_array` which lives in `vlc_config_cat.h`; it belongs next to that.
0db30968 -
...to prepare for divergence in the data held for categories vs. subcategories. we replace here the generic helpers: - `config_CategoryNameGet()` - `config_CategoryHelpGet()` with: - `vlc_config_cat_GetName()` - `vlc_config_cat_GetHelp()` - `vlc_config_subcat_GetName()` - `vlc_config_subcat_GetHelp()` the new names conform to the format requested for the `vlc_config_subcat_IsGeneral()` function added in MR 313. opportunity was taken to remove the old style prefixes from the attributes of `config_category_t`, affecting a few additional lines, avoiding introducing inconsistency or new instances of the old style with the addition of `config_subcategory_t`.
e9edfd60 -
these 'index-of' helpers find the index for the given cat/subcat. this allows us to de-duplicate the code from the other helper functions (both for those that already exist and ones to be added in further commits). they loop based upon array length rather than looking out for some particular condition of varying properties in an end marker record, allowing us to also drop those. i used an index-of design here rather than have functions that return pointers because there will be a secondary use for index-of helpers in later commits.
5569648c -
with respect to plugin vs. module. before we adjust it in the next commit.
b12d45d1 -
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.
e967f81f -
...and indeed ignoring them. as per the previous commit, we want to get rid of cat hints from option sets, instead looking up cats from subcats. we have already implemented in the previous commit the lookup mechanism, and started ignoring cat hints from plugins, but still relied upon them from the core set for constructing the base tree (and reacted to them in building core panels). here we adjust the base tree construction code to completely remove our reliance upon cat hints. we also now completely ignore them when building core panels (no difference results from this). we are now in a position to purge the cat items themselves from the entire infrastructure along with all remaining artefacts, though that will be done separately later. note that the macos code needed no such change here, it was taken care of completely in the previous commit.
68039794
Showing
- include/vlc_config_cat.h 127 additions, 66 deletionsinclude/vlc_config_cat.h
- include/vlc_configuration.h 0 additions, 7 deletionsinclude/vlc_configuration.h
- modules/gui/macosx/preferences/prefs.m 19 additions, 19 deletionsmodules/gui/macosx/preferences/prefs.m
- modules/gui/qt/dialogs/preferences/complete_preferences.cpp 70 additions, 65 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.cpp
- modules/gui/qt/dialogs/preferences/complete_preferences.hpp 8 additions, 9 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.hpp