]> git.sesse.net Git - vlc/commitdiff
Add a change_internal modifier to options. Please check OS X implementation
authorClément Stenac <zorglub@videolan.org>
Thu, 25 May 2006 14:24:17 +0000 (14:24 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 25 May 2006 14:24:17 +0000 (14:24 +0000)
include/configuration.h
include/modules_inner.h
modules/access/cdda.c
modules/gui/macosx/prefs.m
modules/gui/wxwidgets/dialogs/preferences.cpp

index 6b708809c88a8b8e5a0b37eeef102e74a9c88a55..2d775d0d28eabaadacf5e4154a5e4fc1c9632e25 100644 (file)
@@ -154,6 +154,7 @@ struct module_config_t
     vlc_mutex_t *p_lock;            /* Lock to use when modifying the config */
     vlc_bool_t   b_dirty;          /* Dirty flag to indicate a config change */
     vlc_bool_t   b_advanced;          /* Flag to indicate an advanced option */
+    vlc_bool_t   b_internal;   /* Flag to indicate option is not to be shows */
 
     /* Original option values */
     char        *psz_value_orig;
@@ -395,5 +396,8 @@ int config_AutoSaveConfigFile( vlc_object_t * );
       action_text; \
     p_config[i_config].i_action++;
 
+#define change_internal() \
+    p_config[i_config].b_internal = VLC_TRUE;
+
 #define change_autosave() \
     p_config[i_config].b_autosave = VLC_TRUE;
index 6cbdd05c2b0a3b13f387c5d4e93a1453d9e2e99a..796808aaaad360174491c53b9f681ab1ce15be04 100644 (file)
         static module_config_t config_end = {                                 \
             CONFIG_HINT_END, NULL, NULL, 0, NULL, NULL, NULL, 0, 0., 0, 0,    \
             0., 0., NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL,     \
-            VLC_FALSE, NULL, VLC_FALSE, VLC_FALSE, NULL, 0, 0., NULL, 0, 0.,  \
-            VLC_FALSE                                                         \
+            VLC_FALSE, NULL, VLC_FALSE, VLC_FALSE, VLC_FALSE, NULL, 0, 0.,    \
+            NULL, 0, 0., VLC_FALSE                                            \
         };                                                                    \
         STORE_SYMBOLS;                                                        \
         p_module->b_submodule = VLC_FALSE;                                    \
index db9860737b0c5eb665460fe5cc41972170706956..30a5d959e8833b7e8a84eabe6331234e95c72fb7 100644 (file)
@@ -66,7 +66,9 @@ vlc_module_begin();
     add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
                  CACHING_LONGTEXT, VLC_TRUE );
     add_bool( "cdda-separate-tracks", VLC_TRUE, NULL, NULL, NULL, VLC_TRUE );
+        change_internal();
     add_integer( "cdda-track", -1 , NULL, NULL, NULL, VLC_TRUE );
+        change_internal();
     add_string( "cddb-server", "freedb.freedb.org", NULL,
                 N_( "CDDB Server" ), N_( "Address of the CDDB server to use." ),
                 VLC_TRUE );
index 02dff1a1aa41065e78b47df23890185ae8218d77..f30fa174120fd0d3cddc00a90ae4cbf4ef34cebf 100644 (file)
@@ -639,6 +639,10 @@ static VLCTreeItem *o_root_item = nil;
                 default:
                 {
                     VLCConfigControl *o_control = nil;
+                   if( p_item->b_internal == VLC_TRUE )
+                   {
+                       break;
+                   }
                     o_control = [VLCConfigControl newControl:p_item
                                                   withView:o_view];
                     if( o_control != nil )
index 34348ccebde18ca266affbd412b218b8b69e9661..225b180d8a8a7d53524f87ad786e45fecbd69ec0 100644 (file)
@@ -999,6 +999,8 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
                   p_item->i_type == CONFIG_SUBCATEGORY ) )
                 break;
 
+            if( p_item->b_internal == VLC_TRUE ) continue;
+
             ConfigControl *control =
                 CreateConfigControl( VLC_OBJECT(p_intf),
                                      p_item, config_window );