Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
403 results
Show changes
Commits on Source (7)
  • 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
  • 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: 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: 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
    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: 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: build the prefs tree without needing cat hints · 68039794
    Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    ...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
......@@ -21,8 +21,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_HELP_H
#define VLC_HELP_H 1
#ifndef VLC_CONFIG_CAT_H
#define VLC_CONFIG_CAT_H
# include <vlc_plugin.h>
/*
......@@ -191,87 +192,147 @@
#define ANETWORK_TITLE N_( "Network" )
#define ANETWORK_HELP N_( "Advanced network settings." )
struct config_category_t
{
int id;
const char *name;
const char *help;
};
struct config_subcategory_t
{
int id;
int cat;
const char *name;
const char *help;
};
static const struct config_category_t categories_array[] =
{
/* Interface */
{ CAT_INTERFACE, INTF_TITLE, INTF_HELP },
{ SUBCAT_INTERFACE_GENERAL, INTF_TITLE, INTF_GENERAL_HELP },
{ SUBCAT_INTERFACE_MAIN, INTF_MAIN_TITLE, INTF_MAIN_HELP },
{ SUBCAT_INTERFACE_CONTROL, INTF_CONTROL_TITLE, INTF_CONTROL_HELP },
{ SUBCAT_INTERFACE_HOTKEYS, INTF_HOTKEYS_TITLE, INTF_HOTKEYS_HELP },
{ CAT_AUDIO, AUDIO_TITLE, AUDIO_HELP },
{ SUBCAT_AUDIO_GENERAL, AUDIO_TITLE, AUDIO_GENERAL_HELP },
{ SUBCAT_AUDIO_AOUT, AOUT_TITLE, AOUT_HELP },
{ SUBCAT_AUDIO_AFILTER, AFILTER_TITLE, AFILTER_HELP },
{ SUBCAT_AUDIO_RESAMPLER, ARESAMPLER_TITLE, AFILTER_HELP },
{ SUBCAT_AUDIO_VISUAL, AVISUAL_TITLE, AVISUAL_HELP },
{ CAT_VIDEO, VIDEO_TITLE, VIDEO_HELP },
{ SUBCAT_VIDEO_GENERAL, VIDEO_TITLE, VIDEO_GENERAL_HELP },
{ SUBCAT_VIDEO_VOUT, _VOUT_TITLE, VOUT_HELP },
{ SUBCAT_VIDEO_VFILTER, VFILTER_TITLE, VFILTER_HELP },
{ SUBCAT_VIDEO_SUBPIC, SUBPIC_TITLE, SUBPIC_HELP },
{ SUBCAT_VIDEO_SPLITTER, SPLITTER_TITLE, SPLITTER_HELP },
{ CAT_INPUT, INPUT_TITLE, INPUT_HELP },
{ SUBCAT_INPUT_GENERAL, INPUT_TITLE, INPUT_HELP },
{ SUBCAT_INPUT_ACCESS, ACCESS_TITLE, ACCESS_HELP },
{ SUBCAT_INPUT_DEMUX, DEMUX_TITLE, DEMUX_HELP },
{ SUBCAT_INPUT_VCODEC, VDEC_TITLE, VDEC_HELP },
{ SUBCAT_INPUT_ACODEC, ADEC_TITLE, ADEC_HELP },
{ SUBCAT_INPUT_SCODEC, SDEC_TITLE, SDEC_HELP },
{ SUBCAT_INPUT_STREAM_FILTER, STREAM_FILTER_TITLE, STREAM_FILTER_HELP },
{ CAT_SOUT, SOUT_TITLE, SOUT_HELP },
{ SUBCAT_SOUT_GENERAL, SOUT_TITLE, SOUT_GENERAL_HELP },
{ SUBCAT_SOUT_STREAM, SOUT_STREAM_TITLE, SOUT_STREAM_HELP },
{ SUBCAT_SOUT_MUX, SOUT_MUX_TITLE, SOUT_MUX_HELP },
{ SUBCAT_SOUT_ACO, SOUT_ACO_TITLE, SOUT_ACO_HELP },
{ SUBCAT_SOUT_PACKETIZER, SOUT_PACKET_TITLE, SOUT_PACKET_HELP },
{ SUBCAT_SOUT_RENDERER, SOUT_RENDER_TITLE, SOUT_RENDER_HELP },
{ SUBCAT_SOUT_VOD, SOUT_VOD_TITLE, SOUT_VOD_HELP },
{ CAT_PLAYLIST, PLAYLIST_TITLE , PLAYLIST_HELP },
{ SUBCAT_PLAYLIST_GENERAL, PLAYLIST_TITLE, PGENERAL_HELP },
{ SUBCAT_PLAYLIST_EXPORT, PEXPORT_TITLE, PEXPORT_HELP },
{ SUBCAT_PLAYLIST_SD, SD_TITLE, SD_HELP },
{ CAT_ADVANCED, AADVANCED_TITLE, AADVANCED_HELP },
{ SUBCAT_ADVANCED_MISC, MISC_TITLE, AADVANCED_HELP },
{ SUBCAT_ADVANCED_NETWORK, ANETWORK_TITLE, ANETWORK_HELP },
{ -1, NULL, NULL }
{ CAT_INTERFACE, INTF_TITLE, INTF_HELP },
{ CAT_AUDIO, AUDIO_TITLE, AUDIO_HELP },
{ CAT_VIDEO, VIDEO_TITLE, VIDEO_HELP },
{ CAT_INPUT, INPUT_TITLE, INPUT_HELP },
{ CAT_SOUT, SOUT_TITLE, SOUT_HELP },
{ CAT_PLAYLIST, PLAYLIST_TITLE, PLAYLIST_HELP },
{ CAT_ADVANCED, AADVANCED_TITLE, AADVANCED_HELP },
};
static const struct config_subcategory_t subcategories_array[] =
{
{ SUBCAT_INTERFACE_GENERAL, CAT_INTERFACE, INTF_TITLE, INTF_GENERAL_HELP },
{ SUBCAT_INTERFACE_MAIN, CAT_INTERFACE, INTF_MAIN_TITLE, INTF_MAIN_HELP },
{ SUBCAT_INTERFACE_CONTROL, CAT_INTERFACE, INTF_CONTROL_TITLE, INTF_CONTROL_HELP },
{ SUBCAT_INTERFACE_HOTKEYS, CAT_INTERFACE, INTF_HOTKEYS_TITLE, INTF_HOTKEYS_HELP },
{ SUBCAT_AUDIO_GENERAL, CAT_AUDIO, AUDIO_TITLE, AUDIO_GENERAL_HELP },
{ SUBCAT_AUDIO_AOUT, CAT_AUDIO, AOUT_TITLE, AOUT_HELP },
{ SUBCAT_AUDIO_AFILTER, CAT_AUDIO, AFILTER_TITLE, AFILTER_HELP },
{ SUBCAT_AUDIO_RESAMPLER, CAT_AUDIO, ARESAMPLER_TITLE, AFILTER_HELP },
{ SUBCAT_AUDIO_VISUAL, CAT_AUDIO, AVISUAL_TITLE, AVISUAL_HELP },
{ SUBCAT_VIDEO_GENERAL, CAT_VIDEO, VIDEO_TITLE, VIDEO_GENERAL_HELP },
{ SUBCAT_VIDEO_VOUT, CAT_VIDEO, _VOUT_TITLE, VOUT_HELP },
{ SUBCAT_VIDEO_VFILTER, CAT_VIDEO, VFILTER_TITLE, VFILTER_HELP },
{ SUBCAT_VIDEO_SUBPIC, CAT_VIDEO, SUBPIC_TITLE, SUBPIC_HELP },
{ SUBCAT_VIDEO_SPLITTER, CAT_VIDEO, SPLITTER_TITLE, SPLITTER_HELP },
{ SUBCAT_INPUT_GENERAL, CAT_INPUT, INPUT_TITLE, INPUT_HELP },
{ SUBCAT_INPUT_ACCESS, CAT_INPUT, ACCESS_TITLE, ACCESS_HELP },
{ SUBCAT_INPUT_DEMUX, CAT_INPUT, DEMUX_TITLE, DEMUX_HELP },
{ SUBCAT_INPUT_VCODEC, CAT_INPUT, VDEC_TITLE, VDEC_HELP },
{ SUBCAT_INPUT_ACODEC, CAT_INPUT, ADEC_TITLE, ADEC_HELP },
{ SUBCAT_INPUT_SCODEC, CAT_INPUT, SDEC_TITLE, SDEC_HELP },
{ SUBCAT_INPUT_STREAM_FILTER, CAT_INPUT, STREAM_FILTER_TITLE, STREAM_FILTER_HELP },
{ SUBCAT_SOUT_GENERAL, CAT_SOUT, SOUT_TITLE, SOUT_GENERAL_HELP },
{ SUBCAT_SOUT_STREAM, CAT_SOUT, SOUT_STREAM_TITLE, SOUT_STREAM_HELP },
{ SUBCAT_SOUT_MUX, CAT_SOUT, SOUT_MUX_TITLE, SOUT_MUX_HELP },
{ SUBCAT_SOUT_ACO, CAT_SOUT, SOUT_ACO_TITLE, SOUT_ACO_HELP },
{ SUBCAT_SOUT_PACKETIZER, CAT_SOUT, SOUT_PACKET_TITLE, SOUT_PACKET_HELP },
{ SUBCAT_SOUT_RENDERER, CAT_SOUT, SOUT_RENDER_TITLE, SOUT_RENDER_HELP },
{ SUBCAT_SOUT_VOD, CAT_SOUT, SOUT_VOD_TITLE, SOUT_VOD_HELP },
{ SUBCAT_PLAYLIST_GENERAL, CAT_PLAYLIST, PLAYLIST_TITLE, PGENERAL_HELP },
{ SUBCAT_PLAYLIST_EXPORT, CAT_PLAYLIST, PEXPORT_TITLE, PEXPORT_HELP },
{ SUBCAT_PLAYLIST_SD, CAT_PLAYLIST, SD_TITLE, SD_HELP },
{ SUBCAT_ADVANCED_MISC, CAT_ADVANCED, MISC_TITLE, AADVANCED_HELP },
{ SUBCAT_ADVANCED_NETWORK, CAT_ADVANCED, ANETWORK_TITLE, ANETWORK_HELP },
{ SUBCAT_HIDDEN, CAT_HIDDEN, NULL, NULL },
};
/** Get the table index for the given category entry. */
VLC_USED
static inline const char *config_CategoryNameGet( int i_value )
static inline int vlc_config_cat_IndexOf( int cat )
{
int i = 0;
while( categories_array[i].psz_name != NULL )
int index = -1;
for( unsigned i = 0; i < ARRAY_SIZE(categories_array); i++ )
{
if( categories_array[i].i_id == i_value )
if( categories_array[i].id == cat )
{
return vlc_gettext(categories_array[i].psz_name);
index = i;
break;
}
i++;
}
return NULL;
return index;
}
/** Get the table index for the given subcategory entry. */
VLC_USED
static inline const char *config_CategoryHelpGet( int i_value )
static inline int vlc_config_subcat_IndexOf( int subcat )
{
int i = 0;
while( categories_array[i].psz_help != NULL )
int index = -1;
for( unsigned i = 0; i < ARRAY_SIZE(subcategories_array); i++ )
{
if( categories_array[i].i_id == i_value )
if( subcategories_array[i].id == subcat )
{
return vlc_gettext(categories_array[i].psz_help);
index = i;
break;
}
i++;
}
return NULL;
return index;
}
/** Get the name for a category. */
VLC_USED
static inline const char *vlc_config_cat_GetName( int cat )
{
int i = vlc_config_cat_IndexOf( cat );
return (i != -1) ? vlc_gettext(categories_array[i].name) : NULL;
}
/** Get the help text for a category. */
VLC_USED
static inline const char *vlc_config_cat_GetHelp( int cat )
{
int i = vlc_config_cat_IndexOf( cat );
return (i != -1) ? vlc_gettext(categories_array[i].help) : NULL;
}
/** Get the name for a subcategory. */
VLC_USED
static inline const char *vlc_config_subcat_GetName( int subcat )
{
int i = vlc_config_subcat_IndexOf( subcat );
return (i != -1) ? vlc_gettext(subcategories_array[i].name) : NULL;
}
/** Get the help text for a subcategory. */
VLC_USED
static inline const char *vlc_config_subcat_GetHelp( int subcat )
{
int i = vlc_config_subcat_IndexOf( subcat );
return (i != -1) ? vlc_gettext(subcategories_array[i].help) : NULL;
}
/** Get the parent category for the given subcategory. */
VLC_USED
static inline int vlc_config_cat_FromSubcat( int subcat )
{
int i = vlc_config_subcat_IndexOf( subcat );
return (i != -1) ? subcategories_array[i].cat : CAT_UNKNOWN;
}
/** Check if the given subcategory is a "general" one.
......@@ -307,4 +368,4 @@ static inline bool vlc_config_subcat_IsGeneral( int subcat )
}
}
#endif /* VLC_HELP_H */
#endif /* VLC_CONFIG_CAT_H */
......@@ -49,13 +49,6 @@
extern "C" {
# endif
struct config_category_t
{
int i_id;
const char *psz_name;
const char *psz_help;
};
typedef union
{
char *psz;
......
......@@ -475,6 +475,7 @@
VLCTreeSubCategoryItem * subCategoryItem = nil;
VLCTreePluginItem * pluginItem = nil;
module_config_t *p_configs = NULL;
int lastcat = CAT_UNKNOWN;
int lastsubcat = SUBCAT_UNKNOWN;
unsigned int confsize;
......@@ -496,26 +497,25 @@
for (unsigned int j = 0; j < confsize; j++) {
int configType = p_configs[j].i_type;
if (configType == CONFIG_CATEGORY) {
if( p_configs[j].value.i == CAT_HIDDEN ) {
if (configType == CONFIG_CATEGORY)
continue; /* ignore */
if (configType == CONFIG_SUBCATEGORY) {
lastsubcat = (int)p_configs[j].value.i;
if( lastsubcat == SUBCAT_HIDDEN ) {
categoryItem = nil;
subCategoryItem = nil;
continue;
}
categoryItem = [self itemRepresentingCategory:(int)p_configs[j].value.i];
lastcat = vlc_config_cat_FromSubcat(lastsubcat);
categoryItem = [self itemRepresentingCategory:lastcat];
if (!categoryItem) {
categoryItem = [VLCTreeCategoryItem categoryTreeItemWithCategory:(int)p_configs[j].value.i];
categoryItem = [VLCTreeCategoryItem categoryTreeItemWithCategory:lastcat];
if (categoryItem)
[[self children] addObject:categoryItem];
}
continue;
}
if (configType == CONFIG_SUBCATEGORY) {
lastsubcat = (int)p_configs[j].value.i;
if( lastsubcat == SUBCAT_HIDDEN ) {
subCategoryItem = nil;
continue;
}
if (categoryItem && !vlc_config_subcat_IsGeneral(lastsubcat)) {
subCategoryItem = [categoryItem itemRepresentingSubCategory:lastsubcat];
if (!subCategoryItem) {
......@@ -557,7 +557,7 @@
@implementation VLCTreeCategoryItem
+ (VLCTreeCategoryItem *)categoryTreeItemWithCategory:(int)category
{
if (!config_CategoryNameGet(category)) {
if (!vlc_config_cat_GetName(category)) {
msg_Err(getIntf(), "failed to get name for category %i", category);
return nil;
}
......@@ -566,10 +566,10 @@
- (id)initWithCategory:(int)category
{
NSString * name = _NS(config_CategoryNameGet(category));
NSString * name = _NS(vlc_config_cat_GetName(category));
if (self = [super initWithName:name]) {
_category = category;
//_help = [_NS(config_CategoryHelpGet(category)) retain];
//_help = [_NS(vlc_config_cat_GetHelp(category)) retain];
}
return self;
}
......@@ -597,17 +597,17 @@
@implementation VLCTreeSubCategoryItem
- (id)initWithSubCategory:(int)subCategory
{
NSString * name = _NS(config_CategoryNameGet(subCategory));
NSString * name = _NS(vlc_config_subcat_GetName(subCategory));
if (self = [super initWithName:name]) {
_subCategory = subCategory;
//_help = [_NS(config_CategoryHelpGet(subCategory)) retain];
//_help = [_NS(vlc_config_subcat_GetHelp(subCategory)) retain];
}
return self;
}
+ (VLCTreeSubCategoryItem *)subCategoryTreeItemWithSubCategory:(int)subCategory
{
if (!config_CategoryNameGet(subCategory))
if (!vlc_config_subcat_GetName(subCategory))
return nil;
return [[[self class] alloc] initWithSubCategory:subCategory];
}
......@@ -627,7 +627,7 @@
if (self = [super initWithName:name]) {
_configItems = module_config_get(plugin, &_configSize);
//_plugin = plugin;
//_help = [_NS(config_CategoryHelpGet(subCategory)) retain];
//_help = [_NS(vlc_config_subcat_GetHelp(subCategory)) retain];
}
return self;
}
......
......@@ -79,35 +79,43 @@ PrefsTree::PrefsTree( qt_intf_t *_p_intf, QWidget *_parent,
module_t *p_module = module_get_main();
/* Initialisation and get the confsize */
int last_cat = CAT_UNKNOWN;
PrefsItemData *data = NULL;
PrefsItemData *data_sub = NULL;
QTreeWidgetItem *current_item = NULL;
unsigned confsize;
module_config_t *const p_config = module_config_get (p_module, &confsize);
/* Go through the list of conf */
/* Go through the list of core conf to build the base tree */
for( size_t i = 0; i < confsize; i++ )
{
QIcon icon;
/* Work on a new item */
module_config_t *p_item = p_config + i;
switch( p_item->i_type )
if( p_item->i_type != CONFIG_SUBCATEGORY )
continue;
int subcat = p_item->value.i;
int cat = vlc_config_cat_FromSubcat(subcat);
if( cat == CAT_UNKNOWN || cat == CAT_HIDDEN )
continue;
/* Create parent cat node? */
if( cat != last_cat )
{
/* This is a category */
case CONFIG_CATEGORY:
if( p_item->value.i == CAT_HIDDEN ) break;
last_cat = cat;
/* PrefsItemData Init */
data = new PrefsItemData( this );
data->name = qfu( config_CategoryNameGet( p_item->value.i ) );
data->help = qfu( config_CategoryHelpGet( p_item->value.i ) );
data->name = qfu( vlc_config_cat_GetName( cat ) );
data->help = qfu( vlc_config_cat_GetHelp( cat ) );
data->i_type = PrefsItemData::TYPE_CATEGORY;
data->i_object_id = p_item->value.i;
data->i_object_id = cat;
/* This is a category, put a nice icon */
switch( p_item->value.i )
switch( cat )
{
#define CI(a,b) case a: icon = b##_icon;break
CI( CAT_AUDIO, audio );
......@@ -129,48 +137,40 @@ PrefsTree::PrefsTree( qt_intf_t *_p_intf, QWidget *_parent,
QVariant::fromValue( data ) );
addTopLevelItem( current_item );
expandItem( current_item );
break;
/* This is a subcategory */
case CONFIG_SUBCATEGORY:
if( p_item->value.i == SUBCAT_HIDDEN ) break;
/* Special cases: move the main subcategories to the parent cat*/
if( data && vlc_config_subcat_IsGeneral(p_item->value.i) )
{
/* Data still contains the correct thing */
data->i_type = PrefsItemData::TYPE_CATSUBCAT;
data->i_subcat_id = p_item->value.i;
data->name = qfu( config_CategoryNameGet( p_item->value.i ) );
data->help = qfu( config_CategoryHelpGet( p_item->value.i ) );
current_item->setData( 0, Qt::UserRole,
QVariant::fromValue( data ) );
continue;
}
/* Normal Subcategories */
/* Process the Data */
data_sub = new PrefsItemData( this );
data_sub->name = qfu( config_CategoryNameGet( p_item->value.i) );
data_sub->help = qfu( config_CategoryHelpGet( p_item->value.i ) );
data_sub->i_type = PrefsItemData::TYPE_SUBCATEGORY;
data_sub->i_object_id = p_item->value.i;
/* Create a new TreeWidget */
QTreeWidgetItem *subcat_item = new QTreeWidgetItem();
subcat_item->setText( 0, data_sub->name );
subcat_item->setData( 0, Qt::UserRole,
QVariant::fromValue( data_sub ) );
//subcat_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
/* Add it to the parent */
assert( current_item );
current_item->addChild( subcat_item );
break;
}
/* Other items don't need yet a place on the tree */
/* Special cases: move the general subcat to the parent cat */
if( data && vlc_config_subcat_IsGeneral(subcat) )
{
/* Data still contains the correct thing */
data->i_type = PrefsItemData::TYPE_CATSUBCAT;
data->i_subcat_id = subcat;
data->name = qfu( vlc_config_subcat_GetName( subcat ) );
data->help = qfu( vlc_config_subcat_GetHelp( subcat ) );
current_item->setData( 0, Qt::UserRole,
QVariant::fromValue( data ) );
continue;
}
/* Normal Subcategories */
/* Process the Data */
data_sub = new PrefsItemData( this );
data_sub->name = qfu( vlc_config_subcat_GetName( subcat ) );
data_sub->help = qfu( vlc_config_subcat_GetHelp( subcat ) );
data_sub->i_type = PrefsItemData::TYPE_SUBCATEGORY;
data_sub->i_object_id = subcat;
/* Create a new TreeWidget */
QTreeWidgetItem *subcat_item = new QTreeWidgetItem();
subcat_item->setText( 0, data_sub->name );
subcat_item->setData( 0, Qt::UserRole,
QVariant::fromValue( data_sub ) );
//subcat_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
/* Add it to the parent */
assert( current_item );
current_item->addChild( subcat_item );
}
module_config_free( p_config );
......@@ -193,20 +193,24 @@ PrefsTree::PrefsTree( qt_intf_t *_p_intf, QWidget *_parent,
const module_config_t *p_item = p_config + i;
if( p_item->i_type == CONFIG_CATEGORY )
i_category = p_item->value.i;
else if( p_item->i_type == CONFIG_SUBCATEGORY )
continue; /* ignore */
if( p_item->i_type == CONFIG_SUBCATEGORY )
{
i_subcategory = p_item->value.i;
i_category = vlc_config_cat_FromSubcat( i_subcategory );
}
if( CONFIG_ITEM(p_item->i_type) )
b_options = true;
if( b_options && i_category != CAT_UNKNOWN && i_subcategory != SUBCAT_UNKNOWN )
if( b_options && i_category != CAT_UNKNOWN )
break;
}
module_config_free (p_config);
/* Dummy item, please proceed */
if( !b_options || i_category == CAT_UNKNOWN || i_subcategory == SUBCAT_UNKNOWN )
if( !b_options || i_category == CAT_UNKNOWN )
continue;
// Locate the category item;
......@@ -480,8 +484,8 @@ PrefsItemData::PrefsItemData( QObject *_parent ) : QObject( _parent )
b_loaded = false;
}
/* go over the module config items and search text in psz_text
* also search the module name and head */
/* go over the config items and search text in psz_text
* also search the node name and head */
bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
{
if( this->i_type == TYPE_CATEGORY )
......@@ -521,7 +525,7 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
return true;
}
/* check options belonging to this subcat or module */
/* check options belonging to this core subcat or plugin */
unsigned confsize;
module_config_t *const p_config = module_config_get (p_module, &confsize),
......@@ -553,13 +557,16 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
do
{
if ( p_item->i_type == CONFIG_CATEGORY || p_item->i_type == CONFIG_SUBCATEGORY )
if ( p_item->i_type == CONFIG_CATEGORY )
continue; /* ignore */
if ( p_item->i_type == CONFIG_SUBCATEGORY )
{
/* for core, if we hit a cat or subcat, stop */
/* for core, if we hit a subcat, stop */
if ( is_core )
break;
/* a module's options are grouped under one node; we can/should
ignore all cat/subcat entries. */
/* a plugin's options are grouped under one node; we can/should
ignore all other subcat entries. */
continue;
}
......@@ -673,8 +680,7 @@ AdvPrefsPanel::AdvPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent,
p_item->value.i != data->i_object_id ) ||
( data->i_type == PrefsItemData::TYPE_CATSUBCAT &&
p_item->value.i != data->i_subcat_id ) ) &&
( p_item->i_type == CONFIG_CATEGORY ||
p_item->i_type == CONFIG_SUBCATEGORY ) )
p_item->i_type == CONFIG_SUBCATEGORY )
break;
if( p_item->i_type == CONFIG_SECTION )
......@@ -715,8 +721,7 @@ AdvPrefsPanel::AdvPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent,
}
while( !( ( data->i_type == PrefsItemData::TYPE_SUBCATEGORY ||
data->i_type == PrefsItemData::TYPE_CATSUBCAT ) &&
( p_item->i_type == CONFIG_CATEGORY ||
p_item->i_type == CONFIG_SUBCATEGORY ) )
p_item->i_type == CONFIG_SUBCATEGORY )
&& ( ++p_item < p_end ) );
if( box && i_boxline > 0 )
......
......@@ -38,19 +38,18 @@
/**
* Notes:
*
* 1) Core's use of set_category()/set_subcategory() defines the base tree,
* with its options spread across it.
* 1) Core's use of set_subcategory() defines the base tree, with its options
* spread across it.
* 2) Certain subcats ('general' type) are not given a node under their cat,
* they represent the top level cat's option panel itself (otherwise cat
* entries would just have empty panels).
* 3) Other modules (currently) have their options located under a single tree
* 3) Plugins (currently) have their option sets located under a single tree
* node attached to one of the core cat/subcat nodes. The location for this
* is chosen based upon the first cat and subcat encountered in the module's
* option set. (If the subcat does not belong to the cat, then the node is
* attached directly to the cat; If the module's option set has options
* before the cat/subcat hint entries, this does not matter; If no cat or
* subcat hint is provided in the option set, then no node is created (i.e.
* that module's options will not be available in the prefs GUI).
* is chosen based upon the first subcat encountered in the plugin's option
* set (others are ignored). If the plugin's option set has options before
* the cat/subcat hint entries, this does not matter; If no cat or subcat
* hint is provided in the option set, then no node is created (i.e. that
* plugins's options will not be shown).
*/
class AdvPrefsPanel;
......