Skip to content
Snippets Groups Projects
  1. Dec 15, 2021
    • Lyndon Brown's avatar
      config: lookup cat from subcat · e967f81f
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      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
    • Lyndon Brown's avatar
      qt: clarify prefs tree construction documentation · b12d45d1
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      with respect to plugin vs. module.
      
      before we adjust it in the next commit.
      b12d45d1
    • Lyndon Brown's avatar
      config: add and use index-of helpers for cat/subcat array iteration · 5569648c
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      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
    • Lyndon Brown's avatar
      config: split the cat/subcat table and name/help getters · e9edfd60
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      ...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
    • Lyndon Brown's avatar
      config: move struct to where it belongs · 0db30968
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      it is used only to define the structure of `categories_array` which
      lives in `vlc_config_cat.h`; it belongs next to that.
      0db30968
    • Lyndon Brown's avatar
      config: fix incorrect header guard name · 74046ea9
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      this stuff is used by prefs, and is not even used by help currently.
      74046ea9
  2. Dec 14, 2021
  3. Dec 13, 2021
  4. Dec 11, 2021
  5. Dec 10, 2021
Loading