[vlc-devel] [Patch] Initialize the drop down lists - inside settings on creation, instead of let the user push buttons...

Andre Weber WeberAndre at gmx.de
Wed Feb 27 22:31:56 CET 2008


Hello,

today I talked to xtophe, j-b and some more... about an option to initialize the selectionlists
of dropdownfields durring settings dialog creation of the controls.

This "will / should / may" work for options defined with the macros

* change_integer_list
* change_string_list
* change_float_list (seems to be never used?)

these macro's have a third parameter "list_update_func" which isn't currently used ...
some modules pass 0 to it, and some like DirectShow pass there the same function pointer to it
- which they use for the refresh button -- what is closer to this? to store this function pointer
inside "module_config_t" - to call this method durring creation of the input controls of the setup gui?
to startup with fully functional and initialized drop down lists?
(I think the user - will appreciate this?)

so I added "vlc_callback_t pf_update_list" to this structure, as a possible callback for initializing/updating
the value lists of such a choice variable. Be aware - that this change will force a full rebuild of the sourcetree,
and also brake one time the caching...)
But its better to do so --- instead of a bad hack and missuse of a existing parameter / value inside this
structure - which may break - more than the cache - and gives me / us / you - more trouble to find
and fix.

To achieve this I modified also the function "vlc_config_set" if it is called with the ID=VLC_CONFIG_LIST
the last parameter in the open parameter list - is now the function pointer - I found no code location
which calls this method directly so I see no danger in changing this. this Method with this signature
is only used in the Macros named above.

My Patches in this mail contain all required changes ... to settings (QT), WxWidgets may be possible
to also use that option, but this is no must ... the refresh buttons are still there and will work.

A little bit ... may be more to look after is my change on the function "setfillVLCConfigCombo" inside
prefrerences_widgets.cpp - which is used in some initialization for the simple setting gui? so far I understand
- I added there  the same initialization code for the list - but I'am not sure if it could work - so please
check this - before finally applying the patch in the full version...

With best regards

André
----
atmo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: entry.c.diff
Type: text/x-diff
Size: 327 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080227/cbc7ef2a/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc_configuration.h.diff
Type: text/x-diff
Size: 1799 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080227/cbc7ef2a/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preferences_widgets.diff
Type: text/x-diff
Size: 2319 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080227/cbc7ef2a/attachment-0002.diff>


More information about the vlc-devel mailing list