[vlc-commits] config: remove advanced flag

Rémi Denis-Courmont git at videolan.org
Tue Apr 24 20:42:23 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 23 20:28:50 2018 +0300| [6a7a137f7b3ce19e25bedf0d2ffc4c6ef9d45121] | committer: Rémi Denis-Courmont

config: remove advanced flag

Except for the command line help, this has been unused for a decade or
so.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a7a137f7b3ce19e25bedf0d2ffc4c6ef9d45121
---

 include/vlc_configuration.h            |  1 -
 include/vlc_plugin.h                   | 67 ++++++++++++++--------------------
 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, 31 insertions(+), 59 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..60fb077dc3 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,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 */
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;



More information about the vlc-commits mailing list