[vlc-devel] [PATCH 3/3] config: remove advanced flag
RĂ©mi Denis-Courmont
remi at remlab.net
Mon Apr 23 19:29:42 CEST 2018
Except for the command line help, this has been unused for a decade or
so.
---
include/vlc_configuration.h | 1 -
include/vlc_plugin.h | 12 ++++--------
modules/gui/macosx/prefs_widgets.m | 2 +-
modules/gui/qt/dialogs/preferences.cpp | 3 +--
src/libvlc-module.c | 9 +--------
src/modules/cache.c | 4 +---
src/modules/entry.c | 4 ----
7 files changed, 8 insertions(+), 27 deletions(-)
diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 91a38d79b0..d06f618349 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -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 */
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index fb6a12268c..bca9911fe9 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -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,12 +337,8 @@ 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 ) \
+ 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 ) \
@@ -366,7 +362,7 @@ 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 )
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 76b0bac45b..0d7283b61a 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -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);
diff --git a/modules/gui/qt/dialogs/preferences.cpp b/modules/gui/qt/dialogs/preferences.cpp
index 8680c85768..fa7b337708 100644
--- a/modules/gui/qt/dialogs/preferences.cpp
+++ b/modules/gui/qt/dialogs/preferences.cpp
@@ -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();
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index c7f64790bd..e4a290e0f5 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -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 )
diff --git a/src/modules/cache.c b/src/modules/cache.c
index a9ce8efa9f..53c577c1a4 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -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);
diff --git a/src/modules/entry.c b/src/modules/entry.c
index 31fa64c2ce..bce94285c6 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -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;
--
2.17.0
More information about the vlc-devel
mailing list