]> git.sesse.net Git - vlc/commitdiff
Hide internal settings
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Dec 2007 15:54:14 +0000 (15:54 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Dec 2007 15:54:14 +0000 (15:54 +0000)
modules/gui/macosx/prefs.m
modules/gui/wxwidgets/dialogs/preferences.cpp
src/modules/modules.c

index 5533968c4997e9ae8a0dae3e432624b8a00f6d21..cf2d66601bb491800349fb30b9d94a678fa03396 100644 (file)
@@ -652,10 +652,6 @@ 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 48193574d0d12c76c7028a1fe7ec0ee8192cfab4..77b61d558b1661b392ca88b70d9dc431dcaac6a1 100644 (file)
@@ -993,8 +993,6 @@ 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 );
index ceefde8a6b27a50735a4f541bb3f04fbb9940f4d..f21f6666fa2e2c9402a45beab02e0106235eab1b 100644 (file)
@@ -794,13 +794,21 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
 module_config_t *module_GetConfig (const module_t *module, unsigned *restrict psize)
 {
     unsigned size = module->confsize;
+    module_config_t *config = malloc (size * sizeof (*config));
 
     assert (psize != NULL);
-    *psize = size;
+    *psize = 0;
 
-    module_config_t *config = malloc (size * sizeof (*config));
-    if (config)
-        memcpy (config, module->p_config, size * sizeof (*config));
+    for (unsigned i = 0, j = 0; i < size; i++)
+    {
+        if (module->p_config[i].b_internal)
+            continue;
+
+        if (config != NULL)
+            memcpy (config + j, module->p_config + i, sizeof (*config));
+        *psize = j;
+        j++;
+    }
 
     return config;
 }