[vlc-devel] [PATCH] Remove write-only module_config_t.b_restart
Rémi Denis-Courmont
remi at remlab.net
Fri Apr 29 19:54:10 CEST 2011
---
include/vlc_configuration.h | 2 --
include/vlc_plugin.h | 7 -------
modules/audio_output/directx.c | 2 --
modules/audio_output/waveout.c | 1 -
src/libvlc-module.c | 29 -----------------------------
src/modules/entry.c | 4 ----
6 files changed, 0 insertions(+), 45 deletions(-)
diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 31cd761..b0097f7 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -177,8 +177,6 @@ struct module_config_t
bool b_dirty; /* Dirty flag to indicate a config change */
bool b_advanced; /* Flag to indicate an advanced option */
bool b_internal; /* Flag to indicate option is not to be shown */
- bool b_restart; /* Flag to indicate the option needs a restart */
- /* to take effect */
/* Option values loaded from config file */
bool b_autosave; /* Config will be auto-saved at exit time */
bool b_unsaveable; /* Config should not be saved */
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index e227b79..15f9243 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -75,9 +75,6 @@ enum vlc_module_properties
VLC_CONFIG_PERSISTENT,
/* always write variable to storage (args=none) */
- VLC_CONFIG_RESTART,
- /* restart required to apply value change (args=none) */
-
VLC_CONFIG_PRIVATE,
/* hide from user (args=none) */
@@ -344,7 +341,6 @@ enum vlc_module_properties
#define add_key( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
KEY_UNSET ) \
- change_need_restart() \
add_string_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, value )
#define add_integer_with_range( name, value, i_min, i_max, p_callback, text, longtext, advc ) \
@@ -416,9 +412,6 @@ enum vlc_module_properties
vlc_config_set (p_config, VLC_CONFIG_ADD_ACTION, \
(vlc_callback_t)(pf_action), (const char *)(text));
-#define change_need_restart() \
- vlc_config_set (p_config, VLC_CONFIG_RESTART);
-
#define change_autosave() \
vlc_config_set (p_config, VLC_CONFIG_PERSISTENT);
diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 2897af7..2dee866 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -137,13 +137,11 @@ vlc_module_begin ()
add_deprecated_alias( "directx-audio-device" ) /* Since 1.1.0 */
change_string_list( ppsz_adev, ppsz_adev_text, ReloadDirectXDevices )
change_action_add( ReloadDirectXDevices, N_("Refresh list") )
- change_need_restart ()
add_bool( "directx-audio-float32", false, FLOAT_TEXT,
FLOAT_LONGTEXT, true )
add_string( "directx-audio-speaker", "Windows default",
SPEAKER_TEXT, SPEAKER_LONGTEXT, true )
change_string_list( speaker_list, 0, 0 )
- change_need_restart ()
set_callbacks( OpenAudio, CloseAudio )
vlc_module_end ()
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index aea4b55..03ef06a 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -103,7 +103,6 @@ vlc_module_begin ()
DEVICE_TEXT, DEVICE_LONG, false )
add_deprecated_alias( "waveout-dev" ) /* deprecated since 0.9.3 */
change_string_list( ppsz_adev, ppsz_adev_text, ReloadWaveoutDevices )
- change_need_restart ()
change_action_add( ReloadWaveoutDevices, N_("Refresh list") )
set_callbacks( Open, Close )
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index b5e2fca..00226d9 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2036,27 +2036,17 @@ vlc_module_begin ()
add_obsolete_bool( "fpu" )
#if defined( __i386__ ) || defined( __x86_64__ )
add_bool( "mmx", 1, MMX_TEXT, MMX_LONGTEXT, true )
- change_need_restart ()
add_bool( "3dn", 1, THREE_DN_TEXT, THREE_DN_LONGTEXT, true )
- change_need_restart ()
add_bool( "mmxext", 1, MMXEXT_TEXT, MMXEXT_LONGTEXT, true )
- change_need_restart ()
add_bool( "sse", 1, SSE_TEXT, SSE_LONGTEXT, true )
- change_need_restart ()
add_bool( "sse2", 1, SSE2_TEXT, SSE2_LONGTEXT, true )
- change_need_restart ()
add_bool( "sse3", 1, SSE3_TEXT, SSE3_LONGTEXT, true )
- change_need_restart ()
add_bool( "ssse3", 1, SSSE3_TEXT, SSSE3_LONGTEXT, true )
- change_need_restart ()
add_bool( "sse41", 1, SSE4_1_TEXT, SSE4_1_LONGTEXT, true )
- change_need_restart ()
add_bool( "sse42", 1, SSE4_2_TEXT, SSE4_2_LONGTEXT, true )
- change_need_restart ()
#endif
#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
add_bool( "altivec", 1, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true )
- change_need_restart ()
#endif
/* Misc options */
@@ -2065,19 +2055,15 @@ vlc_module_begin ()
add_category_hint( N_("Miscellaneous"), MISC_CAT_LONGTEXT, true )
add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT,
MEMCPY_LONGTEXT, true )
- change_need_restart ()
add_module( "vod-server", "vod server", NULL, NULL, VOD_SERVER_TEXT,
VOD_SERVER_LONGTEXT, true )
- change_need_restart ()
set_section( N_("Plugins" ), NULL )
add_bool( "plugins-cache", true, PLUGINS_CACHE_TEXT,
PLUGINS_CACHE_LONGTEXT, true )
- change_need_restart ()
add_obsolete_string( "plugin-path" )
add_directory( "data-path", NULL, DATA_PATH_TEXT,
DATA_PATH_LONGTEXT, true )
- change_need_restart ()
set_section( N_("Performance options"), NULL )
@@ -2085,11 +2071,9 @@ vlc_module_begin ()
# ifndef __APPLE__
add_bool( "rt-priority", false, RT_PRIORITY_TEXT,
RT_PRIORITY_LONGTEXT, true )
- change_need_restart ()
# endif
add_integer( "rt-offset", 0, RT_OFFSET_TEXT,
RT_OFFSET_LONGTEXT, true )
- change_need_restart ()
#endif
#if defined(HAVE_DBUS)
@@ -2113,7 +2097,6 @@ vlc_module_begin ()
#if defined(WIN32)
add_bool( "high-priority", 0, HPRIORITY_TEXT,
HPRIORITY_LONGTEXT, false )
- change_need_restart ()
#endif
/* Playlist options */
@@ -2142,7 +2125,6 @@ vlc_module_begin ()
add_bool( "playlist-tree", 0, PLTREE_TEXT, PLTREE_LONGTEXT, false )
add_string( "open", "", OPEN_TEXT, OPEN_LONGTEXT, false )
- change_need_restart ()
add_bool( "auto-preparse", true, PREPARSE_TEXT,
PREPARSE_LONGTEXT, false )
@@ -2156,7 +2138,6 @@ vlc_module_begin ()
add_module_list_cat( "services-discovery", SUBCAT_PLAYLIST_SD, NULL,
NULL, SD_TEXT, SD_LONGTEXT, false )
change_short('S')
- change_need_restart ()
/* Interface options */
set_category( CAT_INTERFACE )
@@ -2172,54 +2153,44 @@ vlc_module_begin ()
#if !defined(WIN32)
add_bool( "daemon", 0, DAEMON_TEXT, DAEMON_LONGTEXT, true )
change_short('d')
- change_need_restart ()
add_string( "pidfile", NULL, PIDFILE_TEXT, PIDFILE_LONGTEXT,
false )
- change_need_restart ()
#endif
add_bool( "file-logging", false, FILE_LOG_TEXT, FILE_LOG_LONGTEXT,
true )
- change_need_restart ()
#ifdef HAVE_SYSLOG_H
add_bool ( "syslog", false, SYSLOG_TEXT, SYSLOG_LONGTEXT,
true )
- change_need_restart ()
#endif
#if defined (WIN32) || defined (__APPLE__)
add_string( "language", "auto", LANGUAGE_TEXT, LANGUAGE_LONGTEXT,
false )
change_string_list( ppsz_language, ppsz_language_text, 0 )
- change_need_restart ()
#endif
add_bool( "color", true, COLOR_TEXT, COLOR_LONGTEXT, true )
add_bool( "advanced", false, ADVANCED_TEXT, ADVANCED_LONGTEXT,
false )
- change_need_restart ()
add_bool( "interact", true, INTERACTION_TEXT,
INTERACTION_LONGTEXT, false )
add_bool ( "stats", true, STATS_TEXT, STATS_LONGTEXT, true )
- change_need_restart ()
set_subcategory( SUBCAT_INTERFACE_MAIN )
add_module_cat( "intf", SUBCAT_INTERFACE_MAIN, NULL, NULL, INTF_TEXT,
INTF_LONGTEXT, false )
change_short('I')
- change_need_restart ()
add_module_list_cat( "extraintf", SUBCAT_INTERFACE_MAIN,
NULL, NULL, EXTRAINTF_TEXT,
EXTRAINTF_LONGTEXT, false )
- change_need_restart ()
set_subcategory( SUBCAT_INTERFACE_CONTROL )
add_module_list_cat( "control", SUBCAT_INTERFACE_CONTROL, NULL, NULL,
CONTROL_TEXT, CONTROL_LONGTEXT, false )
- change_need_restart ()
/* Hotkey options*/
set_subcategory( SUBCAT_INTERFACE_HOTKEYS )
diff --git a/src/modules/entry.c b/src/modules/entry.c
index be70bf8..8f3658b 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -317,10 +317,6 @@ int vlc_plugin_set (module_t *module, module_config_t *item, int propid, ...)
item->b_autosave = true;
break;
- case VLC_CONFIG_RESTART:
- item->b_restart = true;
- break;
-
case VLC_CONFIG_PRIVATE:
item->b_internal = true;
break;
--
1.7.2.5
More information about the vlc-devel
mailing list