Commits on Source (18)
-
every category must have one general subcat, which is now made more clear / enforced, by being captured in the category data table. the new helper that looks up the general subcat for a given cat will be put to use by some later commits. for now it is used only to reimplement the is-general helper to rely upon the data table.
d3b61926 -
instead of the pointlessly confusing design of sometimes storing subcat IDs in the 'subcat_id' attribute and sometimes the 'object_id' attribute, where cat IDs are always otherwise stored, let's simplify things by renaming the 'object_id' property to 'cat_id', and consistently use 'cat_id' for category IDs and 'subcat_id' for subcat IDs.
eeeff5ff -
0387d06f
-
`data` is the pointer to an object belonging to the current category node. when handling a 'general' subcat, which gets "merged" into the category node, all we need to do is modify the `data` object's attributes. we do not need to save the pointer to this object in the tree node object, which was already done earlier.
5a4af7f6 -
non-functional change, just reorganising the code, splitting out the node creation and locating routines into helper methods. this forms the basis for cleanly implementing further improvements.
cb00f275 -
the advanced preferences tree construction code is designed to build up the base cat/subcat tree from the core option set only, then attach nodes for plugin sets to that tree. the author(s) of that code made the mistake of assuming that the core would always make use of all subcats, and thus that there would never be a problem when it came to attaching plugin nodes. this assumption has proved wrong, requiring redundant subcategory entries to be added to the core option set as a temporary fix for placement issues (1ca5bfaa). 5c18cff8 is a good example of the fragility of this design. it removed the video-splitter entry from the core set, which thus had the unintended and unnoticed consequence of plugins targetting this category suddenly being incorrectly attached to the parent cat node rather than appearing under the video-splitter subcat child node as before. having to keep 'unused' subcategories within the core option set just to support proper plugin node placement, besides being fragile, also has the disadvantage that if no plugins attach to it, we just end up with useless empty nodes in the tree. it is certainly not a good long term solution. this patch addresses the problems just described by implementing the ability for the plugin node handling portion of the tree contruction code to add missing tree nodes if and when it needs to. (this now makes 1ca5bfaa redundant).
84a95852 -
this reverts 1ca5bfaa with that now being redundant after the previous commit, which implemented a proper solution for the problem of placement issues for plugin nodes within the Qt advanced preferences tree, where a plugin targets a subcategory not used within the core option set. (the macos interface did not suffer from this flaw). with respect to 1ca5bfaa this removes the temporarily added `SUBCAT_VIDEO_SPLITTER` and `SUBCAT_ADVANCED_NETWORK` entries, while bc9567cc already removed `SUBCAT_AUDIO_MISC`. additionally this removed the now unused `SUBCAT_SOUT_VOD` entry, since we now have no plugins using it, nor options for it, which meant that it has been resulting in a pointless empty node. furthermore the unused `SUBCAT_INPUT_ACODEC` and `SUBCAT_INPUT_SCODEC` entries have been disabled such that we do not get pointless empty nodes should it ever be the case that no plugins are loaded that need them.
0921395a -
fixed arrays of pointers for tracking the handful of cat and subcat node items (but not plugin nodes), gives a much more efficient alternative to the current solution of searching the tree, each time we need to attach a new plugin node to the tree when building it. this also proves to have a secondary benefit per the next commit.
509d1dc5 -
using the new mapping arrays, we can more robustly create the base tree cat/subcat nodes used in the core option set, now working correctly should, deliberately or otherwise, the order of subcat use ever become mixed rather than all for each cat being used in a continuous block.
75bc26fb -
every cat has a general subcat, as defined in `vlc_config_cat.h`; let's simplify things by merging the code that applies the general subcat properties on top of the already established cat properties, rather than doing this in a seperate step after creation of the category node. note that the initial category item was given a `PrefsItemData` type of `TYPE_CATEGORY`. once the general subcat properties were merged, it was given the type `TYPE_CATSUBCAT`. this change now effectively wipes out the need for this distinction. this will be tackled in a follow up commit. you may also notice that this makes more clear the fact that category help text, as captured in the `vlc_config_cat.h` data table `categories_array` goes entirely unused, being overridden by that of the general subcat help text. removing this unused help text was a point of contention when i previously tried to bring it up, so for now it remains. (it is also unused in the macos gui).
23627043 -
per the previous commit, we have no need for the distinction now.
57d349ee -
plugins own option sets, not individual modules, and nodes in the prefs tree represent plugins. yes, we still loop over modules to get the sets and get properties from the first module in a plugin for labels, but that confusing disparity can be tackled later.
4abe052b -
redundant since a622a74a.
81a9d2c0 -
rather than allocating a custom object to hold data for each tree node, linked to the tree via `QObject` for ownership and destruction purposes, and the pointer held in a 'data' property of the node, let's simplify this significantly with a custom `QTreeWidgetItem`. `PrefsTreeData` has been renamed `PrefsTreeItem` and converted as such.
27a46c37 -
for cat & subcat nodes. this should only be assessed for plugin nodes.
ed67f132 -
each creation of a panel for a non-plugin (cat or subcat) node resulted in a call to `module_get_main()` to obtain the pointer to the main module to thus be in a position to get to the main config set. by doing this once when creating the `PrefsTree` instance and caching it, we can copy it into the existing module pointer property of cat and subcat nodes (which was only used previously for plugin type nodes) when they are created, and thus we will already have the necessary pointer available when creating the panels, saving dozens of calls.
dcebb25b -
(non-functional) - removed pointless init of `p_config` (changed two lines later). - merged two condition blocks working on the same condition (core cat/subcat node panel vs. plugin node panel logic). - renamed `head` to `heading` for clarity in doing so. - explained the commented-on `p_item++` in doing so. - dropped unnecessary `help` intermediary.
f1131bdc -
56c4b6f1
Showing
- include/vlc_config_cat.h 35 additions, 35 deletionsinclude/vlc_config_cat.h
- modules/gui/qt/dialogs/preferences/complete_preferences.cpp 202 additions, 274 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.cpp
- modules/gui/qt/dialogs/preferences/complete_preferences.hpp 37 additions, 24 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.hpp
- modules/gui/qt/dialogs/preferences/preferences.cpp 5 additions, 5 deletionsmodules/gui/qt/dialogs/preferences/preferences.cpp
- src/libvlc-module.c 2 additions, 8 deletionssrc/libvlc-module.c