config: remove advanced flag

Except for the command line help, this has been unused for a decade or
so.
This commit is contained in:
Rémi Denis-Courmont 2018-04-23 20:28:50 +03:00
parent c25eff3ddc
commit 6a7a137f7b
7 changed files with 31 additions and 59 deletions

View File

@ -77,7 +77,6 @@ struct module_config_t
{
uint8_t i_type; /**< Configuration type */
char i_short; /**< Optional short option name */
unsigned b_advanced:1; /**< Advanced option */
unsigned b_internal:1; /**< Hidden from preferences and help */
unsigned b_unsaveable:1; /**< Not stored in configuration */
unsigned b_safe:1; /**< Safe for web plugins and playlist files */

View File

@ -61,8 +61,8 @@ enum vlc_module_properties
VLC_CONFIG_RANGE,
/* minimum value (args=int64_t/double/const char * twice) */
VLC_CONFIG_ADVANCED,
/* enable advanced flag (args=none) */
VLC_CONFIG_ADVANCED_RESERVED,
/* reserved - do not use */
VLC_CONFIG_VOLATILE,
/* don't write variable to storage (args=none) */
@ -337,20 +337,16 @@ VLC_METADATA_EXPORTS
vlc_config_set (VLC_CONFIG_DESC, \
(const char *)(text), (const char *)(longtext));
#define add_typeadv_inner( type, text, longtext, advc ) \
add_typedesc_inner( type, text, longtext ) \
if (advc) vlc_config_set (VLC_CONFIG_ADVANCED);
#define add_typename_inner( type, name, text, longtext, advc ) \
add_typeadv_inner( type, text, longtext, advc ) \
#define add_typename_inner(type, name, text, longtext) \
add_typedesc_inner(type, text, longtext) \
vlc_config_set (VLC_CONFIG_NAME, (const char *)(name));
#define add_string_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc ) \
#define add_string_inner(type, name, text, longtext, v) \
add_typename_inner(type, name, text, longtext) \
vlc_config_set (VLC_CONFIG_VALUE, (const char *)(v));
#define add_int_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc ) \
#define add_int_inner(type, name, text, longtext, v) \
add_typename_inner(type, name, text, longtext) \
vlc_config_set (VLC_CONFIG_VALUE, (int64_t)(v));
@ -366,75 +362,66 @@ VLC_METADATA_EXPORTS
add_typedesc_inner( CONFIG_SECTION, text, longtext )
#define add_category_hint( text, longtext, advc ) \
add_typeadv_inner( CONFIG_HINT_CATEGORY, text, longtext, advc )
add_typedesc_inner( CONFIG_HINT_CATEGORY, text, longtext )
#define add_usage_hint( text ) \
add_typedesc_inner( CONFIG_HINT_USAGE, text, NULL )
#define add_string( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_STRING, name, text, longtext, value)
#define add_password( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_PASSWORD, name, text, longtext, value)
#define add_loadfile( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_LOADFILE, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_LOADFILE, name, text, longtext, value)
#define add_savefile( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_SAVEFILE, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_SAVEFILE, name, text, longtext, value)
#define add_directory( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_DIRECTORY, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_DIRECTORY, name, text, longtext, value)
#define add_font( name, value, text, longtext, advc )\
add_string_inner( CONFIG_ITEM_FONT, name, text, longtext, advc, \
value )
add_string_inner(CONFIG_ITEM_FONT, name, text, longtext, value)
#define add_module( name, psz_caps, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, \
value ) \
add_string_inner(CONFIG_ITEM_MODULE, name, text, longtext, value) \
vlc_config_set (VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#define add_module_list( name, psz_caps, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, \
value ) \
add_string_inner(CONFIG_ITEM_MODULE_LIST, name, text, longtext, value) \
vlc_config_set (VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#ifndef __PLUGIN__
#define add_module_cat( name, i_subcategory, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, \
value ) \
add_string_inner(CONFIG_ITEM_MODULE_CAT, name, text, longtext, value) \
change_integer_range (i_subcategory /* gruik */, 0);
#define add_module_list_cat( name, i_subcategory, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, \
advc, value ) \
add_string_inner(CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, \
value) \
change_integer_range (i_subcategory /* gruik */, 0);
#endif
#define add_integer( name, value, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, value )
add_int_inner(CONFIG_ITEM_INTEGER, name, text, longtext, value)
#define add_rgb( name, value, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_RGB, name, text, longtext, advc, value ) \
add_int_inner(CONFIG_ITEM_RGB, name, text, longtext, value) \
change_integer_range( 0, 0xFFFFFF )
#define add_key( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
KEY_UNSET ) \
add_string_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, value )
add_string_inner(CONFIG_ITEM_KEY, "global-" name, text, longtext, \
KEY_UNSET) \
add_string_inner(CONFIG_ITEM_KEY, name, text, longtext, value)
#define add_integer_with_range( name, value, i_min, i_max, text, longtext, advc ) \
add_integer( name, value, text, longtext, advc ) \
change_integer_range( i_min, i_max )
#define add_float( name, v, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc ) \
add_typename_inner(CONFIG_ITEM_FLOAT, name, text, longtext) \
vlc_config_set (VLC_CONFIG_VALUE, (double)(v));
#define add_float_with_range( name, value, f_min, f_max, text, longtext, advc ) \
@ -442,7 +429,7 @@ VLC_METADATA_EXPORTS
change_float_range( f_min, f_max )
#define add_bool( name, v, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc ) \
add_typename_inner(CONFIG_ITEM_BOOL, name, text, longtext) \
if (v) vlc_config_set (VLC_CONFIG_VALUE, (int64_t)true);
/* For removed option */

