]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/prefs_widgets.m
macosx: fix time slider knob alignment in bright mode
[vlc] / modules / gui / macosx / prefs_widgets.m
index c1ed0741d1288a092fb98c7723db905a10c4f7c8..0820f86840867cbe9a4efa90e257e758890c4d8e 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * prefs_widgets.m: Preferences controls
  *****************************************************************************
- * Copyright (C) 2002-2011 VLC authors and VideoLAN
+ * Copyright (C) 2002-2012 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan.org>
@@ -34,6 +34,7 @@
 
 #include <vlc_common.h>
 #include <vlc_modules.h>
+#include <vlc_plugin.h>
 #include <vlc_keys.h>
 
 #include "intf.h"
@@ -48,7 +49,7 @@
 #define UP_ARROWHEAD                        "\xE2\x8C\x83"
 #define PLACE_OF_INTEREST_SIGN              "\xE2\x8C\x98"
 
-#define POPULATE_A_KEY( o_menu, string, value )                             \
+#define POPULATE_A_KEY(o_menu, string, value)                               \
 {                                                                           \
     NSMenuItem *o_mi;                                                       \
 /*  Normal */                                                               \
@@ -58,7 +59,7 @@
         0];                                                                 \
     [o_mi setAlternate: NO];                                                \
     [o_mi setTag:                                                           \
-        ( value )];                                                         \
+        (value)];                                                           \
     [o_menu addItem: o_mi];                                                 \
 /*  Ctrl */                                                                 \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
@@ -70,7 +71,7 @@
         NSControlKeyMask];                                                  \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        KEY_MODIFIER_CTRL | ( value )];                                     \
+        KEY_MODIFIER_CTRL | (value)];                                       \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Alt */                                                              \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
@@ -82,7 +83,7 @@
         NSControlKeyMask | NSAlternateKeyMask];                             \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT) | ( value )];                \
+        (KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT) | (value)];                  \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Shift */                                                            \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
@@ -94,7 +95,7 @@
        NSControlKeyMask | NSShiftKeyMask];                                  \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_CTRL | KEY_MODIFIER_SHIFT) | ( value )];              \
+        (KEY_MODIFIER_CTRL | KEY_MODIFIER_SHIFT) | (value)];                \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Apple */                                                            \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSControlKeyMask | NSCommandKeyMask];                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_CTRL | KEY_MODIFIER_COMMAND) | ( value )];            \
+        (KEY_MODIFIER_CTRL | KEY_MODIFIER_COMMAND) | (value)];              \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Alt+Shift */                                                        \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
         (KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT) |       \
-             ( value )];                                                    \
+             (value)];                                                      \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Alt+Apple */                                                        \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
         (KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT | KEY_MODIFIER_COMMAND) |     \
-            ( value )];                                                     \
+            (value)];                                                       \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Shift+Apple */                                                      \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
         (KEY_MODIFIER_CTRL | KEY_MODIFIER_SHIFT | KEY_MODIFIER_COMMAND) |   \
-            ( value )];                                                     \
+            (value)];                                                       \
     [o_menu addItem: o_mi];                                                 \
 /* Ctrl+Alt+Shift+Apple */                                                  \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
         (KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT |        \
-            KEY_MODIFIER_COMMAND) | ( value )];                             \
+            KEY_MODIFIER_COMMAND) | (value)];                               \
     [o_menu addItem: o_mi];                                                 \
 /* Alt */                                                                   \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSAlternateKeyMask];                                                \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        KEY_MODIFIER_ALT | ( value )];                                      \
+        KEY_MODIFIER_ALT | (value)];                                        \
     [o_menu addItem: o_mi];                                                 \
 /* Alt+Shift */                                                             \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSAlternateKeyMask | NSShiftKeyMask];                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT) | ( value )];               \
+        (KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT) | (value)];                 \
     [o_menu addItem: o_mi];                                                 \
 /* Alt+Apple */                                                             \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSAlternateKeyMask | NSCommandKeyMask];                             \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_ALT | KEY_MODIFIER_COMMAND) | ( value )];             \
+        (KEY_MODIFIER_ALT | KEY_MODIFIER_COMMAND) | (value)];               \
     [o_menu addItem: o_mi];                                                 \
 /* Alt+Shift+Apple */                                                       \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
         (KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT | KEY_MODIFIER_COMMAND) |    \
-            ( value )];                                                     \
+            (value)];                                                       \
     [o_menu addItem: o_mi];                                                 \
 /* Shift */                                                                 \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSShiftKeyMask];                                                    \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        KEY_MODIFIER_SHIFT | ( value )];                                    \
+        KEY_MODIFIER_SHIFT | (value)];                                      \
     [o_menu addItem: o_mi];                                                 \
 /* Shift+Apple */                                                           \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSShiftKeyMask | NSCommandKeyMask];                                 \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        (KEY_MODIFIER_SHIFT | KEY_MODIFIER_COMMAND) | ( value )];           \
+        (KEY_MODIFIER_SHIFT | KEY_MODIFIER_COMMAND) | (value)];             \
     [o_menu addItem: o_mi];                                                 \
 /* Apple */                                                                 \
     o_mi = [[NSMenuItem alloc] initWithTitle:                               \
         NSCommandKeyMask];                                                  \
     [o_mi setAlternate: YES];                                               \
     [o_mi setTag:                                                           \
-        KEY_MODIFIER_COMMAND | ( value )];                                  \
+        KEY_MODIFIER_COMMAND | (value)];                                    \
     [o_menu addItem: o_mi];                                                 \
 }
 
-#define ADD_LABEL( o_label, superFrame, x_offset, my_y_offset, label,       \
-    tooltip )                                                               \
+#define ADD_LABEL(o_label, superFrame, x_offset, my_y_offset, label,        \
+    tooltip                                                               \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.size.height = 17;                                                  \
     [o_label sizeToFit];                                                    \
 }
 
-#define ADD_TEXTFIELD( o_textfield, superFrame, x_offset, my_y_offset,      \
-    my_width, tooltip, init_value )                                         \
+#define ADD_TEXTFIELD(o_textfield, superFrame, x_offset, my_y_offset,       \
+    my_width, tooltip, init_value                                         \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.origin.x = x_offset;                                               \
     [o_textfield setStringValue: init_value];                               \
 }
 
-#define ADD_SECURETEXTFIELD( o_textfield, superFrame, x_offset, my_y_offset,      \
-my_width, tooltip, init_value )                                         \
+#define ADD_SECURETEXTFIELD(o_textfield, superFrame, x_offset, my_y_offset, \
+my_width, tooltip, init_value)                                              \
 {                                                                           \
-NSRect s_rc = superFrame;                                               \
-s_rc.origin.x = x_offset;                                               \
-s_rc.origin.y = my_y_offset;                                            \
-s_rc.size.height = 22;                                                  \
-s_rc.size.width = my_width;                                             \
-o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
-[o_textfield setFont:[NSFont systemFontOfSize:0]];                      \
-[o_textfield setToolTip: tooltip];                                      \
-[o_textfield setStringValue: init_value];                               \
-}
-
-#define ADD_COMBO( o_combo, superFrame, x_offset, my_y_offset, x2_offset,   \
-    tooltip )                                                               \
+NSRect s_rc = superFrame;                                                   \
+s_rc.origin.x = x_offset;                                                   \
+s_rc.origin.y = my_y_offset;                                                \
+s_rc.size.height = 22;                                                      \
+s_rc.size.width = my_width;                                                 \
+o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];     \
+[o_textfield setFont:[NSFont systemFontOfSize:0]];                          \
+[o_textfield setToolTip: tooltip];                                          \
+[o_textfield setStringValue: init_value];                                   \
+}
+
+#define ADD_COMBO(o_combo, superFrame, x_offset, my_y_offset, x2_offset,    \
+    tooltip                                                               \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.origin.x = x_offset + 2;                                           \
@@ -313,8 +314,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     [o_combo setCompletes:YES];                                             \
 }
 
