mirror of https://code.videolan.org/videolan/vlc
Cleanup private and volatile option
Volatile/unsaveable options are now always internal implicitly.
This commit is contained in:
parent
b04dd1e92e
commit
0b21fc27fa
|
@ -417,16 +417,19 @@ enum vlc_module_properties
|
|||
vlc_config_set (p_config, VLC_CONFIG_ADD_ACTION, \
|
||||
(vlc_callback_t)(pf_action), (const char *)(text));
|
||||
|
||||
#define change_internal() \
|
||||
vlc_config_set (p_config, VLC_CONFIG_PRIVATE);
|
||||
|
||||
#define change_need_restart() \
|
||||
vlc_config_set (p_config, VLC_CONFIG_RESTART);
|
||||
|
||||
#define change_autosave() \
|
||||
vlc_config_set (p_config, VLC_CONFIG_PERSISTENT);
|
||||
|
||||
#define change_unsaveable() \
|
||||
/* For options that are saved but hidden from the preferences panel */
|
||||
#define change_private() \
|
||||
vlc_config_set (p_config, VLC_CONFIG_PRIVATE);
|
||||
|
||||
/* For options that cannot be saved in the configuration */
|
||||
#define change_volatile() \
|
||||
change_private() \
|
||||
vlc_config_set (p_config, VLC_CONFIG_VOLATILE);
|
||||
|
||||
#define change_safe() \
|
||||
|
|
|
@ -77,11 +77,11 @@ vlc_module_begin ()
|
|||
change_safe()
|
||||
|
||||
add_integer( "cdda-track", 0 , NULL, NULL, NULL, true )
|
||||
change_internal ()
|
||||
change_volatile ()
|
||||
add_integer( "cdda-first-sector", -1, NULL, NULL, NULL, true )
|
||||
change_internal ()
|
||||
change_volatile ()
|
||||
add_integer( "cdda-last-sector", -1, NULL, NULL, NULL, true )
|
||||
change_internal ()
|
||||
change_volatile ()
|
||||
|
||||
#ifdef HAVE_LIBCDDB
|
||||
add_string( "cddb-server", "freedb.freedb.org", NULL, N_( "CDDB Server" ),
|
||||
|
|
|
@ -226,7 +226,7 @@ vlc_module_begin ()
|
|||
|
||||
add_bool( "qt-privacy-ask", true, NULL, PRIVACY_TEXT, PRIVACY_TEXT,
|
||||
false )
|
||||
change_internal ()
|
||||
change_private ()
|
||||
|
||||
add_integer( "qt-fullscreen-screennumber", -1, NULL, FULLSCREEN_NUMBER_TEXT,
|
||||
FULLSCREEN_NUMBER_LONGTEXT, false );
|
||||
|
|
|
@ -561,7 +561,7 @@ vlc_module_begin ()
|
|||
add_string( "skins2-config", "", NULL, SKINS2_CONFIG, SKINS2_CONFIG_LONG,
|
||||
true )
|
||||
change_autosave ()
|
||||
change_internal ()
|
||||
change_private ()
|
||||
#ifdef WIN32
|
||||
add_bool( "skins2-systray", false, onSystrayChange, SKINS2_SYSTRAY,
|
||||
SKINS2_SYSTRAY_LONG, false );
|
||||
|
|
|
@ -76,7 +76,7 @@ vlc_module_begin ()
|
|||
set_callbacks (EmOpen, EmClose)
|
||||
|
||||
add_integer ("drawable-xid", 0, NULL, XID_TEXT, XID_LONGTEXT, true)
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
|
||||
vlc_module_end ()
|
||||
|
||||
|
|
|
@ -2077,8 +2077,7 @@ vlc_module_begin ()
|
|||
ONEINSTANCE_LONGTEXT, true )
|
||||
add_bool( "started-from-file", 0, NULL, STARTEDFROMFILE_TEXT,
|
||||
STARTEDFROMFILE_LONGTEXT, true )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "one-instance-when-started-from-file", 1, NULL,
|
||||
ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
|
||||
ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, true )
|
||||
|
@ -2746,51 +2745,38 @@ vlc_module_begin ()
|
|||
|
||||
add_bool( "help", false, NULL, HELP_TEXT, "", false )
|
||||
change_short( 'h' )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "full-help", false, NULL, FULL_HELP_TEXT, "", false )
|
||||
change_short( 'H' )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "help-verbose", false, NULL, HELP_VERBOSE_TEXT, "",
|
||||
false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "list", false, NULL, LIST_TEXT, "", false )
|
||||
change_short( 'l' )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "list-verbose", false, NULL, LIST_VERBOSE_TEXT, "",
|
||||
false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_string( "module", NULL, NULL, MODULE_TEXT, "", false )
|
||||
change_short( 'p' )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "ignore-config", true, NULL, IGNORE_CONFIG_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_obsolete_bool( "save-config" )
|
||||
add_bool( "reset-config", false, NULL, RESET_CONFIG_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "reset-plugins-cache", false, NULL,
|
||||
RESET_PLUGINS_CACHE_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "version", false, NULL, VERSION_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_string( "config", NULL, NULL, CONFIG_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
add_bool( "version", false, NULL, VERSION_TEXT, "", false )
|
||||
change_internal ()
|
||||
change_unsaveable ()
|
||||
change_volatile ()
|
||||
|
||||
/* Usage (mainly useful for cmd line stuff) */
|
||||
/* add_usage_hint( PLAYLIST_USAGE ) */
|
||||
|
|
|
@ -730,7 +730,6 @@ module_config_t *module_config_get( const module_t *module, unsigned *restrict p
|
|||
{
|
||||
const module_config_t *item = module->p_config + i;
|
||||
if( item->b_internal /* internal option */
|
||||
|| item->b_unsaveable /* non-modifiable option */
|
||||
|| item->b_removed /* removed option */ )
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue