Add a flag for config option to mark it as unsaveable. Refs #856 (Still need to test...
authorChristophe Mutricy <xtophe@videolan.org>
Mon, 20 Nov 2006 22:16:35 +0000 (22:16 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Mon, 20 Nov 2006 22:16:35 +0000 (22:16 +0000)
configure.ac
include/configuration.h
src/libvlc.h
src/misc/configuration.c

index 55e6f95..9252a4f 100644 (file)
@@ -5530,8 +5530,8 @@ dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
 dnl AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
 dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
 
-dnl New definitions with value matching 0.8.6 release
-module_symbol="0_8_6c"
+dnl New definitions with value matching 0.9.0 release
+module_symbol="0_9_0"
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $module_symbol, [Symbol suffix for module functions])
 VLC_ENTRY="vlc_entry__${module_symbol}"
index 6bea943..678954c 100644 (file)
@@ -169,6 +169,7 @@ struct module_config_t
     int          i_value_saved;
     float        f_value_saved;
     vlc_bool_t   b_autosave;       /* Config will be auto-saved at exit time */
+    vlc_bool_t   b_unsaveable;       /* confg should be saved*/
 };
 
 /*****************************************************************************
@@ -408,6 +409,8 @@ int config_AutoSaveConfigFile( vlc_object_t * );
 #define change_autosave() \
     p_config[i_config].b_autosave = VLC_TRUE;
 
+#define change_unsaveable() \
+    p_config[i_config].b_unsaveable = VLC_TRUE;
 
 /****************************************************************************
  * config_chain_t:
index 07ea2d7..c93e4bb 100644 (file)
@@ -1634,6 +1634,7 @@ vlc_module_begin();
               ONEINSTANCE_WIN_LONGTEXT, VLC_TRUE );
     add_bool( "started-from-file", 0, NULL, STARTEDFROMFILE_TEXT,
               STARTEDFROMFILE_LONGTEXT, VLC_TRUE );
+        change_unsaveable();
     add_bool( "one-instance-when-started-from-file", 1, NULL,
               ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
               ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, VLC_TRUE );
index efe5049..2026240 100644 (file)
@@ -1184,6 +1184,10 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
             /* Ignore deprecated options */
             if( p_item->psz_current )
                 continue;
+            if( p_item->b_unsaveable )
+                /*obvious*/
+                continue;
+            
             if( b_autosave && !p_item->b_autosave )
             {
                 i_value = p_item->i_value_saved;