-#define ADD_RIGHT_BUTTON( o_button, superFrame, x_offset, my_y_offset,      \
-    tooltip, title )                                                        \
+#define ADD_RIGHT_BUTTON(o_button, superFrame, x_offset, my_y_offset,       \
+    tooltip, title                                                        \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     o_button = [[[NSButton alloc] initWithFrame: s_rc] retain];             \
@@ -333,8 +334,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     [o_button setAction: @selector(openFileDialog:)];                       \
 }
 
-#define ADD_POPUP( o_popup, superFrame, x_offset, my_y_offset, x2_offset,   \
-    tooltip )                                                               \
+#define ADD_POPUP(o_popup, superFrame, x_offset, my_y_offset, x2_offset,    \
+    tooltip                                                               \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.origin.x = x_offset - 1;                                           \
@@ -347,8 +348,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     [o_popup setToolTip: tooltip];                                          \
 }
 
-#define ADD_STEPPER( o_stepper, superFrame, x_offset, my_y_offset, tooltip, \
-    lower, higher )                                                         \
+#define ADD_STEPPER(o_stepper, superFrame, x_offset, my_y_offset, tooltip,  \
+    lower, higher                                                         \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.origin.x = x_offset;                                               \
@@ -366,8 +367,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         NSLeftMouseDraggedMask];                                            \
 }
 
-#define ADD_SLIDER( o_slider, superFrame, x_offset, my_y_offset, my_width,  \
-    tooltip, lower, higher )                                                \
+#define ADD_SLIDER(o_slider, superFrame, x_offset, my_y_offset, my_width,   \
+    tooltip, lower, higher                                                \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.origin.x = x_offset;                                               \
@@ -381,8 +382,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     [o_slider setMinValue: lower];                                          \
 }
 
-#define ADD_CHECKBOX( o_checkbox, superFrame, x_offset, my_y_offset, label, \
-    tooltip, init_value, position )                                         \
+#define ADD_CHECKBOX(o_checkbox, superFrame, x_offset, my_y_offset, label,  \
+    tooltip, init_value, position                                         \
 {                                                                           \
     NSRect s_rc = superFrame;                                               \
     s_rc.size.height = 18;                                                  \
@@ -399,6 +400,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 }
 
 @implementation VLCConfigControl