View File

@ -408,7 +408,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
_p_item = p_item;
psz_name = p_item->psz_name;
_type = p_item->i_type;
_advanced = p_item->b_advanced;
_advanced = false;
[self setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin ];
}
return (self);

View File

@ -131,8 +131,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
for( int i = 0; i < SPrefsMax ; i++ ) simple_panels[i] = NULL;
if( var_InheritBool( p_intf, "qt-advanced-pref" )
|| var_InheritBool( p_intf, "advanced" ) )
if( var_InheritBool( p_intf, "qt-advanced-pref" ) )
setAdvanced();
else
setSimple();

View File

@ -96,12 +96,6 @@ static const char *const ppsz_snap_formats[] =
"This enables colorization of the messages sent to the console. " \
"Your terminal needs Linux color support for this to work.")
#define ADVANCED_TEXT N_("Show advanced options")
#define ADVANCED_LONGTEXT N_( \
"When this is enabled, the preferences and/or interfaces will " \
"show all available options, including those that most users should " \
"never touch.")
#define INTERACTION_TEXT N_("Interface interaction")
#define INTERACTION_LONGTEXT N_( \
"When this is enabled, the interface will show a dialog box each time " \
@ -2161,8 +2155,7 @@ vlc_module_begin ()
add_bool( "color", true, COLOR_TEXT, COLOR_LONGTEXT, true )
change_volatile ()
add_bool( "advanced", false, ADVANCED_TEXT, ADVANCED_LONGTEXT,
false )
add_obsolete_bool( "advanced" ) /* since 4.0.0 */
add_bool( "interact", true, INTERACTION_TEXT,
INTERACTION_LONGTEXT, false )

View File

@ -57,7 +57,7 @@
#ifdef HAVE_DYNAMIC_PLUGINS
/* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */
#define CACHE_SUBVERSION_NUM 34
#define CACHE_SUBVERSION_NUM 35
/* Cache filename */
#define CACHE_NAME "plugins.dat"
@ -183,7 +183,6 @@ static int vlc_cache_load_config(module_config_t *cfg, block_t *file)
{
LOAD_IMMEDIATE (cfg->i_type);
LOAD_IMMEDIATE (cfg->i_short);
LOAD_FLAG (cfg->b_advanced);
LOAD_FLAG (cfg->b_internal);
LOAD_FLAG (cfg->b_unsaveable);
LOAD_FLAG (cfg->b_safe);
@ -516,7 +515,6 @@ static int CacheSaveConfig (FILE *file, const module_config_t *cfg)
{
SAVE_IMMEDIATE (cfg->i_type);
SAVE_IMMEDIATE (cfg->i_short);
SAVE_FLAG (cfg->b_advanced);
SAVE_FLAG (cfg->b_internal);
SAVE_FLAG (cfg->b_unsaveable);
SAVE_FLAG (cfg->b_safe);

View File

@ -362,10 +362,6 @@ static int vlc_plugin_desc_cb(void *ctx, void *tgt, int propid, ...)
break;
}
case VLC_CONFIG_ADVANCED:
item->b_advanced = true;
break;
case VLC_CONFIG_VOLATILE:
item->b_unsaveable = true;
break;