+@synthesize type = i_type, viewType = i_view_type, advanced = b_advanced;
+
 - (id)initWithFrame: (NSRect)frame
 {
     return [self initWithFrame: frame
@@ -410,8 +413,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 {
     self = [super initWithFrame: frame];
 
-    if( self != nil )
-    {
+    if (self != nil) {
         p_item = _p_item;
         psz_name = p_item->psz_name;
         o_label = NULL;
@@ -432,20 +434,18 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (void)dealloc
 {
-    if( o_label ) [o_label release];
-    free( psz_name );
+    if (o_label) [o_label release];
+    free(psz_name);
     [super dealloc];
 }
 
 + (int)calcVerticalMargin: (int)i_curItem lastItem: (int)i_lastItem
 {
     int i_margin;
-    switch( i_curItem )
-    {
+    switch(i_curItem) {
     case CONFIG_ITEM_STRING:
     case CONFIG_ITEM_PASSWORD:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -481,8 +481,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_STRING_LIST:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -519,8 +518,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         break;
     case CONFIG_ITEM_LOADFILE:
     case CONFIG_ITEM_SAVEFILE:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 13;
@@ -556,8 +554,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_MODULE:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -593,8 +590,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_INTEGER:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -630,8 +626,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_RANGED_INTEGER:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -667,8 +662,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_BOOL:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 10;
@@ -704,8 +698,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_KEY:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 8;
@@ -741,8 +734,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         }
         break;
     case CONFIG_ITEM_MODULE_LIST:
-        switch( i_lastItem )
-        {
+        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
             i_margin = 10;
@@ -789,18 +781,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 {
     VLCConfigControl *p_control = NULL;
 
-    switch( _p_item->i_type )
-    {
+    switch(_p_item->i_type) {
     case CONFIG_ITEM_STRING:
     case CONFIG_ITEM_PASSWORD:
-        if( !_p_item->i_list )
-        {
+        if (!_p_item->list_count) {
             p_control = [[StringConfigControl alloc]
                     initWithItem: _p_item
                     withView: o_parent_view];
-        }
-        else
-        {
+        } else {
             p_control = [[StringListConfigControl alloc]
                     initWithItem: _p_item
                     withView: o_parent_view];
@@ -820,24 +808,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
                     withView: o_parent_view];
         break;
     case CONFIG_ITEM_INTEGER:
-        if( _p_item->i_list )
-        {
-            p_control = [[IntegerListConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        }
-        else if( (_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX) )
-        {
-            p_control = [[RangedIntegerConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        }
+        if (_p_item->list_count)
+            p_control = [[IntegerListConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
+        else if ((_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX))
+            p_control = [[RangedIntegerConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
         else
-        {
-            p_control = [[IntegerConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        }
+            p_control = [[IntegerConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
         break;
     case CONFIG_ITEM_BOOL:
         p_control = [[BoolConfigControl alloc]
@@ -845,20 +821,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
                     withView: o_parent_view];
         break;
     case CONFIG_ITEM_FLOAT:
-        if( (_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX) )
-        {
-            p_control = [[RangedFloatConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        }
+        if ((_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX))
+            p_control = [[RangedFloatConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
         else
-        {
-            p_control = [[FloatConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        }
+            p_control = [[FloatConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
         break;
-    /* don't display keys in the advanced settings, since the current controls 
+    /* don't display keys in the advanced settings, since the current controls
     are broken by design. The user is required to change hotkeys in the sprefs
     and can only change really advanced stuff here..
     case CONFIG_ITEM_KEY:
@@ -868,9 +836,10 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         break; */
     case CONFIG_ITEM_MODULE_LIST:
     case CONFIG_ITEM_MODULE_LIST_CAT:
-        p_control = [[ModuleListConfigControl alloc]
-                    initWithItem: _p_item
-                    withView: o_parent_view];
+        p_control = [[ModuleListConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
+        break;
+    case CONFIG_SECTION:
+        p_control = [[SectionControl alloc] initWithItem: _p_item withView: o_parent_view];
         break;
     default:
         break;
@@ -880,22 +849,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (NSString *)name
 {
-    return [[VLCMain sharedInstance] localizedString: psz_name];
-}
-
-- (int)type
-{
-    return i_type;
-}
-
-- (int)viewType
-{
-    return i_view_type;
-}
-
-- (BOOL)isAdvanced
-{
-    return b_advanced;
+    return _NS(psz_name);
 }
 
 - (int)intValue
@@ -916,8 +870,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 - (void)applyChanges
 {
     vlc_value_t val;
-    switch( p_item->i_type )
-    {
+    switch(p_item->i_type) {
     case CONFIG_ITEM_STRING:
     case CONFIG_ITEM_PASSWORD:
     case CONFIG_ITEM_LOADFILE:
@@ -926,18 +879,18 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     case CONFIG_ITEM_MODULE:
     case CONFIG_ITEM_MODULE_LIST:
     case CONFIG_ITEM_MODULE_LIST_CAT:
-        config_PutPsz( VLCIntf, psz_name, [self stringValue] );
+        config_PutPsz(VLCIntf, psz_name, [self stringValue]);
         break;
     case CONFIG_ITEM_KEY:
         /* So you don't need to restart to have the changes take effect */
         val.i_int = [self intValue];
-        var_Set( VLCIntf->p_libvlc, psz_name, val );
+        var_Set(VLCIntf->p_libvlc, psz_name, val);
     case CONFIG_ITEM_INTEGER:
     case CONFIG_ITEM_BOOL:
-        config_PutInt( VLCIntf, psz_name, [self intValue] );
+        config_PutInt(VLCIntf, psz_name, [self intValue]);
         break;
     case CONFIG_ITEM_FLOAT:
-        config_PutFloat( VLCIntf, psz_name, [self floatValue] );
+        config_PutFloat(VLCIntf, psz_name, [self floatValue]);
         break;
     }
 }
@@ -969,44 +922,36 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
-        if( p_item->i_type == CONFIG_ITEM_PASSWORD )
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
+        if (p_item->i_type == CONFIG_ITEM_PASSWORD)
             i_view_type = CONFIG_ITEM_PASSWORD;
         else
             i_view_type = CONFIG_ITEM_STRING;
 
-        o_textfieldTooltip = [[VLCMain sharedInstance] wrapString:
-                              [[VLCMain sharedInstance] localizedString: (char *)p_item->psz_longtext]
-                                                          toWidth: PREFS_WRAP];
+        o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the textfield */
-        if( p_item->value.psz )
-            o_textfieldString = [[VLCMain sharedInstance]
-                                    localizedString: (char *)p_item->value.psz];
+        if (p_item->value.psz)
+            o_textfieldString = _NS((char *)p_item->value.psz);
         else
-            o_textfieldString = [NSString stringWithString: @""];
-        if( p_item->i_type == CONFIG_ITEM_PASSWORD )
-        {
-            ADD_SECURETEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
+            o_textfieldString = @"";
+        if (p_item->i_type == CONFIG_ITEM_PASSWORD) {
+            ADD_SECURETEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
                           0, mainFrame.size.width - [o_label frame].size.width -
-                          2, o_textfieldTooltip, o_textfieldString )
-        }
-        else
-        {
-            ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
+                          2, o_textfieldTooltip, o_textfieldString)
+        } else {
+            ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
                             0, mainFrame.size.width - [o_label frame].size.width -
-                            2, o_textfieldTooltip, o_textfieldString )
+                            2, o_textfieldTooltip, o_textfieldString)
         }
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
 
@@ -1037,20 +982,19 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (char *)stringValue
 {
-    return [[VLCMain sharedInstance] delocalizeString:
+    return [[VLCStringUtility sharedInstance] delocalizeString:
                         [o_textfield stringValue]];
 }
 
 - (void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
-    if( psz_value )
-        o_textfieldString = [[VLCMain sharedInstance]
-                                localizedString: psz_value];
+    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+    if (psz_value)
+        o_textfieldString = _NS(psz_value);
     else
-        o_textfieldString = [NSString stringWithString: @""];
-    free( psz_value );
+        o_textfieldString = @"";
+    free(psz_value);
     [super resetValues];
 }
 @end
@@ -1066,38 +1010,43 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
-        int i_index;
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_STRING_LIST;
 
-        o_textfieldTooltip = [[VLCMain sharedInstance] wrapString:
-                              [[VLCMain sharedInstance]
-                               localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS(p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the textfield */
-        ADD_COMBO( o_combo, mainFrame, [o_label frame].size.width,
-            -2, 0, o_textfieldTooltip )
-        [o_combo setAutoresizingMask:NSViewWidthSizable ];
-        for( i_index = 0; i_index < p_item->i_list; i_index++ )
-        {
-            if( !p_item->value.psz && !p_item->ppsz_list[i_index] )
-                [o_combo selectItemAtIndex: i_index];
-            else if( p_item->value.psz && p_item->ppsz_list[i_index] &&
-                !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
-                [o_combo selectItemAtIndex: i_index];
-       }
-        [self addSubview: o_combo];
+        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
+            -2, 0, o_textfieldTooltip)
+        [o_popup setAutoresizingMask:NSViewWidthSizable];
+
+        /* add items */
+        for (int i_index = 0; i_index < p_item->list_count; i_index++) {
+            NSString *o_text;
+            if (p_item->list_text && p_item->list_text[i_index])
+                o_text = _NS((char *)p_item->list_text[i_index]);
+            else
+                o_text = _NS((char *)p_item->list.psz[i_index]);
+            [o_popup addItemWithTitle: o_text];
+
+            /* select default item */
+            if (!p_item->value.psz && !p_item->list.psz[i_index])
+                [o_popup selectItemAtIndex: i_index];
+            else if (p_item->value.psz && p_item->list.psz[i_index] &&
+                     !strcmp(p_item->value.psz, p_item->list.psz[i_index]))
+                [o_popup selectItemAtIndex: i_index];
+        }
+
+        [self addSubview: o_popup];
     }
     return self;
 }
@@ -1110,67 +1059,47 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     frame.origin.x = i_xPos - frame.size.width - 3;
     [o_label setFrame:frame];
 
-    frame = [o_combo frame];
+    frame = [o_popup frame];
     frame.origin.x = i_xPos + 2;
     frame.size.width = superFrame.size.width - frame.origin.x + 2;
-    [o_combo setFrame:frame];
+    [o_popup setFrame:frame];
 }
 
 - (void)dealloc
 {
-    [o_combo release];
+    [o_popup release];
     [super dealloc];
 }
 
 - (char *)stringValue
 {
-    if( [o_combo indexOfSelectedItem] >= 0 ) {
-        if( p_item->ppsz_list[[o_combo indexOfSelectedItem]] != NULL )
-            return strdup( p_item->ppsz_list[[o_combo indexOfSelectedItem]] );
+    if ([o_popup indexOfSelectedItem] >= 0) {
+        if (p_item->list.psz[[o_popup indexOfSelectedItem]] != NULL)
+            return strdup(p_item->list.psz[[o_popup indexOfSelectedItem]]);
     } else {
-        if( [[VLCMain sharedInstance] delocalizeString: [o_combo stringValue]] != NULL )
-            return strdup( [[VLCMain sharedInstance] delocalizeString: [o_combo stringValue]] );
+        if ([[VLCStringUtility sharedInstance] delocalizeString: [o_popup stringValue]] != NULL)
+            return strdup([[VLCStringUtility sharedInstance] delocalizeString: [o_popup stringValue]]);
     }
     return NULL;
 }
 
 - (void)resetValues
 {
-    int i_index;
-    [o_combo reloadData];
-    char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
-
-    for( i_index = 0; i_index < p_item->i_list; i_index++ )
-    {
-        if( !psz_value && !p_item->ppsz_list[i_index] )
-            [o_combo selectItemAtIndex: i_index];
-        else if( psz_value && p_item->ppsz_list[i_index] &&
-            !strcmp( psz_value, p_item->ppsz_list[i_index] ) )
-            [o_combo selectItemAtIndex: i_index];
+    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+
+    for (int i_index = 0; i_index < p_item->list_count; i_index++) {
+        if (!psz_value && !p_item->list.psz[i_index])
+            [o_popup selectItemAtIndex: i_index];
+        else if (psz_value && p_item->list.psz[i_index] &&
+            !strcmp(psz_value, p_item->list.psz[i_index]))
+            [o_popup selectItemAtIndex: i_index];
     }
 
-    free( psz_value );
+    free(psz_value);
     [super resetValues];
 }
 @end
 
-@implementation StringListConfigControl (NSComboBoxDataSource)
-- (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox
-{
-        return p_item->i_list;
-}
-
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)i_index
-{
-    if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] )
-    {
-        return [[VLCMain sharedInstance]
-                    localizedString: (char *)p_item->ppsz_list_text[i_index]];
-    } else return [[VLCMain sharedInstance]
-                    localizedString: (char *)p_item->ppsz_list[i_index]];
-}
-@end
-
 @implementation FileConfigControl
 - (id) initWithItem: (module_config_t *)_p_item
            withView: (NSView *)o_parent_view
@@ -1182,41 +1111,37 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_LOADFILE;
 
-        o_itemTooltip = [[VLCMain sharedInstance]
-                           wrapString: [[VLCMain sharedInstance]
-                                        localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_itemTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* is it a directory */
-        b_directory = ( [self type] == CONFIG_ITEM_DIRECTORY ) ? YES : NO;
+        b_directory = ([self type] == CONFIG_ITEM_DIRECTORY) ? YES : NO;
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, 3, o_labelString, o_itemTooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, 3, o_labelString, o_itemTooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the button */
-        ADD_RIGHT_BUTTON( o_button, mainFrame, 0, 0, o_itemTooltip,
-                            _NS("Browse...") )
+        ADD_RIGHT_BUTTON(o_button, mainFrame, 0, 0, o_itemTooltip,
+                            _NS("Browse..."))
         [o_button setAutoresizingMask:NSViewMinXMargin ];
         [self addSubview: o_button];
 
         /* build the textfield */
-        if( p_item->value.psz )
+        if (p_item->value.psz)
             o_textfieldString = [NSString stringWithFormat: @"%s", (char *)p_item->value.psz];
         else
-            o_textfieldString = [NSString stringWithString: @""];
-        ADD_TEXTFIELD( o_textfield, mainFrame, 12, 2, mainFrame.size.width -
+            o_textfieldString = @"";
+        ADD_TEXTFIELD(o_textfield, mainFrame, 12, 2, mainFrame.size.width -
                         8 - [o_button frame].size.width,
-                        o_itemTooltip, o_textfieldString )
+                        o_itemTooltip, o_textfieldString)
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
         [self addSubview: o_textfield];
     }
@@ -1245,31 +1170,18 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     [o_open_panel setAllowsMultipleSelection: NO];
     [o_open_panel setCanChooseFiles: !b_directory];
     [o_open_panel setCanChooseDirectories: b_directory];
-    [o_open_panel beginSheetForDirectory:nil
-        file:nil
-        types:nil
-        modalForWindow:[sender window]
-        modalDelegate: self
-        didEndSelector: @selector(pathChosenInPanel:
-                        withReturn:
-                        contextInfo:)
-        contextInfo: nil];
-}
-
-- (void)pathChosenInPanel:(NSOpenPanel *)o_sheet
-    withReturn:(int)i_return_code contextInfo:(void  *)o_context_info
-{
-    if( i_return_code == NSOKButton )
-    {
-        NSString *o_path = [[[o_sheet URLs] objectAtIndex: 0] path];
-        [o_textfield setStringValue: o_path];
-    }
+    [o_open_panel beginSheetModalForWindow:[sender window] completionHandler:^(NSInteger returnCode) {
+        if (returnCode == NSOKButton) {
+            NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
+            [o_textfield setStringValue: o_path];
+        }        
+    }];
 }
 
 - (char *)stringValue
 {
-    if[[o_textfield stringValue] length] != 0)
-        return strdup( [[o_textfield stringValue] fileSystemRepresentation] );
+    if ([[o_textfield stringValue] length] != 0)
+        return strdup([[o_textfield stringValue] fileSystemRepresentation]);
     else
         return NULL;
 }
@@ -1277,11 +1189,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 -(void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
-    if( psz_value )
+    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+    if (psz_value)
         o_textfieldString = [NSString stringWithFormat: @"%s", psz_value];
     else
-        o_textfieldString = [NSString stringWithString: @""];
+        o_textfieldString = @"";
 
     free(psz_value);
     [super resetValues];
@@ -1299,28 +1211,24 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_MODULE;
 
-        o_popupTooltip = [[VLCMain sharedInstance] wrapString:
-                          [[VLCMain sharedInstance]
-                           localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_popupTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
+            o_labelString = @"";
 
-        ADD_LABEL( o_label, mainFrame, 0, -1, o_labelString, o_popupTooltip )
+        ADD_LABEL(o_label, mainFrame, 0, -1, o_labelString, o_popupTooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the popup */
-        ADD_POPUP( o_popup, mainFrame, [o_label frame].size.width,
-            -2, 0, o_popupTooltip )
+        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
+            -2, 0, o_popupTooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
         [o_popup addItemWithTitle: _NS("Default")];
         [[o_popup lastItem] setTag: -1];
@@ -1359,108 +1267,89 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     size_t i_module_index;
     module_t *p_parser, **p_list;
 
-    p_list = module_list_get( NULL );
-    for( i_module_index = 0; p_list[i_module_index]; i_module_index++ )
-    {
+    size_t count;
+    p_list = module_list_get(&count);
+    for (i_module_index = 0; i_module_index < count; i_module_index++) {
         p_parser = p_list[i_module_index];
 
-        if( p_item->i_type == CONFIG_ITEM_MODULE )
-        {
-            if( module_provides( p_parser, p_item->psz_type ) )
-            {
-                NSString *o_description = [[VLCMain sharedInstance]
-                    localizedString: module_get_name( p_parser, TRUE )];
-                if( [newval isEqualToString: o_description] )
-                {
-                    returnval = strdup( module_get_object( p_parser ));
+        if (p_item->i_type == CONFIG_ITEM_MODULE) {
+            if (module_provides(p_parser, p_item->psz_type)) {
+                NSString *o_description = _NS(module_get_name(p_parser, TRUE));
+                if ([newval isEqualToString: o_description]) {
+                    returnval = strdup(module_get_object(p_parser));
                     break;
                 }
             }
-        }
-        else
-        {
-            if( module_is_main( p_parser) )
+        } else {
+            if (module_is_main(p_parser))
                 continue;
 
             unsigned int confsize;
-            module_config_t *p_config = module_config_get( p_parser, &confsize );
-            for ( size_t i = 0; i < confsize; i++ )
-            {
+            module_config_t *p_config = module_config_get(p_parser, &confsize);
+            for (size_t i = 0; i < confsize; i++) {
                 module_config_t *p_cfg = p_config + i;
                 /* Hack: required subcategory is stored in i_min */
-                if( p_cfg->i_type == CONFIG_SUBCATEGORY &&
-                    p_cfg->value.i == p_cfg->min.i )
-                {
-                    NSString *o_description = [[VLCMain sharedInstance]
-                        localizedString: module_get_name( p_parser, TRUE )];
-                    if( [newval isEqualToString: o_description] )
-                    {
-                        returnval = strdup(module_get_object( p_parser ));
+                if (p_cfg->i_type == CONFIG_SUBCATEGORY &&
+                    p_cfg->value.i == p_cfg->min.i) {
+                    NSString *o_description = _NS(module_get_name(p_parser, TRUE));
+                    if ([newval isEqualToString: o_description]) {
+                        returnval = strdup(module_get_object(p_parser));
                         break;
                     }
                 }
             }
-            module_config_free( p_config );
+            module_config_free(p_config);
         }
     }
-    module_list_free( p_list );
+    module_list_free(p_list);
     return returnval;
 }
 
 -(void)resetValues
 {
     /* build a list of available modules */
-    size_t i_index;
     module_t *p_parser, **p_list;
 
-    p_list = module_list_get( NULL );
-    for( i_index = 0; p_list[i_index]; i_index++ )
-    {
+    size_t count;
+    p_list = module_list_get(&count);
+    for (size_t i_index = 0; i_index < count; i_index++) {
         p_parser = p_list[i_index];
 
-        if( p_item->i_type == CONFIG_ITEM_MODULE )
-        {
-            if( module_provides( p_parser, p_item->psz_type ) )
-            {
-                NSString *o_description = [[VLCMain sharedInstance]
-                    localizedString: module_get_name( p_parser, TRUE )];
+        if (p_item->i_type == CONFIG_ITEM_MODULE) {
+            if (module_provides(p_parser, p_item->psz_type)) {
+                NSString *o_description = _NS(module_get_name(p_parser, TRUE));
                 [o_popup addItemWithTitle: o_description];
-                char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
+                char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
 
-                ifpsz_value &&
-                    !strcmp( psz_value, module_get_object( p_parser ) ) )
+                if (psz_value &&
+                    !strcmp(psz_value, module_get_object(p_parser)))
                     [o_popup selectItem:[o_popup lastItem]];
 
                 free(psz_value);
             }
-        }
-        else
-        {
-            if( module_is_main( p_parser ) )
+        } else {
+            if (module_is_main(p_parser))
                 continue;
             unsigned int confsize;
 
-            module_config_t *p_configlist = module_config_get( p_parser, &confsize );
-            for ( size_t i = 0; i < confsize; i++ )
-            {
+            module_config_t *p_configlist = module_config_get(p_parser, &confsize);
+            for (size_t i = 0; i < confsize; i++) {
                 module_config_t *p_config = &p_configlist[i];
                 /* Hack: required subcategory is stored in i_min */
-                if( p_config->i_type == CONFIG_SUBCATEGORY &&
-                    p_config->value.i == p_item->min.i )
-                {
-                    NSString *o_description = [[VLCMain sharedInstance]
-                        localizedString: module_get_name( p_parser, TRUE )];
+                if (p_config->i_type == CONFIG_SUBCATEGORY &&
+                    p_config->value.i == p_item->min.i) {
+                    NSString *o_description = _NS(module_get_name(p_parser, TRUE));
                     [o_popup addItemWithTitle: o_description];
 
-                    ifp_item->value.psz && !strcmp(p_item->value.psz,
-                                            module_get_object( p_parser )) )
+                    if (p_item->value.psz && !strcmp(p_item->value.psz,
+                                            module_get_object(p_parser)))
                         [o_popup selectItem:[o_popup lastItem]];
                 }
             }
-            module_config_free( p_configlist );
+            module_config_free(p_configlist);
         }
     }
-    module_list_free( p_list );
+    module_list_free(p_list);
     [super resetValues];
 }
 @end
@@ -1476,33 +1365,29 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_INTEGER;
 
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-            [[VLCMain sharedInstance]
-                localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the stepper */
-        ADD_STEPPER( o_stepper, mainFrame, mainFrame.size.width - 19,
+        ADD_STEPPER(o_stepper, mainFrame, mainFrame.size.width - 19,
             0, o_tooltip, -100000, 100000)
         [o_stepper setIntValue: p_item->value.i];
         [o_stepper setAutoresizingMask:NSViewMaxXMargin ];
         [self addSubview: o_stepper];
 
-        ADD_TEXTFIELD( o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
-            1, 49, o_tooltip, @"" )
+        ADD_TEXTFIELD(o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
+            1, 49, o_tooltip, @"")
         [o_textfield setIntValue: p_item->value.i];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
@@ -1573,37 +1458,39 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
-        int i_index;
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_STRING_LIST;
 
-        o_textfieldTooltip = [[VLCMain sharedInstance] wrapString:
-                              [[VLCMain sharedInstance]
-                               localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];        
+        o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the textfield */
-        ADD_COMBO( o_combo, mainFrame, [o_label frame].size.width,
-            -2, 0, o_textfieldTooltip )
-        [o_combo setAutoresizingMask:NSViewWidthSizable ];
-        for( i_index = 0; i_index < p_item->i_list; i_index++ )
-        {
-            if( p_item->value.i == p_item->pi_list[i_index] )
-            {
-                [o_combo selectItemAtIndex: i_index];
-            }
+        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
+            -2, 0, o_textfieldTooltip)
+        [o_popup setAutoresizingMask:NSViewWidthSizable ];
+
+        /* add items */
+        for (int i_index = 0; i_index < p_item->list_count; i_index++) {
+            NSString *o_text;
+            if (p_item->list_text && p_item->list_text[i_index])
+                o_text = _NS((char *)p_item->list_text[i_index]);
+            else
+                o_text = [NSString stringWithFormat: @"%i", p_item->list.i[i_index]];
+            [o_popup addItemWithTitle: o_text];
+
+            if (p_item->value.i == p_item->list.i[i_index])
+                [o_popup selectItemAtIndex: i_index];
         }
-        [self addSubview: o_combo];
+        
+        [self addSubview: o_popup];
     }
     return self;
 }
@@ -1616,57 +1503,36 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     frame.origin.x = i_xPos - frame.size.width - 3;
     [o_label setFrame:frame];
 
-    frame = [o_combo frame];
+    frame = [o_popup frame];
     frame.origin.x = i_xPos + 2;
     frame.size.width = superFrame.size.width - frame.origin.x + 2;
-    [o_combo setFrame:frame];
+    [o_popup setFrame:frame];
 }
 
 - (void)dealloc
 {
-    [o_combo release];
+    [o_popup release];
     [super dealloc];
 }
 
 - (int)intValue
 {
-    if( [o_combo indexOfSelectedItem] >= 0 )
-        return p_item->pi_list[[o_combo indexOfSelectedItem]];
+    if ([o_popup indexOfSelectedItem] >= 0)
+        return p_item->list.i[[o_popup indexOfSelectedItem]];
     else
-        return [o_combo intValue];
+        return [o_popup intValue];
 }
 
 -(void)resetValues
 {
-    int i_index;
-    [o_combo reloadData];
-    for( i_index = 0; i_index < p_item->i_list; i_index++ )
-    {
-        if( config_GetInt( VLCIntf, p_item->psz_name) == p_item->pi_list[i_index] )
-        {
-            [o_combo selectItemAtIndex: i_index];
-        }
+    for (int i_index = 0; i_index < p_item->list_count; i_index++) {
+        if (config_GetInt(VLCIntf, p_item->psz_name) == p_item->list.i[i_index])
+            [o_popup selectItemAtIndex: i_index];
     }
 
 }
 @end
 
-@implementation IntegerListConfigControl (NSComboBoxDataSource)
-- (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox
-{
-    return p_item->i_list;
-}
-
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)i_index
-{
-    if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] )
-        return [[VLCMain sharedInstance]
-                    localizedString: (char *)p_item->ppsz_list_text[i_index]];
-    else
-        return [NSString stringWithFormat: @"%i", p_item->pi_list[i_index]];
-}
-@end
-
 @implementation RangedIntegerConfigControl
 - (id) initWithItem: (module_config_t *)_p_item
            withView: (NSView *)o_parent_view
@@ -1678,27 +1544,23 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_RANGED_INTEGER;
 
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-                     [[VLCMain sharedInstance]
-                      localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the textfield */
-        ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
-            28, 49, o_tooltip, @"" )
+        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
+            28, 49, o_tooltip, @"")
         [o_textfield setIntValue: p_item->value.i];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield setDelegate: self];
@@ -1709,26 +1571,26 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         [self addSubview: o_textfield];
 
         /* build the mintextfield */
-        ADD_LABEL( o_textfield_min, mainFrame, 12, -30, @"-8888", @"" )
+        ADD_LABEL(o_textfield_min, mainFrame, 12, -30, @"-8888", @"")
         [o_textfield_min setIntValue: p_item->min.i];
         [o_textfield_min setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield_min setAlignment:NSRightTextAlignment];
         [self addSubview: o_textfield_min];
 
         /* build the maxtextfield */
-        ADD_LABEL( o_textfield_max, mainFrame,
-                    mainFrame.size.width - 31, -30, @"8888", @"" )
+        ADD_LABEL(o_textfield_max, mainFrame,
+                    mainFrame.size.width - 31, -30, @"8888", @"")
         [o_textfield_max setIntValue: p_item->max.i];
         [o_textfield_max setAutoresizingMask:NSViewMinXMargin ];
         [self addSubview: o_textfield_max];
 
         /* build the slider */
-        ADD_SLIDER( o_slider, mainFrame, [o_textfield_min frame].origin.x +
+        ADD_SLIDER(o_slider, mainFrame, [o_textfield_min frame].origin.x +
             [o_textfield_min frame].size.width + 6, -1, mainFrame.size.width -
             [o_textfield_max frame].size.width -
             [o_textfield_max frame].size.width - 14 -
             [o_textfield_min frame].origin.x, o_tooltip,
-            p_item->min.i, p_item->max.i )
+            p_item->min.i, p_item->max.i)
         [o_slider setIntValue: p_item->value.i];
         [o_slider setAutoresizingMask:NSViewWidthSizable ];
         [o_slider setTarget: self];
@@ -1779,7 +1641,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (void)resetValues
 {
-    int value = config_GetInt( VLCIntf, p_item->psz_name );
+    int value = config_GetInt(VLCIntf, p_item->psz_name);
     [o_textfield setIntValue:value];
     [o_slider setIntValue:value];
     [super resetValues];
@@ -1797,34 +1659,30 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_INTEGER;
 
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-            [[VLCMain sharedInstance]
-                localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -2, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -2, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the stepper */
-        ADD_STEPPER( o_stepper, mainFrame, mainFrame.size.width - 19,
+        ADD_STEPPER(o_stepper, mainFrame, mainFrame.size.width - 19,
             0, o_tooltip, -100000, 100000)
         [o_stepper setFloatValue: p_item->value.f];
         [o_stepper setAutoresizingMask:NSViewMaxXMargin ];
         [self addSubview: o_stepper];
 
         /* build the textfield */
-        ADD_TEXTFIELD( o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
-            1, 49, o_tooltip, @"" )
+        ADD_TEXTFIELD(o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
+            1, 49, o_tooltip, @"")
         [o_textfield setFloatValue: p_item->value.f];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
@@ -1877,7 +1735,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (void)resetValues
 {
-    [o_textfield setFloatValue: config_GetFloat( VLCIntf, p_item->psz_name)];
+    [o_textfield setFloatValue: config_GetFloat(VLCIntf, p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -1893,27 +1751,23 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_RANGED_INTEGER;
 
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-                     [[VLCMain sharedInstance]
-                      localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];        
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the textfield */
-        ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
-            28, 49, o_tooltip, @"" )
+        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
+            28, 49, o_tooltip, @"")
         [o_textfield setFloatValue: p_item->value.f];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield setDelegate: self];
@@ -1924,26 +1778,26 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         [self addSubview: o_textfield];
 
         /* build the mintextfield */
-        ADD_LABEL( o_textfield_min, mainFrame, 12, -30, @"-8888", @"" )
+        ADD_LABEL(o_textfield_min, mainFrame, 12, -30, @"-8888", @"")
         [o_textfield_min setFloatValue: p_item->min.f];
         [o_textfield_min setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield_min setAlignment:NSRightTextAlignment];
         [self addSubview: o_textfield_min];
 
         /* build the maxtextfield */
-        ADD_LABEL( o_textfield_max, mainFrame, mainFrame.size.width - 31,
-            -30, @"8888", @"" )
+        ADD_LABEL(o_textfield_max, mainFrame, mainFrame.size.width - 31,
+            -30, @"8888", @"")
         [o_textfield_max setFloatValue: p_item->max.f];
         [o_textfield_max setAutoresizingMask:NSViewMinXMargin ];
         [self addSubview: o_textfield_max];
 
         /* build the slider */
-        ADD_SLIDER( o_slider, mainFrame, [o_textfield_min frame].origin.x +
+        ADD_SLIDER(o_slider, mainFrame, [o_textfield_min frame].origin.x +
             [o_textfield_min frame].size.width + 6, -1, mainFrame.size.width -
             [o_textfield_max frame].size.width -
             [o_textfield_max frame].size.width - 14 -
             [o_textfield_min frame].origin.x, o_tooltip, p_item->min.f,
-            p_item->max.f )
+            p_item->max.f)
         [o_slider setFloatValue: p_item->value.f];
         [o_slider setAutoresizingMask:NSViewWidthSizable ];
         [o_slider setTarget: self];
@@ -2012,27 +1866,21 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_BOOL;
 
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
+        else
+            o_labelString = @"";
+
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
+
         /* add the checkbox */
-        o_tooltip = [[VLCMain sharedInstance]
-            wrapString: [[VLCMain sharedInstance]
-            localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
-        ADD_CHECKBOX( o_checkbox, mainFrame, 0,
-                        0, @"", o_tooltip, p_item->value.i, NSImageLeft)
+        ADD_CHECKBOX(o_checkbox, mainFrame, 0,
+                        0, o_labelString, o_tooltip, p_item->value.i, NSImageLeft)
         [o_checkbox setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_checkbox];
-        /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                                localizedString: (char *)p_item->psz_text];
-        else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, [o_checkbox frame].size.width, 0, o_labelString, o_tooltip )
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
     }
     return self;
 }
@@ -2050,7 +1898,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (void)resetValues
 {
-    [o_checkbox setState: config_GetInt( VLCIntf, p_item->psz_name)];
+    [o_checkbox setState: config_GetInt(VLCIntf, p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -2066,39 +1914,34 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_KEY;
 
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-                     [[VLCMain sharedInstance]
-                      localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -1, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -1, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
 
         /* build the popup */
-        ADD_POPUP( o_popup, mainFrame, [o_label frame].origin.x +
+        ADD_POPUP(o_popup, mainFrame, [o_label frame].origin.x +
             [o_label frame].size.width + 3,
-            -2, 0, o_tooltip )
+            -2, 0, o_tooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
 
-        if( o_keys_menu == nil )
-        {
+        if (o_keys_menu == nil) {
             unsigned int i;
             o_keys_menu = [[NSMenu alloc] initWithTitle: @"Keys Menu"];
 #warning This does not work anymore. FIXME.
 #if 0
-            for ( i = 0; i < sizeof(vlc_key) / sizeof(key_descriptor_t); i++)
-                if( vlc_key[i].psz_key_string )
-                    POPULATE_A_KEY( o_keys_menu,
+            for (i = 0; i < sizeof(vlc_key) / sizeof(key_descriptor_t); i++)
+                if (vlc_key[i].psz_key_string)
+                    POPULATE_A_KEY(o_keys_menu,
                         [NSString stringWithUTF8String:vlc_key[i].psz_key_string]
                         , vlc_key[i].i_key_code)
 #endif
@@ -2138,7 +1981,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (void)resetValues
 {
-    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt( VLCIntf, p_item->psz_name )]];
+    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt(VLCIntf, p_item->psz_name)]];
     [super resetValues];
 }
 @end
@@ -2147,96 +1990,111 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 - (id) initWithItem: (module_config_t *)_p_item
            withView: (NSView *)o_parent_view
 {
-    if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
+    if (_p_item->i_type == CONFIG_ITEM_MODULE_LIST)
         //TODO....
         return nil;
-    
+
     //Fill our array to know how may items we have...
     module_t *p_parser, **p_list;
     size_t i_module_index;
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_textfieldString, *o_tooltip;
-    
+
     o_modulearray = [[NSMutableArray alloc] initWithCapacity:10];
     /* build a list of available modules */
-    p_list = module_list_get( NULL );
-    for( i_module_index = 0; p_list[i_module_index]; i_module_index++ )
-    {
+    size_t count;
+    p_list = module_list_get(&count);
+    for (i_module_index = 0; i_module_index < count; i_module_index++) {
         int i;
         p_parser = p_list[i_module_index];
-        
-        if( module_is_main( p_parser ) )
+
+        if (module_is_main(p_parser))
             continue;
-        
+
         unsigned int confsize;
-        module_config_t *p_configlist = module_config_get( p_parser, &confsize );
-        
-        for ( i = 0; i < confsize; i++ )
-        {
+        module_config_t *p_configlist = module_config_get(p_parser, &confsize);
+
+        for (i = 0; i < confsize; i++) {
             unsigned int unused;
             module_config_t *p_config = &p_configlist[i];
             NSString *o_modulelongname, *o_modulename;
             NSNumber *o_moduleenabled = nil;
-            
+
             /* Hack: required subcategory is stored in i_min */
-            if( p_config->i_type == CONFIG_SUBCATEGORY &&
-               p_config->value.i == _p_item->min.i )
-            {
+            if (p_config->i_type == CONFIG_SUBCATEGORY &&
+               p_config->value.i == _p_item->min.i) {
                 o_modulelongname = [NSString stringWithUTF8String:
-                                    module_get_name( p_parser, TRUE )];
+                                    module_get_name(p_parser, TRUE)];
                 o_modulename = [NSString stringWithUTF8String:
-                                module_get_object( p_parser )];
-                
-                if_p_item->value.psz &&
-                   strstr( _p_item->value.psz, module_get_object( p_parser ) ) )
+                                module_get_object(p_parser)];
+
+                if (_p_item->value.psz &&
+                   strstr(_p_item->value.psz, module_get_object(p_parser)))
                     o_moduleenabled = [NSNumber numberWithBool:YES];
                 else
                     o_moduleenabled = [NSNumber numberWithBool:NO];
-                
+
                 [o_modulearray addObject:[NSMutableArray
                                           arrayWithObjects: o_modulename, o_modulelongname,
                                           o_moduleenabled, nil]];
             }
+
+            /* Parental Advisory HACK:
+             * Selecting HTTP, RC and Telnet interfaces is difficult now
+             * since they are just the lua interface module */
+            if (p_config->i_type == CONFIG_SUBCATEGORY &&
+               !strcmp(module_get_object(p_parser), "lua") &&
+               !strcmp(_p_item->psz_name, "extraintf") &&
+               p_config->value.i == _p_item->min.i) {
+
+#define addLuaIntf(shortname, longname) \
+                if (_p_item->value.psz && strstr(_p_item->value.psz, shortname))\
+                    o_moduleenabled = [NSNumber numberWithBool:YES];\
+                else\
+                    o_moduleenabled = [NSNumber numberWithBool:NO];\
+                [o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, _NS(longname), o_moduleenabled, nil]]
+
+                addLuaIntf("http", "Web");
+                addLuaIntf("telnet", "Telnet");
+                addLuaIntf("cli", "Console");
+
+#undef addLuaIntf
+            }
         }
-        module_config_free( p_configlist );
+        module_config_free(p_configlist);
     }
-    module_list_free( p_list );
-    
+    module_list_free(p_list);
+
     mainFrame.size.height = 30 + 20 * [o_modulearray count];
     mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
-    if( [super initWithFrame: mainFrame item: _p_item] != nil )
-    {
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
         i_view_type = CONFIG_ITEM_MODULE_LIST;
-        
-        o_tooltip = [[VLCMain sharedInstance] wrapString:
-                     [[VLCMain sharedInstance]
-                      localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
-        
+
+        o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
+
         /* add the label */
-        if( p_item->psz_text )
-            o_labelString = [[VLCMain sharedInstance]
-                             localizedString: (char *)p_item->psz_text];
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
         else
-            o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
+            o_labelString = @"";
+        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
-        
+
         /* build the textfield */
-        if( p_item->value.psz )
-            o_textfieldString = [[VLCMain sharedInstance]
-                                 localizedString: (char *)p_item->value.psz];
+        if (p_item->value.psz)
+            o_textfieldString = _NS((char *)p_item->value.psz);
         else
-            o_textfieldString = [NSString stringWithString: @""];
-        ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
+            o_textfieldString = @"";
+        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
                       mainFrame.size.height - 22, mainFrame.size.width -
-                      [o_label frame].size.width - 2, o_tooltip, o_textfieldString )
+                      [o_label frame].size.width - 2, o_tooltip, o_textfieldString)
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
         [self addSubview: o_textfield];
-        
-        
+
+
         {
             NSRect s_rc = mainFrame;
             s_rc.size.height = mainFrame.size.height - 30;
@@ -2247,7 +2105,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             [o_scrollview setDrawsBackground: NO];
             [o_scrollview setBorderType: NSBezelBorder];
             [o_scrollview setAutohidesScrollers:YES];
-            
+
             NSTableView *o_tableview;
             o_tableview = [[NSTableView alloc] initWithFrame : s_rc];
             [o_tableview setUsesAlternatingRowBackgroundColors:YES];
@@ -2255,7 +2113,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             /* TODO: find a good way to fix the row height and text size*/
             /* FIXME: support for multiple selection... */
             //    [o_tableview setAllowsMultipleSelection:YES];
-            
+
             NSCell *o_headerCell = [[NSCell alloc] initTextCell:@"Enabled"];
             NSCell *o_dataCell = [[NSButtonCell alloc] init];
             [(NSButtonCell*)o_dataCell setButtonType:NSSwitchButton];
@@ -2267,7 +2125,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             [o_tableColumn setDataCell: o_dataCell];
             [o_tableColumn setWidth:17];
             [o_tableview addTableColumn: o_tableColumn];
-            
+
             o_headerCell = [[NSCell alloc] initTextCell:@"Module Name"];
             o_dataCell = [[NSTextFieldCell alloc] init];
             [o_dataCell setFont:[NSFont systemFontOfSize:12]];
@@ -2279,7 +2137,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             [o_tableview addTableColumn: o_tableColumn];
             [o_tableview registerForDraggedTypes:[NSArray arrayWithObjects:
                                                   @"VLC media player module", nil]];
-            
+
             [o_tableview setDataSource:self];
             [o_tableview setTarget: self];
             [o_tableview setAction: @selector(tableChanged:)];
@@ -2304,10 +2162,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 {
     NSString *o_newstring = @"";
     NSUInteger count = [o_modulearray count];
-    for( NSUInteger i = 0 ; i < count ; i++ )
-        if( [[[o_modulearray objectAtIndex:i] objectAtIndex:2]
-            boolValue] != NO )
-        {
+    for (NSUInteger i = 0 ; i < count ; i++)
+        if ([[[o_modulearray objectAtIndex:i] objectAtIndex:2]
+            boolValue] != NO) {
             o_newstring = [o_newstring stringByAppendingString:
                 [[o_modulearray objectAtIndex:i] objectAtIndex:0]];
             o_newstring = [o_newstring stringByAppendingString:@":"];
@@ -2326,13 +2183,13 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
 - (char *)stringValue
 {
-    return strdup( [[o_textfield stringValue] UTF8String] );
+    return strdup([[o_textfield stringValue] UTF8String]);
 }
 
 -(void)resetValues
 {
-#warning Reset prefs of the module selector is broken atm. 
-    NSLog( @"don't forget about modulelistconfig" );
+#warning Reset prefs of the module selector is broken atm.
+    msg_Err(VLCIntf, "don't forget about modulelistconfig");
     [super resetValues];
 }
 
@@ -2346,8 +2203,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     // We only want to allow dragging of selected rows.
     NSEnumerator    *iter = [rows objectEnumerator];
     NSNumber        *row;
-    while ((row = [iter nextObject]) != nil)
-    {
+    while ((row = [iter nextObject]) != nil) {
         if (![table isRowSelected:[row intValue]])
             return NO;
     }
@@ -2363,8 +2219,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     proposedDropOperation:(NSTableViewDropOperation)op
 {
     // Make drops at the end of the table go to the end.
-    if (row == -1)
-    {
+    if (row == -1) {
         row = [table numberOfRows];
         op = NSTableViewDropAbove;
         [table setDropRow:row dropOperation:op];
@@ -2389,15 +2244,13 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
         // Intra-table drag - data is the array of rows.
         if (!accepted && (array =
-            [pb propertyListForType:@"VLC media player module"]) != NULL)
-        {
+            [pb propertyListForType:@"VLC media player module"]) != NULL) {
             NSEnumerator *iter = nil;
             id val;
             BOOL isCopy = (srcMask & NSDragOperationMove) ? NO:YES;
             // Move the modules
             iter = [array objectEnumerator];
-            while ((val = [iter nextObject]) != NULL)
-            {
+            while ((val = [iter nextObject]) != NULL) {
                 NSArray *o_tmp = [[o_modulearray objectAtIndex:
                     [val intValue]] mutableCopyWithZone:nil];
                 [o_modulearray removeObject:o_tmp];
@@ -2439,9 +2292,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 - (id)tableView:(NSTableView *)aTableView
     objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
 {
-    if( [[aTableColumn identifier] isEqualToString: @"Enabled"] )
+    if ([[aTableColumn identifier] isEqualToString: @"Enabled"])
         return [[o_modulearray objectAtIndex:rowIndex] objectAtIndex:2];
-    if( [[aTableColumn identifier] isEqualToString: @"Module"] )
+    if ([[aTableColumn identifier] isEqualToString: @"Module"])
         return [[o_modulearray objectAtIndex:rowIndex] objectAtIndex:1];
 
     return nil;
@@ -2454,3 +2307,44 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         withObject: anObject];
 }
 @end
+
+@implementation SectionControl
+
+- (id) initWithItem: (module_config_t *)_p_item
+           withView: (NSView *)o_parent_view
+{
+    NSRect mainFrame = [o_parent_view frame];
+    NSString *o_labelString, *o_tooltip;
+    mainFrame.size.height = 17;
+    mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
+    mainFrame.origin.x = LEFTMARGIN;
+    mainFrame.origin.y = 0;
+
+    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
+        
+        /* add the label */
+        if (p_item->psz_text)
+            o_labelString = _NS((char *)p_item->psz_text);
+        else
+            o_labelString = @"";
+
+        NSDictionary *boldAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
+                        [NSFont boldSystemFontOfSize:[NSFont systemFontSize]],
+                        NSFontAttributeName,
+                        nil];
+        NSAttributedString *o_bold_string = [[NSAttributedString alloc] initWithString: o_labelString attributes: boldAttributes];
+
+        ADD_LABEL(o_label, mainFrame, 1, 0, @"", @"")
+        [o_label setAttributedStringValue: o_bold_string];
+        [o_label sizeToFit];
+
+        [o_bold_string release];
+        
+        [o_label setAutoresizingMask:NSViewNotSizable];
+        [self addSubview: o_label];
+    }
+    return self;
+}
+
+@end
+