macosx: privatise instance variables and resolve class dependencies on internal imple...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 15 Jul 2015 13:18:57 +0000 (15:18 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 15 Jul 2015 13:21:48 +0000 (15:21 +0200)
74 files changed:
modules/gui/macosx/AddonListDataSource.h
modules/gui/macosx/AddonListDataSource.m
modules/gui/macosx/AddonsWindowController.h
modules/gui/macosx/AddonsWindowController.m
modules/gui/macosx/AudioEffects.h
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/ControlsBar.h
modules/gui/macosx/ControlsBar.m
modules/gui/macosx/ConvertAndSave.h
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/ExtensionsDialogProvider.h
modules/gui/macosx/ExtensionsDialogProvider.m
modules/gui/macosx/ExtensionsManager.h
modules/gui/macosx/ExtensionsManager.m
modules/gui/macosx/InputManager.h
modules/gui/macosx/InputManager.m
modules/gui/macosx/KeyboardBacklight.h
modules/gui/macosx/KeyboardBacklight.m
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindowTitle.h
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/PLItem.h
modules/gui/macosx/PLItem.m
modules/gui/macosx/PLModel.h
modules/gui/macosx/PLModel.m
modules/gui/macosx/ResumeDialogController.h
modules/gui/macosx/ResumeDialogController.m
modules/gui/macosx/SharedDialogs.h
modules/gui/macosx/SharedDialogs.m
modules/gui/macosx/TrackSynchronization.h
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/VLCUIWidgets.h
modules/gui/macosx/VLCUIWidgets.m
modules/gui/macosx/VLCVoutWindowController.h
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VideoEffects.h
modules/gui/macosx/VideoEffects.m
modules/gui/macosx/VideoView.h
modules/gui/macosx/VideoView.m
modules/gui/macosx/Windows.h
modules/gui/macosx/Windows.m
modules/gui/macosx/about.h
modules/gui/macosx/about.m
modules/gui/macosx/bookmarks.h
modules/gui/macosx/bookmarks.m
modules/gui/macosx/coredialogs.h
modules/gui/macosx/coredialogs.m
modules/gui/macosx/eyetv.h
modules/gui/macosx/eyetv.m
modules/gui/macosx/fspanel.h
modules/gui/macosx/fspanel.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/misc.h
modules/gui/macosx/misc.m
modules/gui/macosx/open.h
modules/gui/macosx/open.m
modules/gui/macosx/output.h
modules/gui/macosx/output.m
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs_widgets.h
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/wizard.h
modules/gui/macosx/wizard.m

index affce6f..fb16611 100644 (file)
@@ -26,9 +26,6 @@
 #import <vlc_addons.h>
 
 @interface VLCAddon : NSObject
-{
-    addon_entry_t *p_addon_entry;
-}
 
 - (id)initWithAddon:(addon_entry_t *)p_entry;
 
index cd61a51..c95f156 100644 (file)
 #import "AddonListDataSource.h"
 #import "StringUtility.h"
 
+@interface VLCAddon ()
+{
+    addon_entry_t *p_addon_entry;
+}
+@end
+
 @implementation VLCAddon
 
 - (id)initWithAddon:(addon_entry_t *)p_entry
index 4567c94..dd7c56a 100644 (file)
@@ -21,7 +21,7 @@
 
 #import <Cocoa/Cocoa.h>
 
-@interface AddonsWindowController : NSWindowController <NSTableViewDataSource, NSTableViewDelegate>
+@interface AddonsWindowController : NSWindowController
 {
     IBOutlet NSPopUpButton *_typeSwitcher;
     IBOutlet NSButton *_localAddonsOnlyCheckbox;
@@ -34,7 +34,6 @@
     IBOutlet NSTextField *_version;
     IBOutlet NSTextView *_description;
     IBOutlet NSButton *_installButton;
-
 }
 
 - (IBAction)switchType:(id)sender;
index 53e4b1f..f590f01 100644 (file)
@@ -28,7 +28,7 @@
 #import "MainWindow.h"
 #import "AddonListDataSource.h"
 
-@interface AddonsWindowController()
+@interface AddonsWindowController() <NSTableViewDataSource, NSTableViewDelegate>
 {
     addons_manager_t *_manager;
     NSMutableArray *_addons;
index 031050f..bbdf0cf 100644 (file)
@@ -28,9 +28,7 @@
     /* generic */
     IBOutlet id o_tableView;
     IBOutlet id o_window;
-    intf_thread_t *p_intf;
     IBOutlet id o_profile_pop;
-    BOOL b_genericAudioProfileInInteraction;
 
     /* Equalizer */
     IBOutlet id o_eq_view;
     IBOutlet id o_filter_normLevel_sld;
     IBOutlet id o_filter_normLevel_lbl;
     IBOutlet id o_filter_karaoke_ckb;
-
-    NSInteger i_old_profile_index;
 }
 
 /* generic */
index 450c0af..525a758 100644 (file)
 
 #import <math.h>
 
-@interface VLCAudioEffects (Internal)
+@interface VLCAudioEffects ()
+{
+    intf_thread_t *p_intf;
+    BOOL b_genericAudioProfileInInteraction;
+    NSInteger i_old_profile_index;
+}
 - (void)resetProfileSelector;
 - (void)updatePresetSelector;
 - (void)setBandSliderValuesForPreset:(NSInteger)presetID;
index f53b9e8..35ccd7e 100644 (file)
     IBOutlet id o_time_fld;
     IBOutlet id o_fullscreen_btn;
     IBOutlet id o_resize_view;
-
-    NSImage * o_pause_img;
-    NSImage * o_pause_pressed_img;
-    NSImage * o_play_img;
-    NSImage * o_play_pressed_img;
-
-    NSTimeInterval last_fwd_event;
-    NSTimeInterval last_bwd_event;
-    BOOL just_triggered_next;
-    BOOL just_triggered_previous;
-
-    BOOL b_nativeFullscreenMode;
-    BOOL b_dark_interface;
-
 }
 
 @property (readonly) id bottomBarView;
+@property (readonly) BOOL darkInterface;
+@property (readonly) BOOL nativeFullscreenMode;
 
 - (CGFloat)height;
 - (void)toggleForwardBackwardMode:(BOOL)b_alt;
@@ -80,7 +68,6 @@
 - (IBAction)timeSliderAction:(id)sender;
 - (IBAction)fullscreen:(id)sender;
 
-
 - (void)updateTimeSlider;
 - (void)drawFancyGradientEffectForTimeSlider;
 - (void)updateControls;
     IBOutlet id o_volume_up_btn;
 
     IBOutlet id o_effects_btn;
-
-    NSImage * o_repeat_img;
-    NSImage * o_repeat_pressed_img;
-    NSImage * o_repeat_all_img;
-    NSImage * o_repeat_all_pressed_img;
-    NSImage * o_repeat_one_img;
-    NSImage * o_repeat_one_pressed_img;
-    NSImage * o_shuffle_img;
-    NSImage * o_shuffle_pressed_img;
-    NSImage * o_shuffle_on_img;
-    NSImage * o_shuffle_on_pressed_img;
-
-    NSButton * o_prev_btn;
-    NSButton * o_next_btn;
-
-    BOOL b_show_jump_buttons;
-    BOOL b_show_playmode_buttons;
 }
 
 - (IBAction)stop:(id)sender;
 - (IBAction)volumeAction:(id)sender;
 - (IBAction)effects:(id)sender;
 
-
 - (void)setRepeatOne;
 - (void)setRepeatAll;
 - (void)setRepeatOff;
index a9be8e5..9e4c857 100644 (file)
  *  and in main window.
  *****************************************************************************/
 
+@interface VLCControlsBarCommon ()
+{
+    NSImage * o_pause_img;
+    NSImage * o_pause_pressed_img;
+    NSImage * o_play_img;
+    NSImage * o_play_pressed_img;
+
+    NSTimeInterval last_fwd_event;
+    NSTimeInterval last_bwd_event;
+    BOOL just_triggered_next;
+    BOOL just_triggered_previous;
+}
+@end
+
 @implementation VLCControlsBarCommon
 
 @synthesize bottomBarView=o_bottombar_view;
 
 - (void)awakeFromNib
 {
-    b_dark_interface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    _nativeFullscreenMode = NO;
 
-    b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
     if (!OSX_SNOW_LEOPARD)
-        b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
+        _nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
 #endif
 
     [o_drop_view setDrawBorder: NO];
@@ -72,7 +86,7 @@
     [[o_fullscreen_btn cell] accessibilitySetOverrideValue:_NS("Click to enable fullscreen video playback.") forAttribute:NSAccessibilityDescriptionAttribute];
     [[o_fullscreen_btn cell] accessibilitySetOverrideValue:[o_fullscreen_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
 
-    if (!b_dark_interface) {
+    if (!_darkInterface) {
         [o_bottombar_view setImagesLeft: imageFromRes(@"bottom-background") middle: imageFromRes(@"bottom-background") right: imageFromRes(@"bottom-background")];
 
         [o_bwd_btn setImage: imageFromRes(@"backward-3btns")];
     [o_time_fld setRemainingIdentifier:@"DisplayTimeAsTimeRemaining"];
 
     // prepare time slider fance gradient view
-    if (!b_dark_interface) {
+    if (!_darkInterface) {
         NSRect frame;
         frame = [o_time_sld_fancygradient_view frame];
         frame.size.height = frame.size.height - 1;
 
 
     // remove fullscreen button for lion fullscreen
-    if (b_nativeFullscreenMode) {
+    if (_nativeFullscreenMode) {
         CGFloat f_width = [o_fullscreen_btn frame].size.width;
 
         NSRect frame = [o_time_fld frame];
 
 - (void)setFullscreenState:(BOOL)b_fullscreen
 {
-    if (!b_nativeFullscreenMode)
+    if (!self.nativeFullscreenMode)
         [o_fullscreen_btn setState:b_fullscreen];
 }
 
  *  Holds all specific outlets, actions and code for the main window controls bar.
  *****************************************************************************/
 
-@interface VLCMainWindowControlsBar (Internal)
+@interface VLCMainWindowControlsBar()
+{
+    NSImage * o_repeat_img;
+    NSImage * o_repeat_pressed_img;
+    NSImage * o_repeat_all_img;
+    NSImage * o_repeat_all_pressed_img;
+    NSImage * o_repeat_one_img;
+    NSImage * o_repeat_one_pressed_img;
+    NSImage * o_shuffle_img;
+    NSImage * o_shuffle_pressed_img;
+    NSImage * o_shuffle_on_img;
+    NSImage * o_shuffle_on_pressed_img;
+
+    NSButton * o_prev_btn;
+    NSButton * o_next_btn;
+
+    BOOL b_show_jump_buttons;
+    BOOL b_show_playmode_buttons;
+}
+
 - (void)addJumpButtons:(BOOL)b_fast;
 - (void)removeJumpButtons:(BOOL)b_fast;
 - (void)addPlaymodeButtons:(BOOL)b_fast;
 - (void)removePlaymodeButtons:(BOOL)b_fast;
+
 @end
 
 @implementation VLCMainWindowControlsBar
 {
     [super awakeFromNib];
 
-
     [o_stop_btn setToolTip: _NS("Stop")];
     [[o_stop_btn cell] accessibilitySetOverrideValue:_NS("Click to stop playback.") forAttribute:NSAccessibilityDescriptionAttribute];
     [[o_stop_btn cell] accessibilitySetOverrideValue:[o_stop_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
     [[o_effects_btn cell] accessibilitySetOverrideValue:_NS("Click to show an Audio Effects panel featuring an equalizer and further filters.") forAttribute:NSAccessibilityDescriptionAttribute];
     [[o_effects_btn cell] accessibilitySetOverrideValue:[o_effects_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
 
-    if (!b_dark_interface) {
+    if (!self.darkInterface) {
         [o_stop_btn setImage: imageFromRes(@"stop")];
         [o_stop_btn setAlternateImage: imageFromRes(@"stop-pressed")];
 
         [o_volume_up_btn setImage: imageFromRes(@"volume-high")];
         [o_volume_sld setUsesBrightArtwork: YES];
 
-        if (b_nativeFullscreenMode) {
+        if (self.nativeFullscreenMode) {
             [o_effects_btn setImage: imageFromRes(@"effects-one-button")];
             [o_effects_btn setAlternateImage: imageFromRes(@"effects-one-button-pressed")];
         } else {
         [o_volume_up_btn setImage: imageFromRes(@"volume-high_dark")];
         [o_volume_sld setUsesBrightArtwork: NO];
 
-        if (b_nativeFullscreenMode) {
+        if (self.nativeFullscreenMode) {
             [o_effects_btn setImage: imageFromRes(@"effects-one-button_dark")];
             [o_effects_btn setAlternateImage: imageFromRes(@"effects-one-button-pressed-dark")];
         } else {
     [o_volume_up_btn setEnabled: b_mute];
 
     // remove fullscreen button for lion fullscreen
-    if (b_nativeFullscreenMode) {
+    if (self.nativeFullscreenMode) {
         NSRect frame;
 
         // == [o_fullscreen_btn frame].size.width;
@@ -645,7 +678,7 @@ else \
     NSRect frame;
     CGFloat f_space = [o_effects_btn frame].size.width;
     // extra margin between button and volume up button
-    if (b_nativeFullscreenMode)
+    if (self.nativeFullscreenMode)
         f_space += 2;
 
 
@@ -664,8 +697,8 @@ else \
     else
         [[o_progress_view animator] setFrame: frame];
 
-    if (!b_nativeFullscreenMode) {
-        if (b_dark_interface) {
+    if (!self.nativeFullscreenMode) {
+        if (self.darkInterface) {
             [o_fullscreen_btn setImage: imageFromRes(@"fullscreen-double-buttons_dark")];
             [o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-double-buttons-pressed_dark")];
         } else {
@@ -695,7 +728,7 @@ else \
     NSRect frame;
     CGFloat f_space = [o_effects_btn frame].size.width;
     // extra margin between button and volume up button
-    if (b_nativeFullscreenMode)
+    if (self.nativeFullscreenMode)
         f_space += 2;
 
     moveItem(o_volume_up_btn);
@@ -713,8 +746,8 @@ else \
     else
         [[o_progress_view animator] setFrame: frame];
 
-    if (!b_nativeFullscreenMode) {
-        if (b_dark_interface) {
+    if (!self.nativeFullscreenMode) {
+        if (self.darkInterface) {
             [[o_fullscreen_btn animator] setImage: imageFromRes(@"fullscreen-one-button_dark")];
             [[o_fullscreen_btn animator] setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed_dark")];
         } else {
@@ -763,7 +796,7 @@ else \
     [[o_next_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_next_btn setEnabled: b_enabled];
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [o_prev_btn setImage: imageFromRes(@"previous-6btns-dark")];
         [o_prev_btn setAlternateImage: imageFromRes(@"previous-6btns-dark-pressed")];
         [o_next_btn setImage: imageFromRes(@"next-6btns-dark")];
@@ -811,7 +844,7 @@ else \
     else
         [[o_progress_view animator] setFrame: frame];
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [[o_fwd_btn animator] setImage:imageFromRes(@"forward-6btns-dark")];
         [[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-6btns-dark-pressed")];
         [[o_bwd_btn animator] setImage:imageFromRes(@"backward-6btns-dark")];
@@ -891,7 +924,7 @@ else \
     else
         [[o_progress_view animator] setFrame: frame];
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [[o_fwd_btn animator] setImage:imageFromRes(@"forward-3btns-dark")];
         [[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-3btns-dark-pressed")];
         [[o_bwd_btn animator] setImage:imageFromRes(@"backward-3btns-dark")];
@@ -923,7 +956,7 @@ else \
     NSRect frame;
     CGFloat f_space = [o_repeat_btn frame].size.width + [o_shuffle_btn frame].size.width - 6.;
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [[o_playlist_btn animator] setImage:imageFromRes(@"playlist_dark")];
         [[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-pressed_dark")];
     } else {
@@ -958,7 +991,7 @@ else \
     [o_repeat_btn setHidden: YES];
     [o_shuffle_btn setHidden: YES];
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [[o_playlist_btn animator] setImage:imageFromRes(@"playlist-1btn-dark")];
         [[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-1btn-dark-pressed")];
     } else {
index 9e8a8a9..2117c78 100644 (file)
     IBOutlet id _stream_sdp_matrix;
     IBOutlet id _stream_sdp_fld;
     IBOutlet id _stream_sdp_browsefile_btn;
-
-    NSString * _MRL;
-    NSString * _outputDestination;
-    NSArray * _profileNames;
-    NSArray * _profileValueList;
-    NSArray * _videoCodecs;
-    NSArray * _audioCodecs;
-    NSArray * _subsCodecs;
-    NSMutableArray * _currentProfile;
-
-    BOOL b_streaming;
 }
 @property (readwrite, nonatomic, retain) NSString * MRL;
 @property (readwrite, nonatomic, retain) NSString * outputDestination;
index e11cfeb..5d4abce 100644 (file)
 #define ASF 12
 /* 13-15 are present, but not set */
 
-@interface VLCConvertAndSave (Internal)
+@interface VLCConvertAndSave()
+{
+    NSString * _MRL;
+    NSString * _outputDestination;
+    NSArray * _profileNames;
+    NSArray * _profileValueList;
+    NSArray * _videoCodecs;
+    NSArray * _audioCodecs;
+    NSArray * _subsCodecs;
+    NSMutableArray * _currentProfile;
+
+    BOOL b_streaming;
+}
+
 - (void)updateDropView;
 - (void)updateOKButton;
 - (void)resetCustomizationSheetBasedOnProfile:(NSString *)profileString;
index d2abdb5..6f132d9 100644 (file)
  *****************************************************************************/
 
 #import <Cocoa/Cocoa.h>
-#import <vlc_common.h>
-#import <vlc_interface.h>
 
-@interface VLCCoreInteraction : NSObject {
-    int i_currentPlaybackRate;
-    mtime_t timeA, timeB;
+@interface VLCCoreInteraction : NSObject
 
-    float f_maxVolume;
-}
 + (VLCCoreInteraction *)sharedInstance;
 @property (readwrite) int volume;
 @property (readonly, nonatomic) float maxVolume;
@@ -85,4 +79,5 @@
 - (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter float: (float)f_value;
 - (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter string: (const char *)psz_value;
 - (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter boolean: (BOOL)b_value;
+
 @end
index ac38644..b98b355 100644 (file)
 #import <vlc_modules.h>
 #import <vlc_charset.h>
 
+@interface VLCCoreInteraction ()
+{
+    int i_currentPlaybackRate;
+    mtime_t timeA, timeB;
+
+    float f_maxVolume;
+}
+@end
 
 @implementation VLCCoreInteraction
 static VLCCoreInteraction *_o_sharedInstance = nil;
index fbd401e..150c83c 100644 (file)
@@ -37,9 +37,6 @@
  * ExtensionsDialogProvider interface
  *****************************************************************************/
 @interface ExtensionsDialogProvider : NSObject <NSWindowDelegate>
-{
-    intf_thread_t *p_intf;
-}
 
 + (ExtensionsDialogProvider *)sharedInstance:(intf_thread_t *)_p_intf;
 + (void)killInstance;
index dbe3899..e3263fa 100644 (file)
@@ -268,6 +268,12 @@ static int dialogCallback(vlc_object_t *p_this, const char *psz_variable,
     }
 }
 
+@interface ExtensionsDialogProvider ()
+{
+    intf_thread_t *p_intf;
+}
+@end
+
 @implementation ExtensionsDialogProvider
 
 static ExtensionsDialogProvider *_o_sharedInstance = nil;
index 890d16f..6b8a3d3 100644 (file)
 @end
 
 @interface ExtensionsManager : NSObject
-{
-    intf_thread_t *p_intf;
-    extensions_manager_t *p_extensions_manager;
-    ExtensionsDialogProvider *p_edp;
-
-    NSMutableDictionary *p_extDict;
-
-    BOOL b_unloading;  ///< Work around threads + emit issues, see isUnloading
-    BOOL b_failed; ///< Flag set to true if we could not load the module
-
-    id <ExtensionsDelegate> delegate;
-};
 
 + (ExtensionsManager *)getInstance:(intf_thread_t *)_p_intf;
 
index e1a6f5a..f652a9d 100644 (file)
 #define MENU_GET_ACTION(a) ((uint16_t)(((uint32_t)a) >> 16))
 #define MENU_GET_EXTENSION(a) ((uint16_t)(((uint32_t)a) & 0xFFFF))
 
+@interface ExtensionsManager()
+{
+    intf_thread_t *p_intf;
+    extensions_manager_t *p_extensions_manager;
+    ExtensionsDialogProvider *p_edp;
+
+    NSMutableDictionary *p_extDict;
+
+    BOOL b_unloading;  ///< Work around threads + emit issues, see isUnloading
+    BOOL b_failed; ///< Flag set to true if we could not load the module
+
+    id <ExtensionsDelegate> delegate;
+}
+@end
+
 @implementation ExtensionsManager
 
 static ExtensionsManager* instance = nil;
index ef0e4cf..436c087 100644 (file)
 @class VLCMain;
 
 @interface InputManager : NSObject
-{
-    intf_thread_t *p_intf;
-    VLCMain *o_main;
-
-    input_thread_t *p_current_input;
-    dispatch_queue_t informInputChangedQueue;
-
-    /* sleep management */
-    IOPMAssertionID systemSleepAssertionID;
-    IOPMAssertionID userActivityAssertionID;
-
-    /* iTunes/Spotify play/pause support */
-    BOOL b_has_itunes_paused;
-    BOOL b_has_spotify_paused;
-    NSTimer *o_itunes_play_timer;
-}
 
 - (id)initWithMain:(VLCMain *)o_mainObj;
 
@@ -55,8 +39,6 @@
 
 - (void)resumeItunesPlayback:(id)sender;
 
-
 - (BOOL)hasInput;
 
 @end
-
index aa86f37..42d3291 100644 (file)
@@ -131,6 +131,25 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 #pragma mark -
 #pragma mark InputManager implementation
 
+@interface InputManager()
+{
+    intf_thread_t *p_intf;
+    VLCMain *o_main;
+
+    input_thread_t *p_current_input;
+    dispatch_queue_t informInputChangedQueue;
+
+    /* sleep management */
+    IOPMAssertionID systemSleepAssertionID;
+    IOPMAssertionID userActivityAssertionID;
+
+    /* iTunes/Spotify play/pause support */
+    BOOL b_has_itunes_paused;
+    BOOL b_has_spotify_paused;
+    NSTimer *o_itunes_play_timer;
+}
+@end
+
 @implementation InputManager
 
 - (id)initWithMain:(VLCMain *)o_mainObj
index 306ecf3..9727d67 100644 (file)
  *****************************************************************************/
 
 #import <Foundation/Foundation.h>
-#import <IOKit/IOKitLib.h>
-
-enum {
-    kGetSensorReadingID = 0, // getSensorReading(int *, int *)
-    kGetLEDBrightnessID = 1, // getLEDBrightness(int, int *)
-    kSetLEDBrightnessID = 2, // setLEDBrightness(int, int, int *)
-    kSetLEDFadeID = 3        // setLEDFade(int, int, int, int *)
-};
 
 @interface KeyboardBacklight : NSObject
 
index 957fb6d..fc201be 100644 (file)
  *****************************************************************************/
 
 #import "KeyboardBacklight.h"
+#import <IOKit/IOKitLib.h>
+
+enum {
+    kGetSensorReadingID = 0, // getSensorReading(int *, int *)
+    kGetLEDBrightnessID = 1, // getLEDBrightness(int, int *)
+    kSetLEDBrightnessID = 2, // setLEDBrightness(int, int, int *)
+    kSetLEDFadeID = 3        // setLEDFade(int, int, int, int *)
+};
 
 @implementation KeyboardBacklight {
     io_connect_t dataPort;
index df7b844..e97066a 100644 (file)
 
 @interface VLCMainMenu : NSObject
 {
-    intf_thread_t *p_intf;
-    BOOL b_mainMenu_setup;
-    BOOL b_nib_videoeffects_loaded;
-    BOOL b_nib_audioeffects_loaded;
-    BOOL b_nib_tracksynchro_loaded;
-    BOOL b_nib_bookmarks_loaded;
-    BOOL b_nib_convertandsave_loaded;
-
-    AboutWindowController *o_about;
-    HelpWindowController  *o_helpWin;
-    id o_videoeffects;          /* VLCVideoEffects */
-    id o_audioeffects;          /* VLCAudioEffects */
-    id o_trackSynchronization;  /* VLCTrackSynchronization */
-    id o_bookmarks;             /* VLCBookmarks */
-    id o_convertandsave;        /* VLCConvertAndSave */
-    AddonsWindowController *o_addonsController;
-
-    id o_extMgr;                /* Extensions Manager */
-
     /* main menu */
 
     IBOutlet NSMenuItem * o_mi_about;
     IBOutlet NSMenuItem * o_vmi_mute;
     IBOutlet NSMenuItem * o_vmi_fullscreen;
     IBOutlet NSMenuItem * o_vmi_snapshot;
-
-    // information for playlist table columns menu
-    NSDictionary * o_ptc_translation_dict;
-    NSArray * o_ptc_menuorder;
 }
 + (VLCMainMenu *)sharedInstance;
 
index 34f6f8a..703f8b5 100644 (file)
 #import <Sparkle/Sparkle.h>
 #endif
 
+@interface VLCMainMenu()
+{
+    intf_thread_t *p_intf;
+    BOOL b_mainMenu_setup;
+    BOOL b_nib_videoeffects_loaded;
+    BOOL b_nib_audioeffects_loaded;
+    BOOL b_nib_tracksynchro_loaded;
+    BOOL b_nib_bookmarks_loaded;
+    BOOL b_nib_convertandsave_loaded;
+
+    AboutWindowController *o_about;
+    HelpWindowController  *o_helpWin;
+    id o_videoeffects;          /* VLCVideoEffects */
+    id o_audioeffects;          /* VLCAudioEffects */
+    id o_trackSynchronization;  /* VLCTrackSynchronization */
+    id o_bookmarks;             /* VLCBookmarks */
+    id o_convertandsave;        /* VLCConvertAndSave */
+    AddonsWindowController *o_addonsController;
+
+    id o_extMgr;                /* Extensions Manager */
+
+    // information for playlist table columns menu
+    NSDictionary * o_ptc_translation_dict;
+    NSArray * o_ptc_menuorder;
+}
+@end
+
 @implementation VLCMainMenu
 static VLCMainMenu *_o_sharedInstance = nil;
 
index 8c93418..7f3da81 100644 (file)
@@ -48,8 +48,8 @@ typedef enum {
     psPlaylistItemChangedEvent
 } VLCPlaylistStateEvent;
 
-@interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
-
+@interface VLCMainWindow : VLCVideoWindowCommon
+{
     IBOutlet id o_search_fld;
 
     IBOutlet id o_playlist_table;
@@ -66,8 +66,6 @@ typedef enum {
     IBOutlet id o_dropzone_box;
     IBOutlet id o_dropzone_img;
 
-    VLCFSPanel *o_fspanel;
-
     IBOutlet id o_podcast_view;
     IBOutlet id o_podcast_add_btn;
     IBOutlet id o_podcast_remove_btn;
@@ -83,26 +81,6 @@ typedef enum {
     IBOutlet id o_podcast_unsubscribe_pop;
     IBOutlet id o_podcast_unsubscribe_ok_btn;
     IBOutlet id o_podcast_unsubscribe_cancel_btn;
-
-    BOOL b_nativeFullscreenMode;
-    BOOL b_video_playback_enabled;
-    BOOL b_dropzone_active;
-    BOOL b_splitview_removed;
-    BOOL b_minimized_view;
-
-    CGFloat f_lastSplitViewHeight;
-    CGFloat f_lastLeftSplitViewWidth;
-
-    NSMutableArray *o_sidebaritems;
-
-    /* this is only true, when we have NO video playing inside the main window */
-    BOOL b_nonembedded;
-
-    BOOL b_podcastView_displayed;
-
-    VLCColorView * o_color_backdrop;
-
-    NSRect frameBeforePlayback;
 }
 + (VLCMainWindow *)sharedInstance;
 @property (readonly) BOOL nativeFullscreenMode;
@@ -143,8 +121,5 @@ typedef enum {
 @end
 
 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
-{
-    VLCColorView * o_color_backdrop;
-}
 
 @end
index 40d0381..fd5f868 100644 (file)
 #import "VLCVoutWindowController.h"
 
 
-@interface VLCMainWindow (Internal)
+@interface VLCMainWindow() <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate>
+{
+    VLCFSPanel *o_fspanel;
+
+    BOOL b_nativeFullscreenMode;
+    BOOL b_video_playback_enabled;
+    BOOL b_dropzone_active;
+    BOOL b_splitview_removed;
+    BOOL b_minimized_view;
+
+    CGFloat f_lastSplitViewHeight;
+    CGFloat f_lastLeftSplitViewWidth;
+
+    NSMutableArray *o_sidebaritems;
+
+    /* this is only true, when we have NO video playing inside the main window */
+    BOOL b_nonembedded;
+
+    BOOL b_podcastView_displayed;
+
+    VLCColorView * o_color_backdrop;
+
+    NSRect frameBeforePlayback;
+}
 - (void)resizePlaylistAfterCollapse;
 - (void)makeSplitViewVisible;
 - (void)makeSplitViewHidden;
@@ -182,7 +205,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
     /* interface builder action */
     CGFloat f_threshold_height = f_min_video_height + [o_controls_bar height];
-    if (b_dark_interface)
+    if (self.darkInterface)
         f_threshold_height += [o_titlebar_view frame].size.height;
     if ([[self contentView] frame].size.height < f_threshold_height)
         b_splitviewShouldBeHidden = YES;
@@ -191,7 +214,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [self setExcludedFromWindowsMenu: YES];
     [self setAcceptsMouseMovedEvents: YES];
     // Set that here as IB seems to be buggy
-    if (b_dark_interface)
+    if (self.darkInterface)
         [self setContentMinSize:NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
     else
         [self setContentMinSize:NSMakeSize(604., f_min_window_height)];
@@ -238,7 +261,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     // select playlist item by default
     [o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidResizeNotification object: nil];
         [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidMoveNotification object: nil];
 
@@ -257,7 +280,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
         if (winrect.size.height > 100) {
             [self setFrame: winrect display:YES animate:YES];
-            previousSavedFrame = winrect;
+            self.previousSavedFrame = winrect;
         }
 
         winrect = [o_split_view frame];
@@ -288,7 +311,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     NSRect frame = [self frame];
     NSSize screenSize = [[self screen] frame].size;
     if (screenSize.width <= frame.size.width || screenSize.height <= frame.size.height) {
-        nativeVideoSize = screenSize;
+        self.nativeVideoSize = screenSize;
         [self resizeWindow];
     }
 
@@ -449,7 +472,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)makeSplitViewVisible
 {
-    if (b_dark_interface)
+    if (self.darkInterface)
         [self setContentMinSize: NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
     else
         [self setContentMinSize: NSMakeSize(604., f_min_window_height)];
@@ -476,7 +499,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)makeSplitViewHidden
 {
-    if (b_dark_interface)
+    if (self.darkInterface)
         [self setContentMinSize: NSMakeSize(604., f_min_video_height + [o_titlebar_view frame].size.height)];
     else
         [self setContentMinSize: NSMakeSize(604., f_min_video_height)];
@@ -520,7 +543,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         return;
     }
 
-    if (!(b_nativeFullscreenMode && b_fullscreen) && !b_splitview_removed && ((b_have_alt_key && b_activeVideo)
+    if (!(b_nativeFullscreenMode && self.fullscreen) && !b_splitview_removed && ((b_have_alt_key && b_activeVideo)
                                                                               || (b_nonembedded && event == psUserEvent)
                                                                               || (!b_activeVideo && event == psUserEvent)
                                                                               || (b_minimized_view && event == psVideoStartedOrStoppedEvent))) {
@@ -631,7 +654,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [self setFrame: winrect display: YES animate: YES];
     }
 
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         [self setContentMinSize: NSMakeSize(604., [o_controls_bar height] + [o_titlebar_view frame].size.height)];
         [self setContentMaxSize: NSMakeSize(FLT_MAX, [o_controls_bar height] + [o_titlebar_view frame].size.height)];
     } else {
@@ -645,7 +668,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (void)showSplitView:(BOOL)b_with_resize
 {
     [self updateWindow];
-    if (b_dark_interface)
+    if (self.darkInterface)
         [self setContentMinSize:NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
     else
         [self setContentMinSize:NSMakeSize(604., f_min_window_height)];
@@ -795,7 +818,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)videoplayWillBeStarted
 {
-    if (!b_fullscreen)
+    if (!self.fullscreen)
         frameBeforePlayback = [self frame];
 }
 
@@ -804,7 +827,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     BOOL b_videoPlayback = [[VLCMain sharedInstance] activeVideoPlayback];
         
     if (!b_videoPlayback) {
-        if (!b_nonembedded && (!b_nativeFullscreenMode || (b_nativeFullscreenMode && !b_fullscreen)) && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) {
+        if (!b_nonembedded && (!b_nativeFullscreenMode || (b_nativeFullscreenMode && !self.fullscreen)) && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) {
 
             // only resize back to minimum view of this is still desired final state
             CGFloat f_threshold_height = f_min_video_height + [o_controls_bar height];
@@ -850,7 +873,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [super windowWillEnterFullScreen:notification];
 
     // update split view frame after removing title bar
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         NSRect frame = [[self contentView] frame];
         frame.origin.y += [o_controls_bar height];
         frame.size.height -= [o_controls_bar height];
@@ -863,7 +886,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [super windowWillExitFullScreen: notification];
 
     // update split view frame after readding title bar
-    if (b_dark_interface) {
+    if (self.darkInterface) {
         NSRect frame = [o_split_view frame];
         frame.size.height -= [o_titlebar_view frame].size.height;
         [o_split_view setFrame:frame];
@@ -1343,6 +1366,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 @end
 
+@interface VLCDetachedVideoWindow ()
+{
+    VLCColorView * o_color_backdrop;
+}
+@end
+
 @implementation VLCDetachedVideoWindow
 
 - (void)awakeFromNib
@@ -1351,7 +1380,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [super awakeFromNib];
     [self setAcceptsMouseMovedEvents: YES];
 
-    if (b_dark_interface) {
+    BOOL darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+
+    if (darkInterface) {
         [self setBackgroundColor: [NSColor clearColor]];
 
         [self setOpaque: NO];
@@ -1371,14 +1402,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
     }
 
     NSRect videoViewRect = [[self contentView] bounds];
-    if (b_dark_interface)
+    if (darkInterface)
         videoViewRect.size.height -= [o_titlebar_view frame].size.height;
     CGFloat f_bottomBarHeight = [[self controlsBar] height];
     videoViewRect.size.height -= f_bottomBarHeight;
     videoViewRect.origin.y = f_bottomBarHeight;
     [o_video_view setFrame: videoViewRect];
 
-    if (b_dark_interface) {
+    if (darkInterface) {
         o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_video_view frame]];
         [[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_video_view];
         [o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
index 201572f..f546b3f 100644 (file)
 
 @interface VLCMainWindowTitleView : VLCThreePartImageView
 {
-    NSImage * o_red_img;
-    NSImage * o_red_over_img;
-    NSImage * o_red_on_img;
-    NSImage * o_yellow_img;
-    NSImage * o_yellow_over_img;
-    NSImage * o_yellow_on_img;
-    NSImage * o_green_img;
-    NSImage * o_green_over_img;
-    NSImage * o_green_on_img;
-    // yosemite fullscreen images
-    NSImage * o_fullscreen_img;
-    NSImage * o_fullscreen_over_img;
-    NSImage * o_fullscreen_on_img;
-    // old native fullscreen images
-    NSImage * o_old_fullscreen_img;
-    NSImage * o_old_fullscreen_over_img;
-    NSImage * o_old_fullscreen_on_img;
-
-    NSShadow * o_window_title_shadow;
-    NSDictionary * o_window_title_attributes_dict;
-
     IBOutlet id o_red_btn;
     IBOutlet id o_yellow_btn;
     IBOutlet id o_green_btn;
     IBOutlet id o_fullscreen_btn;
     IBOutlet id o_title_lbl;
-
-    BOOL b_nativeFullscreenMode;
-
-    // state to determine correct image for green bubble
-    BOOL b_alt_pressed;
-    BOOL b_mouse_over;
 }
 @property (readonly) NSButton * closeButton;
 @property (readonly) NSButton * minimizeButton;
 
 @end
 
-@interface VLCCustomWindowButtonPrototype: NSButton
+@interface VLCCustomWindowButtonPrototype : NSButton
+
 - (NSArray*)extendedAccessibilityAttributeNames: (NSArray*)theAttributeNames;
 - (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName;
 - (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName;
 
 @end
 
-@interface VLCCustomWindowCloseButton: VLCCustomWindowButtonPrototype
+@interface VLCCustomWindowCloseButton : VLCCustomWindowButtonPrototype
 
 @end
 
 
-@interface VLCCustomWindowMinimizeButton: VLCCustomWindowButtonPrototype
+@interface VLCCustomWindowMinimizeButton : VLCCustomWindowButtonPrototype
 
 @end
 
 
-@interface VLCCustomWindowZoomButton: VLCCustomWindowButtonPrototype
+@interface VLCCustomWindowZoomButton : VLCCustomWindowButtonPrototype
 
 @end
 
 @end
 
 @interface VLCWindowTitleTextField : NSTextField
-{
-    NSMenu * contextMenu;
-}
 
 @end
index c7deaab..063726d 100644 (file)
  * states, since we can't capture the mouse-moved events here correctly
  *****************************************************************************/
 
+@interface VLCMainWindowTitleView()
+{
+    NSImage * o_red_img;
+    NSImage * o_red_over_img;
+    NSImage * o_red_on_img;
+    NSImage * o_yellow_img;
+    NSImage * o_yellow_over_img;
+    NSImage * o_yellow_on_img;
+    NSImage * o_green_img;
+    NSImage * o_green_over_img;
+    NSImage * o_green_on_img;
+    // yosemite fullscreen images
+    NSImage * o_fullscreen_img;
+    NSImage * o_fullscreen_over_img;
+    NSImage * o_fullscreen_on_img;
+    // old native fullscreen images
+    NSImage * o_old_fullscreen_img;
+    NSImage * o_old_fullscreen_over_img;
+    NSImage * o_old_fullscreen_on_img;
+
+    NSShadow * o_window_title_shadow;
+    NSDictionary * o_window_title_attributes_dict;
+
+    BOOL b_nativeFullscreenMode;
+
+    // state to determine correct image for green bubble
+    BOOL b_alt_pressed;
+    BOOL b_mouse_over;
+}
+@end
+
 @implementation VLCMainWindowTitleView
 - (id)init
 {
 @end
 
 
+@interface VLCWindowTitleTextField()
+{
+    NSMenu *_contextMenu;
+}
+@end
+
 @implementation VLCWindowTitleTextField
 
 - (void)showRightClickMenuWithEvent:(NSEvent *)o_event
     if (!pathComponents)
         return;
 
-    contextMenu = [[NSMenu alloc] initWithTitle: [[NSFileManager defaultManager] displayNameAtPath: [representedURL path]]];
+    _contextMenu = [[NSMenu alloc] initWithTitle: [[NSFileManager defaultManager] displayNameAtPath: [representedURL path]]];
 
     NSUInteger count = [pathComponents count];
     NSImage * icon;
         for (NSUInteger y = 0; y < i; y++)
             [currentPath appendFormat: @"/%@", [pathComponents objectAtIndex:y + 1]];
 
-        [contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath: currentPath] action:@selector(revealInFinder:) keyEquivalent:@""];
-        currentItem = [contextMenu itemAtIndex:[contextMenu numberOfItems] - 1];
+        [_contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath: currentPath] action:@selector(revealInFinder:) keyEquivalent:@""];
+        currentItem = [_contextMenu itemAtIndex:[_contextMenu numberOfItems] - 1];
         [currentItem setTarget: self];
 
         icon = [[NSWorkspace sharedWorkspace] iconForFile:currentPath];
 
     if ([[pathComponents objectAtIndex:1] isEqualToString:@"Volumes"]) {
         /* we don't want to show the Volumes item, since the Cocoa does it neither */
-        currentItem = [contextMenu itemWithTitle:[[NSFileManager defaultManager] displayNameAtPath: @"/Volumes"]];
+        currentItem = [_contextMenu itemWithTitle:[[NSFileManager defaultManager] displayNameAtPath: @"/Volumes"]];
         if (currentItem)
-            [contextMenu removeItem: currentItem];
+            [_contextMenu removeItem: currentItem];
     } else {
         /* we're on the boot drive, so add it since it isn't part of the components */
-        [contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath:@"/"] action:@selector(revealInFinder:) keyEquivalent:@""];
-        currentItem = [contextMenu itemAtIndex: [contextMenu numberOfItems] - 1];
+        [_contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath:@"/"] action:@selector(revealInFinder:) keyEquivalent:@""];
+        currentItem = [_contextMenu itemAtIndex: [_contextMenu numberOfItems] - 1];
         icon = [[NSWorkspace sharedWorkspace] iconForFile:@"/"];
         [icon setSize: iconSize];
         [currentItem setImage: icon];
     }
 
     /* add the computer item */
-    [contextMenu addItemWithTitle:(NSString*)CFBridgingRelease(SCDynamicStoreCopyComputerName(NULL, NULL)) action:@selector(revealInFinder:) keyEquivalent:@""];
-    currentItem = [contextMenu itemAtIndex: [contextMenu numberOfItems] - 1];
+    [_contextMenu addItemWithTitle:(NSString*)CFBridgingRelease(SCDynamicStoreCopyComputerName(NULL, NULL)) action:@selector(revealInFinder:) keyEquivalent:@""];
+    currentItem = [_contextMenu itemAtIndex: [_contextMenu numberOfItems] - 1];
     icon = [NSImage imageNamed: NSImageNameComputer];
     [icon setSize: iconSize];
     [currentItem setImage: icon];
     [currentItem setTarget: self];
 
     // center the context menu similar to the white interface
-    CGFloat menuWidth = [contextMenu size].width;
+    CGFloat menuWidth = [_contextMenu size].width;
     NSRect windowFrame = [[self window] frame];
     NSPoint point;
 
                                               eventNumber:0
                                                clickCount:0
                                                  pressure:0];
-    [NSMenu popUpContextMenu: contextMenu withEvent: fakeMouseEvent forView: [self superview]];
+    [NSMenu popUpContextMenu: _contextMenu withEvent: fakeMouseEvent forView: [self superview]];
 }
 
 - (IBAction)revealInFinder:(id)sender
 {
-    NSUInteger count = [contextMenu numberOfItems];
-    NSUInteger selectedItem = [contextMenu indexOfItem: sender];
+    NSUInteger count = [_contextMenu numberOfItems];
+    NSUInteger selectedItem = [_contextMenu indexOfItem: sender];
 
     if (selectedItem == count - 1) { // the fake computer item
         [[NSWorkspace sharedWorkspace] selectFile: @"/" inFileViewerRootedAtPath: @""];
index 5574146..7f05459 100644 (file)
 #include <vlc_common.h>
 
 @interface PLItem : NSObject
-{
-    input_item_t *p_input;
-
-    int _playlistId;
-    NSMutableArray *_children;
-
-    PLItem *_parent;
-}
 
 @property(readonly, copy) NSMutableArray *children;
 @property(readonly) int plItemId;
@@ -47,4 +39,3 @@
 - (void)deleteChild:(PLItem *)child;
 
 @end
-
index 1aa742a..76b8034 100644 (file)
 #include <vlc_input_item.h>
 
 #pragma mark -
-;
+
+@interface PLItem()
+{
+    input_item_t *p_input;
+
+    int _playlistId;
+    NSMutableArray *_children;
+
+    PLItem *_parent;
+}
+@end
+
 @implementation PLItem
 
 @synthesize children=_children;
index d4b1a7e..22bb7a5 100644 (file)
 
 @class VLCPlaylist;
 
-@interface PLModel : NSObject<NSOutlineViewDataSource>
-{
-    PLItem *_rootItem;
-
-    playlist_t *p_playlist;
-    NSOutlineView *_outlineView;
-
-    // TODO: write these objects to the pastboard properly?
-    NSMutableArray *_draggedItems;
+typedef enum {
+    ROOT_TYPE_PLAYLIST,
+    ROOT_TYPE_MEDIALIBRARY,
+    ROOT_TYPE_OTHER
+} PLRootType;
 
-    // TODO: for transition
-    VLCPlaylist *_playlist;
-}
+@interface PLModel : NSObject<NSOutlineViewDataSource>
 
 @property(readonly) PLItem *rootItem;
 @property(readonly, copy) NSArray *draggedItems;
 
-
 - (id)initWithOutlineView:(NSOutlineView *)outlineView playlist:(playlist_t *)pl rootItem:(playlist_item_t *)root playlistObject:(id)plObj;
 
 - (void)changeRootItem:(playlist_item_t *)p_root;
 
 - (BOOL)hasChildren;
 
-typedef enum {
-    ROOT_TYPE_PLAYLIST,
-    ROOT_TYPE_MEDIALIBRARY,
-    ROOT_TYPE_OTHER
-} PLRootType;
-
 - (PLRootType)currentRootType;
 
 - (BOOL)editAllowed;
@@ -89,6 +76,4 @@ typedef enum {
 
 - (void)searchUpdate:(NSString *)o_search;
 
-
 @end
-
index 93f7fbd..d7679ef 100644 (file)
 
 #pragma mark -
 
+@interface PLModel ()
+{
+    PLItem *_rootItem;
+
+    playlist_t *p_playlist;
+    NSOutlineView *_outlineView;
+
+    // TODO: write these objects to the pastboard properly?
+    NSMutableArray *_draggedItems;
+
+    // TODO: for transition
+    VLCPlaylist *_playlist;
+}
+@end
+
 @implementation PLModel
 
 @synthesize rootItem=_rootItem;
index e659db1..d6d937d 100644 (file)
@@ -42,10 +42,6 @@ typedef void(^CompletionBlock)(enum ResumeResult);
     IBOutlet id o_restart_btn;
     IBOutlet id o_resume_btn;
     IBOutlet id o_always_resume_btn;
-
-    int currentResumeTimeout;
-
-    CompletionBlock completionBlock;
 }
 
 - (IBAction)buttonClicked:(id)sender;
index e996417..a89a89b 100644 (file)
 #import "intf.h"
 #import "StringUtility.h"
 
+@interface ResumeDialogController()
+{
+    int currentResumeTimeout;
+    CompletionBlock completionBlock;
+}
+@end
+
 @implementation ResumeDialogController
 
 - (id)init
index 33dd698..e4f50bd 100644 (file)
     IBOutlet id _text_fld;
     IBOutlet id _cancel_btn;
     IBOutlet id _ok_btn;
-
-    __unsafe_unretained NSString * _title;
-    __unsafe_unretained NSString * _subtitle;
-    __unsafe_unretained NSString * _okTitle;
-    __unsafe_unretained NSString * _cancelTitle;
-    __unsafe_unretained id _target;
 }
 + (VLCEnterTextPanel *)sharedInstance;
 
     IBOutlet id _pop;
     IBOutlet id _cancel_btn;
     IBOutlet id _ok_btn;
-
-    __unsafe_unretained NSString * _title;
-    __unsafe_unretained NSString * _subtitle;
-    __unsafe_unretained NSString * _okTitle;
-    __unsafe_unretained NSString * _cancelTitle;
-    __unsafe_unretained NSArray * _popData;
-
-    __unsafe_unretained id _target;
 }
 + (VLCSelectItemInPopupPanel *)sharedInstance;
 
index 027b7ca..3093999 100644 (file)
 static VLCEnterTextPanel *_textPanelInstance = nil;
 static VLCSelectItemInPopupPanel *_selectItemPanelInstance = nil;
 
+@interface VLCEnterTextPanel()
+{
+    __unsafe_unretained NSString * _title;
+    __unsafe_unretained NSString * _subtitle;
+    __unsafe_unretained NSString * _okTitle;
+    __unsafe_unretained NSString * _cancelTitle;
+    __unsafe_unretained id _target;
+}
+@end
+
 @implementation VLCEnterTextPanel
 + (VLCEnterTextPanel *)sharedInstance
 {
@@ -75,6 +85,18 @@ static VLCSelectItemInPopupPanel *_selectItemPanelInstance = nil;
 
 @end
 
+@interface VLCSelectItemInPopupPanel()
+{
+    __unsafe_unretained NSString * _title;
+    __unsafe_unretained NSString * _subtitle;
+    __unsafe_unretained NSString * _okTitle;
+    __unsafe_unretained NSString * _cancelTitle;
+    __unsafe_unretained NSArray * _popData;
+
+    __unsafe_unretained id _target;
+}
+@end
+
 @implementation VLCSelectItemInPopupPanel
 @synthesize title=_title, subTitle=_subtitle, OKButtonLabel=_okTitle, CancelButtonLabel=_cancelTitle, popupButtonContent=_popData, target=_target;
 
index 9599a52..8cd4c6b 100644 (file)
@@ -28,7 +28,6 @@
 @interface VLCTrackSynchronization : NSObject {
     /* generic */
     IBOutlet id o_window;
-    intf_thread_t *p_intf;
     IBOutlet id o_reset_btn;
 
     /* Audio / Video */
index aa4e1be..15e8153 100644 (file)
 #define SUBSDELAY_MODE_RELATIVE_SOURCE_DELAY   1
 #define SUBSDELAY_MODE_RELATIVE_SOURCE_CONTENT 2
 
+@interface VLCTrackSynchronization()
+{
+    intf_thread_t *p_intf;
+}
+@end
+
 @implementation VLCTrackSynchronization
 static VLCTrackSynchronization *_o_sharedInstance = nil;
 
index 548965d..714e100 100644 (file)
 @class VLCDialogGridView;
 
 @interface VLCDialogButton : NSButton
-{
-    extension_widget_t *widget;
-}
-
 @property (readwrite) extension_widget_t *widget;
 @end
 
-
 @interface VLCDialogPopUpButton : NSPopUpButton
-{
-    extension_widget_t *widget;
-}
-
 @property (readwrite) extension_widget_t *widget;
 @end
 
-
 @interface VLCDialogTextField : NSTextField
-{
-    extension_widget_t *widget;
-}
-
 @property (readwrite) extension_widget_t *widget;
 @end
 
-
 @interface VLCDialogWindow : NSWindow
-{
-    extension_dialog_t *dialog;
-    BOOL has_lock;
-}
-
 @property (readwrite) extension_dialog_t *dialog;
 @property (readwrite) BOOL has_lock;
 @end
 
 
 @interface VLCDialogList : NSTableView <NSTableViewDataSource>
-{
-    extension_widget_t *widget;
-    NSMutableArray *contentArray;
-}
-
 @property (readwrite) extension_widget_t *widget;
 @property (readwrite, retain) NSMutableArray *contentArray;
 @end
 
-
 @interface VLCDialogGridView : NSView
-{
-    NSUInteger _rowCount, _colCount;
-    NSMutableArray *_griddedViews;
-}
 
 - (void)addSubview:(NSView *)view atRow:(NSUInteger)row column:(NSUInteger)column rowSpan:(NSUInteger)rowSpan colSpan:(NSUInteger)colSpan;
 - (NSSize)flexSize:(NSSize)size;
index 3cceef3..9157d9b 100644 (file)
 #import <stdlib.h>
 
 @implementation VLCDialogButton
-@synthesize widget;
+
 @end
 
 
 @implementation VLCDialogPopUpButton
-@synthesize widget;
+
 @end
 
 
 @implementation VLCDialogTextField
-@synthesize widget;
+
 @end
 
 
 @implementation VLCDialogWindow
-@synthesize dialog;
-@synthesize has_lock;
+
 @end
 
 
 @implementation VLCDialogList
-@synthesize widget;
-@synthesize contentArray;
 
 - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
 {
-    return [contentArray count];
+    return [self.contentArray count];
 }
 
 - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
 {
-    return [[contentArray objectAtIndex:rowIndex] objectForKey:@"text"];
+    return [[self.contentArray objectAtIndex:rowIndex] objectForKey:@"text"];
 }
 @end
 
+@interface VLCDialogGridView()
+{
+    NSUInteger _rowCount, _colCount;
+    NSMutableArray *_griddedViews;
+}
+@end
 
 @implementation VLCDialogGridView
 
index 9c2164f..7ce4c0e 100644 (file)
 @class VLCVoutView;
 
 @interface VLCVoutWindowController : NSObject
-{
-    NSMutableDictionary *o_vout_dict;
-    KeyboardBacklight *o_keyboard_backlight;
-
-    NSPoint top_left_point;
-
-    // save the status level if at least one video window is on status level
-    NSUInteger i_statusLevelWindowCounter;
-    NSInteger i_currentWindowLevel;
-    NSInteger i_currentFloatingWindowLevel;
-
-    BOOL b_mainwindow_has_video;
-}
 
 @property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
 
-
 - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition;
 - (void)removeVoutforDisplay:(NSValue *)o_key;
 - (void)setNativeVideoSize:(NSSize)size forWindow:(vout_window_t *)p_wnd;
index 531ec64..0a21a66 100644 (file)
 #import "ResumeDialogController.h"
 #import "playlist.h"
 
+@interface VLCVoutWindowController ()
+{
+    NSMutableDictionary *o_vout_dict;
+    KeyboardBacklight *o_keyboard_backlight;
+
+    NSPoint top_left_point;
+
+    // save the status level if at least one video window is on status level
+    NSUInteger i_statusLevelWindowCounter;
+    NSInteger i_currentWindowLevel;
+    NSInteger i_currentFloatingWindowLevel;
+
+    BOOL b_mainwindow_has_video;
+}
+@end
+
 @implementation VLCVoutWindowController
 
 - (id)init
index 1d2865e..d692aaa 100644 (file)
@@ -26,7 +26,6 @@
 
 @interface VLCVideoEffects : NSObject {
     /* generic */
-    intf_thread_t *p_intf;
     IBOutlet id o_window;
     IBOutlet id o_tableView;
     IBOutlet id o_profile_pop;
     IBOutlet id o_addlogo_transparency_lbl;
     IBOutlet id o_addlogo_transparency_sld;
     IBOutlet id o_anaglyph_ckb;
-
-    NSInteger i_old_profile_index;
 }
 
+/* text field / stepper binding values */
+/* use setter to modify gui elements */
+@property (nonatomic) int cropLeftValue;
+@property (nonatomic) int cropTopValue;
+@property (nonatomic) int cropRightValue;
+@property (nonatomic) int cropBottomValue;
+
+@property (nonatomic) int puzzleRowsValue;
+@property (nonatomic) int puzzleColumnsValue;
+
+@property (nonatomic) int wallRowsValue;
+@property (nonatomic) int wallColumnsValue;
+
+@property (nonatomic) int cloneValue;
+
+@property (nonatomic) int sepiaValue;
+
+@property (nonatomic) int posterizeValue;
+
 /* generic */
 + (VLCVideoEffects *)sharedInstance;
 - (void)updateCocoaWindowLevel:(NSInteger)i_level;
 
-- (void)resetValues;
-
 - (void)saveCurrentProfile;
 
 - (IBAction)toggleWindow:(id)sender;
 - (IBAction)addProfile:(id)sender;
 - (IBAction)removeProfile:(id)sender;
 
-
 /* basic */
 - (IBAction)enableAdjust:(id)sender;
 - (IBAction)adjustSliderChanged:(id)sender;
 - (IBAction)addLogoModifierChanged:(id)sender;
 - (IBAction)enableAnaglyph:(id)sender;
 
-/* text field / stepper binding values */
-/* use setter to modify gui elements */
-@property (nonatomic) int cropLeftValue;
-@property (nonatomic) int cropTopValue;
-@property (nonatomic) int cropRightValue;
-@property (nonatomic) int cropBottomValue;
-
-@property (nonatomic) int puzzleRowsValue;
-@property (nonatomic) int puzzleColumnsValue;
-
-@property (nonatomic) int wallRowsValue;
-@property (nonatomic) int wallColumnsValue;
-
-@property (nonatomic) int cloneValue;
-
-@property (nonatomic) int sepiaValue;
-
-@property (nonatomic) int posterizeValue;
-
 @end
index cfd6060..a01e98c 100644 (file)
 #import "SharedDialogs.h"
 #import "CoreInteraction.h"
 
-@interface VLCVideoEffects (Internal)
+@interface VLCVideoEffects()
+{
+    intf_thread_t *p_intf;
+    NSInteger i_old_profile_index;
+}
 - (void)resetProfileSelector;
 @end
 
index 3ba9e05..cc38ec1 100644 (file)
 
 #import <vlc_vout.h>
 
-
 /*****************************************************************************
  * VLCVoutView interface
  *****************************************************************************/
 @interface VLCVoutView : NSView
-{
-    NSInteger i_lastScrollWheelDirection;
-    NSTimeInterval t_lastScrollEvent;
-
-    CGFloat f_cumulated_magnification;
 
-    vout_thread_t *p_vout;
-}
+@property (readwrite, assign) vout_thread_t * voutThread;
 
-- (void)setVoutThread:(vout_thread_t *)p_vout_thread;
-- (vout_thread_t *)voutThread;
 - (void)releaseVoutThread;
 
 @end
index 7afff03..94b99c8 100644 (file)
 /*****************************************************************************
  * VLCVoutView implementation
  *****************************************************************************/
+@interface VLCVoutView()
+{
+    NSInteger i_lastScrollWheelDirection;
+    NSTimeInterval t_lastScrollEvent;
+
+    CGFloat f_cumulated_magnification;
+
+    vout_thread_t *p_vout;
+}
+@end
+
 @implementation VLCVoutView
 
 #pragma mark -
index 40acbfe..e53663c 100644 (file)
 @class VLCVoutView;
 
 @interface VLCWindow : NSWindow <NSAnimationDelegate>
-{
-    BOOL b_canBecomeKeyWindow;
-    BOOL b_isset_canBecomeKeyWindow;
-    BOOL b_canBecomeMainWindow;
-    BOOL b_isset_canBecomeMainWindow;
-    NSViewAnimation *o_current_animation;
-
-    BOOL              b_has_active_video;
-
-    /* 
-     * YES when all animations are over
-     * for fullscreen window: always YES
-     */
-    BOOL              b_fullscreen;
-}
+
 @property (readwrite) BOOL canBecomeKeyWindow;
 @property (readwrite) BOOL canBecomeMainWindow;
 
@@ -84,48 +70,23 @@ static const float f_min_video_height = 70.0;
 
 @interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
 {
-    NSRect previousSavedFrame;
-    BOOL b_dark_interface;
-
     IBOutlet VLCMainWindowTitleView *o_titlebar_view; // only set in main or detached window
     IBOutlet __unsafe_unretained VLCVoutView *o_video_view;
-
     IBOutlet VLCControlsBarCommon *o_controls_bar;
-
-    NSSize nativeVideoSize;
-
-    // variables for fullscreen handling
-    VLCVideoWindowCommon *o_current_video_window;
-    VLCWindow       * o_fullscreen_window;
-    NSViewAnimation * o_fullscreen_anim1;
-    NSViewAnimation * o_fullscreen_anim2;
-    NSView          * o_temp_view;
-
-    NSInteger i_originalLevel;
-
-    BOOL              b_video_view_was_hidden;
-
-    NSTimer *t_hide_mouse_timer;
-
-    // true when the window is in transition for entering or exiting fullscreen
-    BOOL b_in_fullscreen_transition;
-
-    NSRect frameBeforeLionFullscreen;
-
-    BOOL b_windowShouldExitFullscreenWhenFinished;
 }
 
 @property (nonatomic, assign) VLCVoutView* videoView;
 @property (readonly) VLCControlsBarCommon* controlsBar;
 @property (readonly) BOOL inFullscreenTransition;
+@property (readonly) BOOL darkInterface;
 @property (readonly) BOOL windowShouldExitFullscreenWhenFinished;
+@property (readwrite, assign) NSRect previousSavedFrame;
+@property (readwrite, assign) NSSize nativeVideoSize;
 
 - (void)setWindowLevel:(NSInteger)i_state;
-
 - (void)resizeWindow;
-- (void)setNativeVideoSize:(NSSize)size;
-- (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size;
 
+- (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size;
 
 - (void)setTitle:(NSString *)title;
 
index 1e82906..4fb0360 100644 (file)
  *  Missing extension to NSWindow
  *****************************************************************************/
 
-@implementation VLCWindow
+@interface VLCWindow()
+{
+    BOOL b_canBecomeKeyWindow;
+    BOOL b_isset_canBecomeKeyWindow;
+    BOOL b_canBecomeMainWindow;
+    BOOL b_isset_canBecomeMainWindow;
+    NSViewAnimation *o_current_animation;
 
-@synthesize hasActiveVideo=b_has_active_video;
-@synthesize fullscreen=b_fullscreen;
+    /*
+     * YES when all animations are over
+     * for fullscreen window: always YES
+     */
+}
+@end
+
+@implementation VLCWindow
 
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask
                   backing:(NSBackingStoreType)backingType defer:(BOOL)flag
  *  Common code for main window, detached window and extra video window
  *****************************************************************************/
 
-@interface VLCVideoWindowCommon (Internal)
+@interface VLCVideoWindowCommon()
+{
+    // variables for fullscreen handling
+    VLCVideoWindowCommon *o_current_video_window;
+    VLCWindow       * o_fullscreen_window;
+    NSViewAnimation * o_fullscreen_anim1;
+    NSViewAnimation * o_fullscreen_anim2;
+    NSView          * o_temp_view;
+
+    NSInteger i_originalLevel;
+
+    BOOL b_video_view_was_hidden;
+
+    NSTimer *t_hide_mouse_timer;
+
+    // true when the window is in transition for entering or exiting fullscreen
+    BOOL b_in_fullscreen_transition;
+
+    NSRect frameBeforeLionFullscreen;
+
+    BOOL b_windowShouldExitFullscreenWhenFinished;
+}
+
 - (void)customZoom:(id)sender;
 - (void)hasBecomeFullscreen;
 - (void)hasEndedFullscreen;
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask
                   backing:(NSBackingStoreType)backingType defer:(BOOL)flag
 {
-    b_dark_interface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
 
-    if (b_dark_interface) {
+    if (_darkInterface) {
         styleMask = NSBorderlessWindowMask;
 #ifdef MAC_OS_X_VERSION_10_7
         if (!OSX_SNOW_LEOPARD)
     if (!title || [title length] < 1)
         return;
 
-    if (b_dark_interface && o_titlebar_view)
+    if (_darkInterface && o_titlebar_view)
         [o_titlebar_view setWindowTitle: title];
 
     [super setTitle: title];
         && (fabs(NSMinY(maxRect) - NSMinY(currentFrame)) < DIST)) {
         // Already in zoomed mode, reset user frame, if stored
         if ([self frameAutosaveName] != nil) {
-            [self setFrame: previousSavedFrame display: YES animate: YES];
+            [self setFrame: self.previousSavedFrame display: YES animate: YES];
             [self saveFrameUsingName: [self frameAutosaveName]];
         }
         return;
 
     if ([self frameAutosaveName] != nil) {
         [self saveFrameUsingName: [self frameAutosaveName]];
-        previousSavedFrame = [self frame];
+        self.previousSavedFrame = [self frame];
     }
 
     [self setFrame: maxRect display: YES animate: YES];
     if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel)
         return;
 
-    if (!b_fullscreen && !b_in_fullscreen_transition)
+    if (!self.fullscreen && !b_in_fullscreen_transition)
         [self setLevel: i_state];
 
     // save it for restore if window is currently minimized or in fullscreen
     if ([self fullscreen] || b_in_fullscreen_transition)
         return;
 
-    NSRect window_rect = [self getWindowRectForProposedVideoViewSize:nativeVideoSize];
+    NSRect window_rect = [self getWindowRectForProposedVideoViewSize:self.nativeVideoSize];
     [[self animator] setFrame:window_rect display:YES];
 }
 
 - (void)setNativeVideoSize:(NSSize)size
 {
-    nativeVideoSize = size;
+    _nativeVideoSize = size;
 
     if (var_InheritBool(VLCIntf, "macosx-video-autoresize") && !var_InheritBool(VLCIntf, "video-wallpaper"))
         [self resizeWindow];
 
 - (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize
 {
-    if (![[VLCMain sharedInstance] activeVideoPlayback] || nativeVideoSize.width == 0. || nativeVideoSize.height == 0. || window != self)
+    if (![[VLCMain sharedInstance] activeVideoPlayback] || self.nativeVideoSize.width == 0. || self.nativeVideoSize.height == 0. || window != self)
         return proposedFrameSize;
 
     // needed when entering lion fullscreen mode
         NSRect contentRect = [self contentRectForFrameRect:videoWindowFrame];
         CGFloat marginy = viewRect.origin.y + videoWindowFrame.size.height - contentRect.size.height;
         CGFloat marginx = contentRect.size.width - viewRect.size.width;
-        if (o_titlebar_view && b_dark_interface)
+        if (o_titlebar_view && _darkInterface)
             marginy += [o_titlebar_view frame].size.height;
 
-        proposedFrameSize.height = (proposedFrameSize.width - marginx) * nativeVideoSize.height / nativeVideoSize.width + marginy;
+        proposedFrameSize.height = (proposedFrameSize.width - marginx) * self.nativeVideoSize.height / self.nativeVideoSize.width + marginy;
     }
 
     return proposedFrameSize;
 //  Called automatically if window's acceptsMouseMovedEvents property is true
 - (void)mouseMoved:(NSEvent *)theEvent
 {
-    if (b_fullscreen)
+    if (self.fullscreen)
         [self recreateHideMouseTimer];
-    if (b_has_active_video && [self isKeyWindow]) {
+    if (self.hasActiveVideo && [self isKeyWindow]) {
         if (NSPointInRect([theEvent locationInWindow],
                           [[self videoView] convertRect:[[self videoView] bounds]
                                                  toView:nil])) {
     b_windowShouldExitFullscreenWhenFinished = [[VLCMain sharedInstance] activeVideoPlayback];
 
     NSInteger i_currLevel = [self level];
-    // b_fullscreen and b_in_fullscreen_transition must not be true yet
+    // self.fullscreen and b_in_fullscreen_transition must not be true yet
     [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
     [self setLevel:NSNormalWindowLevel];
     i_originalLevel = i_currLevel;
     if ([self hasActiveVideo])
         [[VLCMainWindow sharedInstance] recreateHideMouseTimer];
 
-    if (b_dark_interface) {
+    if (_darkInterface) {
         [o_titlebar_view removeFromSuperviewWithoutNeedingDisplay];
 
         NSRect winrect;
     [[[VLCMainWindow sharedInstance] fsPanel] setNonActive: nil];
 
 
-    if (b_dark_interface) {
+    if (_darkInterface) {
         NSRect winrect;
         CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
 
 
     /* Make sure we don't see the window flashes in float-on-top mode */
     NSInteger i_currLevel = [self level];
-    // b_fullscreen must not be true yet
+    // self.fullscreen must not be true yet
     [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
     [self setLevel:NSNormalWindowLevel];
     i_originalLevel = i_currLevel; // would be overwritten by previous call
 
 - (NSArray *)accessibilityAttributeNames
 {
-    if (!b_dark_interface || !o_titlebar_view)
+    if (!_darkInterface || !o_titlebar_view)
         return [super accessibilityAttributeNames];
 
     static NSMutableArray *attributes = nil;
 
 - (id)accessibilityAttributeValue: (NSString*)o_attribute_name
 {
-    if (b_dark_interface && o_titlebar_view) {
+    if (_darkInterface && o_titlebar_view) {
         VLCMainWindowTitleView *o_tbv = o_titlebar_view;
 
         if ([o_attribute_name isEqualTo: NSAccessibilitySubroleAttribute])
index a454dd5..328c0d9 100644 (file)
     IBOutlet id o_icon_view;
     IBOutlet id o_joinus_txt;
     IBOutlet id o_trademarks_txt;
-
-    NSTimer *o_scroll_timer;
-    float f_current;
-    CGFloat f_end;
-    NSTimeInterval i_start;
-    BOOL b_restart;
-
-    NSString *o_authors;
 }
 
 - (void)showAbout;
index 09edc56..32d37e9 100644 (file)
 #define PLATFORM "Intel 64bit"
 
 /*****************************************************************************
- * VLAboutBox implementation
+ * AboutWindowController implementation
  *****************************************************************************/
+@interface AboutWindowController ()
+{
+    NSTimer *o_scroll_timer;
+    float f_current;
+    CGFloat f_end;
+    NSTimeInterval i_start;
+    BOOL b_restart;
+
+    NSString *o_authors;
+}
+@end
+
 @implementation AboutWindowController
 
 - (id)init
index 1708745..b5a87b5 100644 (file)
@@ -44,8 +44,6 @@
     IBOutlet id o_edit_lbl_time;
     IBOutlet id o_edit_fld_name;
     IBOutlet id o_edit_fld_time;
-
-    input_thread_t *p_old_input;
 }
 + (VLCBookmarks *)sharedInstance;
 
index e83256a..6919e8f 100644 (file)
 #import "wizard.h"
 #import "CompatibilityFixes.h"
 
-@interface VLCBookmarks (Internal)
+@interface VLCBookmarks()
+{
+    input_thread_t *p_old_input;
+}
 - (void)initStrings;
 @end
 
index 229e7c9..c22ac85 100644 (file)
@@ -33,8 +33,6 @@
 
 @interface VLCCoreDialogProvider : NSObject
 {
-    ErrorWindowController *o_error_panel;
-
     /* authentication dialogue */
     IBOutlet id o_auth_cancel_btn;
     IBOutlet id o_auth_description_txt;
@@ -52,7 +50,6 @@
     IBOutlet id o_prog_description_txt;
     IBOutlet id o_prog_title_txt;
     IBOutlet id o_prog_win;
-    BOOL b_progress_cancelled;
 }
 + (VLCCoreDialogProvider *)sharedInstance;
 
index 0f09470..0fb5374 100644 (file)
 /*****************************************************************************
  * VLCCoreDialogProvider implementation
  *****************************************************************************/
+@interface VLCCoreDialogProvider()
+{
+    ErrorWindowController *o_error_panel;
+    BOOL b_progress_cancelled;
+}
+@end
+
 @implementation VLCCoreDialogProvider
 
 static VLCCoreDialogProvider *_o_sharedInstance = nil;
index 02643c5..041f827 100644 (file)
 
 
 @interface VLCEyeTVController : NSObject
-{
-    BOOL b_eyeTVactive;
-    BOOL b_deviceConnected;
-}
+
 @property (readonly) BOOL eyeTVRunning;
 @property (readonly) BOOL deviceConnected;
 @property (readwrite) int channel;
index 01a4911..9643654 100644 (file)
 /* for various VLC core related calls */
 #import "intf.h"
 
+@interface VLCEyeTVController()
+{
+    BOOL b_eyeTVactive;
+    BOOL b_deviceConnected;
+}
+@end
+
 @implementation VLCEyeTVController
 
 @synthesize eyeTVRunning = b_eyeTVactive, deviceConnected = b_deviceConnected;
index 614dfff..0cff675 100644 (file)
 @class VLCWindow;
 
 @interface VLCFSPanel : NSWindow
-{
-    NSTimer *fadeTimer,*hideAgainTimer;
-    NSPoint mouseClic;
-    BOOL b_fadeQueued;
-    BOOL b_keptVisible;
-    BOOL b_alreadyCounting;
-    int i_timeToKeepVisibleInSec;
-
-    BOOL b_nonActive;
-    BOOL b_displayed;
-    BOOL b_voutWasUpdated;
-    int i_device;
-
-    VLCWindow *o_vout_window;
-}
+
 - (id)initWithContentRect: (NSRect)contentRect
                 styleMask: (NSUInteger)aStyle
                   backing: (NSBackingStoreType)bufferingType
 - (void)mouseDragged: (NSEvent *)theEvent;
 
 - (void)setVoutWasUpdated: (VLCWindow *)o_window;
+
 @end
 
 @class VLCProgressView;
 @class VLCFSVolumeSlider;
 
 @interface VLCFSPanelView : NSView
-{
-    NSColor *fillColor;
-    NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
-    NSTextField *o_streamTitle_txt;
-    VLCTimeField *o_streamPosition_txt, *o_streamLength_txt;
-    NSSlider *o_fs_timeSlider;
-    VLCFSVolumeSlider *o_fs_volumeSlider;
-    VLCProgressView *o_progress_view;
-    NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img;
-    NSTimeInterval last_fwd_event;
-    NSTimeInterval last_bwd_event;
-}
-- (id)initWithFrame: (NSRect)frameRect;
-- (void)drawRect: (NSRect)rect;
 
 - (void)setPlay;
 - (void)setPause;
 @end
 
 @interface VLCFSTimeSlider : NSSlider
-{
-}
+
 - (void)drawKnobInRect: (NSRect)knobRect;
 - (void)drawRect: (NSRect)rect;
 
 @end
 
 @interface VLCFSVolumeSlider : VLCVolumeSliderCommon
-{
-}
+
 - (void)drawKnobInRect: (NSRect)knobRect;
 - (void)drawRect: (NSRect)rect;
 
index e937d0c..02ce5ea 100644 (file)
 #import "fspanel.h"
 #import "CompatibilityFixes.h"
 
-@interface VLCFSPanel ()
+@interface VLCFSPanel()
+{
+    NSTimer *fadeTimer,*hideAgainTimer;
+    NSPoint mouseClic;
+    BOOL b_fadeQueued;
+    BOOL b_keptVisible;
+    BOOL b_alreadyCounting;
+    int i_timeToKeepVisibleInSec;
+
+    BOOL b_nonActive;
+    BOOL b_displayed;
+    BOOL b_voutWasUpdated;
+    int i_device;
+
+    VLCWindow *o_vout_window;
+}
+
 - (void)hideMouse;
 @end
 
 /*****************************************************************************
  * FSPanelView
  *****************************************************************************/
+
+@interface VLCFSPanelView()
+{
+    NSColor *fillColor;
+    NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
+    NSTextField *o_streamTitle_txt;
+    VLCTimeField *o_streamPosition_txt, *o_streamLength_txt;
+    NSSlider *o_fs_timeSlider;
+    VLCFSVolumeSlider *o_fs_volumeSlider;
+    VLCProgressView *o_progress_view;
+    NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img;
+    NSTimeInterval last_fwd_event;
+    NSTimeInterval last_bwd_event;
+}
+@end
+
 @implementation VLCFSPanelView
 
 #define addButton(o_button, imageOff, imageOn, _x, _y, action, AXDesc, ToolTip)               \
index d77695b..20f609b 100644 (file)
@@ -70,53 +70,10 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
 
 @interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
 {
-    intf_thread_t *p_intf;      /* The main intf object */
-    BOOL launched;              /* finishedLaunching */
-    int items_at_launch;        /* items in playlist after launch */
-    VLCMainMenu *o_mainmenu;    /* VLCMainMenu */
-    id o_prefs;                 /* VLCPrefs       */
-    id o_sprefs;                /* VLCSimplePrefs */
-    id o_open;                  /* VLCOpen        */
-    id o_wizard;                /* VLCWizard      */
-    id o_coredialogs;           /* VLCCoreDialogProvider */
-    VLCInfo *o_info;            /* VLCInformation */
-    id o_eyetv;                 /* VLCEyeTVController */
-    id o_bookmarks;             /* VLCBookmarks */
-    id o_coreinteraction;       /* VLCCoreInteraction */
-    ResumeDialogController *o_resume_dialog;
-
-    BOOL nib_main_loaded;       /* main nibfile */
-    BOOL nib_open_loaded;       /* open nibfile */
-    BOOL nib_about_loaded;      /* about nibfile */
-    BOOL nib_wizard_loaded;     /* wizard nibfile */
-    BOOL nib_prefs_loaded;      /* preferences nibfile */
-    BOOL nib_info_loaded;       /* information panel nibfile */
-    BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */
-    BOOL nib_bookmarks_loaded;   /* Bookmarks nibfile */
-    BOOL b_active_videoplayback;
-    BOOL b_nativeFullscreenMode;
-
     IBOutlet VLCMainWindow *o_mainwindow;            /* VLCMainWindow */
 
     IBOutlet VLCControls * o_controls;     /* VLCControls    */
     IBOutlet VLCPlaylist * o_playlist;     /* VLCPlaylist    */
-
-    bool b_intf_terminating; /* Makes sure applicationWillTerminate will be called only once */
-
-    AppleRemote * o_remote;
-    BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */
-
-    /* media key support */
-    BOOL b_mediaKeySupport;
-    BOOL b_mediakeyJustJumped;
-    SPMediaKeyTap * o_mediaKeyController;
-    BOOL b_mediaKeyTrapEnabled;
-
-    NSArray *o_usedHotkeys;
-
-    VLCVoutWindowController *o_vout_controller;
-
-    InputManager *o_input_manager;
 }
 
 @property (readonly) VLCVoutWindowController* voutController;
index 25e2e0a..7df080f 100644 (file)
@@ -488,12 +488,55 @@ audio_output_t *getAout(void)
 #pragma mark Private
 
 @interface VLCMain () <BWQuincyManagerDelegate>
-- (void)removeOldPreferences;
-@end
+{
+    intf_thread_t *p_intf;      /* The main intf object */
+    BOOL launched;              /* finishedLaunching */
+    int items_at_launch;        /* items in playlist after launch */
+    VLCMainMenu *o_mainmenu;    /* VLCMainMenu */
+    id o_prefs;                 /* VLCPrefs       */
+    id o_sprefs;                /* VLCSimplePrefs */
+    id o_open;                  /* VLCOpen        */
+    id o_wizard;                /* VLCWizard      */
+    id o_coredialogs;           /* VLCCoreDialogProvider */
+    VLCInfo *o_info;            /* VLCInformation */
+    id o_eyetv;                 /* VLCEyeTVController */
+    id o_bookmarks;             /* VLCBookmarks */
+    id o_coreinteraction;       /* VLCCoreInteraction */
+    ResumeDialogController *o_resume_dialog;
+
+    BOOL nib_main_loaded;       /* main nibfile */
+    BOOL nib_open_loaded;       /* open nibfile */
+    BOOL nib_about_loaded;      /* about nibfile */
+    BOOL nib_wizard_loaded;     /* wizard nibfile */
+    BOOL nib_prefs_loaded;      /* preferences nibfile */
+    BOOL nib_info_loaded;       /* information panel nibfile */
+    BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */
+    BOOL nib_bookmarks_loaded;   /* Bookmarks nibfile */
+    BOOL b_active_videoplayback;
+    BOOL b_nativeFullscreenMode;
+
+    bool b_intf_terminating; /* Makes sure applicationWillTerminate will be called only once */
+
+    AppleRemote * o_remote;
+    BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */
+
+    /* media key support */
+    BOOL b_mediaKeySupport;
+    BOOL b_mediakeyJustJumped;
+    SPMediaKeyTap * o_mediaKeyController;
+    BOOL b_mediaKeyTrapEnabled;
+
+    NSArray *o_usedHotkeys;
+
+    VLCVoutWindowController *o_vout_controller;
+
+    InputManager *o_input_manager;
+}
 
-@interface VLCMain (Internal)
+- (void)removeOldPreferences;
 - (void)resetMediaKeyJump;
 - (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification;
+
 @end
 
 /*****************************************************************************
@@ -1428,11 +1471,7 @@ static const int kCurrentPreferencesVersion = 3;
     [[self playlist] outlineViewSelectionDidChange: NULL];
 }
 
-#pragma mark -
-
-@end
-
-@implementation VLCMain (Internal)
+#pragma mark - media keys
 
 - (void)resetMediaKeyJump
 {
index a7a5142..c16d6d4 100644 (file)
  *****************************************************************************/
 
 @interface VLCDragDropView : NSView
-{
-    bool b_activeDragAndDrop;
-
-    __unsafe_unretained id _dropHandler;
-}
 
 @property (nonatomic, assign) id dropHandler;
 @property (nonatomic, assign) BOOL drawBorder;
 
-
 - (void)enablePlaylistItems;
 
 @end
  *****************************************************************************/
 
 @interface TimeLineSlider : NSSlider
-{
-    NSImage *o_knob_img;
-    NSRect img_rect;
-    BOOL b_dark;
-}
+
 @property (readonly) CGFloat knobPosition;
 
 - (void)drawRect:(NSRect)rect;
  *****************************************************************************/
 
 @interface VLCVolumeSliderCommon : NSSlider
-{
-    BOOL _usesBrightArtwork;
-}
+
 @property (readwrite, nonatomic) BOOL usesBrightArtwork;
 
 - (void)scrollWheel:(NSEvent *)o_event;
  *****************************************************************************/
 
 @interface ITSlider : VLCVolumeSliderCommon
-{
-    NSImage *img;
-    NSRect image_rect;
-}
-
-- (void)drawRect:(NSRect)rect;
-- (void)drawKnobInRect:(NSRect)knobRect;
 
 @end
 
  *****************************************************************************/
 
 @interface VLCTimeField : NSTextField
-{
-    NSShadow * o_string_shadow;
-    NSTextAlignment textAlignment;
 
-    NSString *o_remaining_identifier;
-    BOOL b_time_remaining;
-}
 @property (readonly) BOOL timeRemaining;
 
 - (void)setRemainingIdentifier:(NSString *)o_string;
  * VLCThreePartImageView interface
  *****************************************************************************/
 @interface VLCThreePartImageView : NSView
-{
-    NSImage * o_left_img;
-    NSImage * o_middle_img;
-    NSImage * o_right_img;
-}
 
 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
+
 @end
 
 
  * Formats a text field to only accept decimals and :
  *****************************************************************************/
 @interface PositionFormatter : NSFormatter
-{
-    NSCharacterSet *o_forbidden_characters;
-}
+
 - (NSString*)stringForObjectValue:(id)obj;
 
-- (BOOL)getObjectValue:(id*)obj forString:(NSString*)string errorDescription:(NSString**)error;
+- (BOOL)getObjectValue:(id*)obj
+             forString:(NSString*)string
+      errorDescription:(NSString**)error;
 
-- (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error;
+- (BOOL)isPartialStringValid:(NSString*)partialString
+            newEditingString:(NSString**)newString
+            errorDescription:(NSString**)error;
 
 @end
 
index 9e46c15..89a6e37 100644 (file)
@@ -314,6 +314,14 @@ static bool b_old_spaces_style = YES;
  * VLCDragDropView
  *****************************************************************************/
 
+@interface VLCDragDropView()
+{
+    bool b_activeDragAndDrop;
+
+    __unsafe_unretained id _dropHandler;
+}
+@end
+
 @implementation VLCDragDropView
 
 @synthesize dropHandler=_dropHandler;
@@ -524,6 +532,14 @@ void _drawFrameInRect(NSRect frameRect)
  * TimeLineSlider
  *****************************************************************************/
 
+@interface TimeLineSlider()
+{
+    NSImage *o_knob_img;
+    NSRect img_rect;
+    BOOL b_dark;
+}
+@end
+
 @implementation TimeLineSlider
 
 - (void)awakeFromNib
@@ -576,6 +592,12 @@ void _drawFrameInRect(NSRect frameRect)
  * VLCVolumeSliderCommon
  *****************************************************************************/
 
+@interface VLCVolumeSliderCommon()
+{
+    BOOL _usesBrightArtwork;
+}
+@end
+
 @implementation VLCVolumeSliderCommon : NSSlider
 
 @synthesize usesBrightArtwork = _usesBrightArtwork;
@@ -670,6 +692,13 @@ void _drawFrameInRect(NSRect frameRect)
  * ITSlider
  *****************************************************************************/
 
+@interface ITSlider()
+{
+    NSImage *img;
+    NSRect image_rect;
+}
+@end
+
 @implementation ITSlider
 
 - (void)awakeFromNib
@@ -720,6 +749,16 @@ void _drawFrameInRect(NSRect frameRect)
  * we need this to catch our click-event in the controller window
  *****************************************************************************/
 
+@interface VLCTimeField()
+{
+    NSShadow * o_string_shadow;
+    NSTextAlignment textAlignment;
+
+    NSString *o_remaining_identifier;
+    BOOL b_time_remaining;
+}
+@end
+
 @implementation VLCTimeField
 + (void)initialize
 {
@@ -810,23 +849,38 @@ void _drawFrameInRect(NSRect frameRect)
 /*****************************************************************************
  * VLCThreePartImageView interface
  *****************************************************************************/
+
+@interface VLCThreePartImageView()
+{
+    NSImage *_left_img;
+    NSImage *_middle_img;
+    NSImage *_right_img;
+}
+@end
+
 @implementation VLCThreePartImageView
 
 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right
 {
-    o_left_img = left;
-    o_middle_img = middle;
-    o_right_img = right;
+    _left_img = left;
+    _middle_img = middle;
+    _right_img = right;
 }
 
 - (void)drawRect:(NSRect)rect
 {
     NSRect bnds = [self bounds];
-    NSDrawThreePartImage( bnds, o_left_img, o_middle_img, o_right_img, NO, NSCompositeSourceOver, 1, NO );
+    NSDrawThreePartImage( bnds, _left_img, _middle_img, _right_img, NO, NSCompositeSourceOver, 1, NO );
 }
 
 @end
 
+@interface PositionFormatter()
+{
+    NSCharacterSet *o_forbidden_characters;
+}
+@end
+
 @implementation PositionFormatter
 
 - (id)init
index 3b7886a..a972d32 100644 (file)
     IBOutlet id o_capture_height_lbl;
     IBOutlet id o_capture_height_fld;
     IBOutlet id o_capture_height_stp;
-
-    NSArray         *qtkvideoDevices;
-    NSArray         *qtkaudioDevices;
-    NSString        *qtk_currdevice_uid;
-    NSString        *qtkaudio_currdevice_uid;
-
-    BOOL b_autoplay;
-    BOOL b_nodvdmenus;
-    id o_currentOpticalMediaView;
-    id o_currentOpticalMediaIconView;
-    NSMutableArray *o_allMediaDevices;
-    NSArray *o_opticalDevices;
-    NSMutableArray *o_specialMediaFolders;
-    NSString *o_file_path;
-    id o_currentCaptureView;
-    NSString *o_file_slave_path;
-    NSString *o_sub_path;
-    NSString *o_mrl;
-    NSMutableArray *o_displayInfos;
 }
 
 + (VLCOpen *)sharedInstance;
index 1dbd157..d8412e8 100644 (file)
@@ -69,6 +69,29 @@ struct display_info_t
 /*****************************************************************************
  * VLCOpen implementation
  *****************************************************************************/
+@interface VLCOpen()
+{
+    NSArray         *qtkvideoDevices;
+    NSArray         *qtkaudioDevices;
+    NSString        *qtk_currdevice_uid;
+    NSString        *qtkaudio_currdevice_uid;
+
+    BOOL b_autoplay;
+    BOOL b_nodvdmenus;
+    id o_currentOpticalMediaView;
+    id o_currentOpticalMediaIconView;
+    NSMutableArray *o_allMediaDevices;
+    NSArray *o_opticalDevices;
+    NSMutableArray *o_specialMediaFolders;
+    NSString *o_file_path;
+    id o_currentCaptureView;
+    NSString *o_file_slave_path;
+    NSString *o_sub_path;
+    NSString *o_mrl;
+    NSMutableArray *o_displayInfos;
+}
+@end
+
 @implementation VLCOpen
 
 @synthesize fileSubDelay, fileSubFps;
index 478fec0..790356d 100644 (file)
@@ -78,9 +78,6 @@
     IBOutlet id o_rtsp_chkbox;
     IBOutlet id o_http_chkbox;
     IBOutlet id o_file_chkbox;
-
-    NSArray *o_mrl;
-    NSString *o_transcode;
 }
 @property (readwrite, retain) NSArray * soutMRL;
 
index 982dd66..031cfbe 100644 (file)
 /*****************************************************************************
  * VLCOutput implementation
  *****************************************************************************/
+
+@interface VLCOutput()
+{
+    NSArray *o_mrl;
+    NSString *o_transcode;
+}
+@end
+
 @implementation VLCOutput
 @synthesize soutMRL=o_mrl;
 
index f22e4e7..71f292d 100644 (file)
@@ -24,6 +24,7 @@
  *****************************************************************************/
 
 #import "PXSourceList.h"
+#import "PLModel.h"
 
 /*****************************************************************************
  * VLCPlaylistView interface
@@ -40,8 +41,6 @@
 
 @end
 
-#import "PLModel.h"
-
 /*****************************************************************************
  * VLCPlaylist interface
  *****************************************************************************/
@@ -74,8 +73,6 @@
     IBOutlet id o_save_accessory_text;
 
     IBOutlet id o_playlist_header;
-
-    PLModel *o_model;
 }
 
 - (PLModel *)model;
index fc6ebe3..8ac1b05 100644 (file)
 
     BOOL b_playlistmenu_nib_loaded;
     BOOL b_view_setup;
+
+    PLModel *o_model;
 }
 
 - (void)saveTableColumns;
index 3d1f644..669b517 100644 (file)
  *****************************************************************************/
 @interface VLCPrefs : NSObject
 {
-    intf_thread_t *p_intf;
-    VLCTreeMainItem * _rootTreeItem;
-    NSView *o_empty_view;
-    NSMutableDictionary *o_save_prefs;
-
     IBOutlet id o_prefs_window;
     IBOutlet id o_title;
     IBOutlet id o_tree;
@@ -55,8 +50,5 @@
 @end
 
 @interface VLCFlippedView : NSView
-{
-
-}
 
 @end
index 861ee9d..9756217 100644 (file)
@@ -63,6 +63,9 @@
 #import <vlc_modules.h>
 #import <vlc_plugin.h>
 
+#define LEFTMARGIN  18
+#define RIGHTMARGIN 18
+
 /* /!\ Warning: Unreadable code :/ */
 
 @interface VLCTreeItem : NSObject
 @end
 
 @interface VLCTreeMainItem : VLCTreePluginItem
-{
-}
 - (VLCTreeCategoryItem *)itemRepresentingCategory:(int)category;
 @end
 
 /*****************************************************************************
  * VLCPrefs implementation
  *****************************************************************************/
+
+@interface VLCPrefs()
+{
+    intf_thread_t *p_intf;
+    VLCTreeMainItem * _rootTreeItem;
+    NSView *o_empty_view;
+    NSMutableDictionary *o_save_prefs;
+}
+@end
+
 @implementation VLCPrefs
 
 static VLCPrefs *_o_sharedMainInstance = nil;
index 0ed6e64..3f8c290 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 10)
-#define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 10)
-#define LEFTMARGIN  18
-#define RIGHTMARGIN 18
-
-static NSMenu   *o_keys_menu = nil;
+static NSMenu *o_keys_menu = nil;
 
 @interface VLCConfigControl : NSView
-{
-    module_config_t *p_item;
-    char            *psz_name;
-    NSTextField     *o_label;
-    int             i_type;
-    int             i_view_type;
-    bool      b_advanced;
-}
-
-@property (readonly) NSString * name;
+
+@property (readonly) module_config_t *p_item;
+
+@property (readwrite) NSTextField *label;
+
+@property (readonly) NSString *name;
 @property (readonly) int type;
-@property (readonly) int viewType;
+@property (readwrite) int viewType;
 @property (readonly) bool advanced;
 @property (readonly) int intValue;
 @property (readonly) float floatValue;
-@property (readonly) char * stringValue;
+@property (readonly) char *stringValue;
 @property (readonly) int labelSize;
 
-+ (VLCConfigControl *)newControl: (module_config_t *)_p_item
-        withView: (NSView *)o_parent_view;
-+ (int)calcVerticalMargin: (int)i_curItem lastItem:(int)i_lastItem;
 
-- (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item;
++ (VLCConfigControl *)newControl:(module_config_t *)_p_item
+                        withView:(NSView *)o_parent_view;
++ (int)calcVerticalMargin:(int)i_curItem lastItem:(int)i_lastItem;
+
+- (id)initWithFrame:(NSRect)frame
+               item:(module_config_t *)p_item;
+- (id)initWithItem:(module_config_t *)_p_item
+          withView:(NSView *)o_parent_view;
 
 - (void)setYPos:(int)i_yPos;
 - (void)alignWithXPosition:(int)i_xPos;
@@ -63,160 +58,63 @@ static NSMenu   *o_keys_menu = nil;
 @end
 
 @interface StringConfigControl : VLCConfigControl
-{
-    NSTextField     *o_textfield;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
 @interface StringListConfigControl : VLCConfigControl
-{
-    NSPopUpButton      *o_popup;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
 @interface FileConfigControl : VLCConfigControl
-{
-    NSTextField     *o_textfield;
-    NSButton        *o_button;
-    BOOL            b_directory;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
-- (IBAction)openFileDialog: (id)sender;
+- (IBAction)openFileDialog:(id)sender;
 
 @end
 
 @interface ModuleConfigControl : VLCConfigControl
-{
-    NSPopUpButton   *o_popup;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
-@interface IntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
-{
-    NSTextField     *o_textfield;
-    NSStepper       *o_stepper;
-}
-
+@interface IntegerConfigControl : VLCConfigControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 - (IBAction)stepperChanged:(id)sender;
-- (void)textfieldChanged:(NSNotification *)o_notification;
 
 @end
 
 @interface IntegerListConfigControl : VLCConfigControl
-{
-    NSPopUpButton      *o_popup;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
-@interface RangedIntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
-{
-    NSSlider        *o_slider;
-    NSTextField     *o_textfield;
-    NSTextField     *o_textfield_min;
-    NSTextField     *o_textfield_max;
-}
-
+@interface RangedIntegerConfigControl : VLCConfigControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 - (IBAction)sliderChanged:(id)sender;
-- (void)textfieldChanged:(NSNotification *)o_notification;
 
 @end
 
 @interface BoolConfigControl : VLCConfigControl
-{
-    NSButton        *o_checkbox;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
-@interface FloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
-{
-    NSTextField     *o_textfield;
-    NSStepper       *o_stepper;
-}
+@interface FloatConfigControl : VLCConfigControl
 
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 - (IBAction)stepperChanged:(id)sender;
-- (void)textfieldChanged:(NSNotification *)o_notification;
 
 @end
 
-@interface RangedFloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
-{
-    NSSlider        *o_slider;
-    NSTextField     *o_textfield;
-    NSTextField     *o_textfield_min;
-    NSTextField     *o_textfield_max;
-}
-
+@interface RangedFloatConfigControl : VLCConfigControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 - (IBAction)sliderChanged:(id)sender;
-- (void)textfieldChanged:(NSNotification *)o_notification;
 
 @end
 
 @interface KeyConfigControl : VLCConfigControl
-{
-    NSPopUpButton   *o_popup;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
 
-@interface ModuleListConfigControl : VLCConfigControl <NSTableViewDataSource>
-{
-    NSTextField     *o_textfield;
-    NSTableView     *o_tableview;
-    NSMutableArray  *o_modulearray;
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
+@interface ModuleListConfigControl : VLCConfigControl
 
 @end
 
 @interface SectionControl : VLCConfigControl
-{
-}
-
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view;
 
 @end
-
-//#undef CONFIG_ITEM_LIST_STRING
-//#undef CONFIG_ITEM_RANGED_INTEGER
-
index 2e2e264..7bcd54e 100644 (file)
 #include "intf.h"
 #include "prefs_widgets.h"
 
+#define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 10)
+#define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 10)
+
+#define LEFTMARGIN  18
+#define RIGHTMARGIN 18
 #define PREFS_WRAP 300
 #define OFFSET_RIGHT 20
 #define OFFSET_BETWEEN 2
@@ -380,32 +385,44 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     [o_checkbox sizeToFit];                                                 \
 }
 
+@interface VLCConfigControl()
+{
+    char            *psz_name;
+    int             i_type;
+    bool      b_advanced;
+}
+@end
+
 @implementation VLCConfigControl
-@synthesize type = i_type, viewType = i_view_type, advanced = b_advanced;
+@synthesize type = i_type, advanced = b_advanced;
 
-- (id)initWithFrame: (NSRect)frame
+- (id)initWithFrame:(NSRect)frame
 {
     return [self initWithFrame: frame
-                    item: nil];
+                          item: nil];
 }
 
-- (id)initWithFrame: (NSRect)frame
-        item: (module_config_t *)_p_item
+- (id)initWithFrame:(NSRect)frame
+               item:(module_config_t *)p_item
 {
     self = [super initWithFrame: frame];
 
     if (self != nil) {
-        p_item = _p_item;
+        _p_item = p_item;
         psz_name = p_item->psz_name;
-        o_label = NULL;
         i_type = p_item->i_type;
-        i_view_type = 0;
         b_advanced = p_item->b_advanced;
         [self setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin ];
     }
     return (self);
 }
 
+- (id)initWithItem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view;
+{
+    return nil; // implemented by children only
+}
+
 - (void)setYPos:(int)i_yPos
 {
     NSRect frame = [self frame];
@@ -418,414 +435,420 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     free(psz_name);
 }
 
-+ (int)calcVerticalMargin: (int)i_curItem lastItem: (int)i_lastItem
++ (int)calcVerticalMargin:(int)i_curItem lastItem:(int)i_lastItem
 {
     int i_margin;
     switch(i_curItem) {
-    case CONFIG_ITEM_STRING:
-    case CONFIG_ITEM_PASSWORD:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 4;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 8;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_STRING_LIST:
-        switch(i_lastItem) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 4;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 8;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_LOADFILE:
-    case CONFIG_ITEM_SAVEFILE:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 13;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 10;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 9;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 9;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 10;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 10;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 9;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 11;
-            break;
-        default:
-            i_margin = 23;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_MODULE:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 9;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_INTEGER:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 4;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 8;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_RANGED_INTEGER:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 4;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 8;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 4;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 8;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_LOADFILE:
         case CONFIG_ITEM_SAVEFILE:
-            i_margin = 8;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 13;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 10;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 10;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 10;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 11;
+                    break;
+                default:
+                    i_margin = 23;
+                    break;
+            }
             break;
         case CONFIG_ITEM_MODULE:
-            i_margin = 4;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 9;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 4;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 8;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 4;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 8;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_BOOL:
-            i_margin = 7;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 10;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 10;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_KEY:
-            i_margin = 6;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 8;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 10;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 8;
+            switch(i_lastItem) {
+                case CONFIG_ITEM_STRING:
+                case CONFIG_ITEM_PASSWORD:
+                    i_margin = 10;
+                    break;
+                case CONFIG_ITEM_STRING_LIST:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_LOADFILE:
+                case CONFIG_ITEM_SAVEFILE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_MODULE:
+                    i_margin = 6;
+                    break;
+                case CONFIG_ITEM_INTEGER:
+                    i_margin = 9;
+                    break;
+                case CONFIG_ITEM_RANGED_INTEGER:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_BOOL:
+                    i_margin = 7;
+                    break;
+                case CONFIG_ITEM_KEY:
+                    i_margin = 5;
+                    break;
+                case CONFIG_ITEM_MODULE_LIST:
+                    i_margin = 8;
+                    break;
+                default:
+                    i_margin = 20;
+                    break;
+            }
             break;
         default:
             i_margin = 20;
             break;
-        }
-        break;
-    case CONFIG_ITEM_BOOL:
-        switch(i_lastItem) {
+    }
+    return i_margin;
+}
+
++ (VLCConfigControl *)newControl:(module_config_t *)_p_item
+                        withView:(NSView *)o_parent_view
+{
+    VLCConfigControl *p_control = NULL;
+
+    switch(_p_item->i_type) {
         case CONFIG_ITEM_STRING:
         case CONFIG_ITEM_PASSWORD:
-            i_margin = 10;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 9;
+            if (!_p_item->list_count) {
+                p_control = [[StringConfigControl alloc]
+                             initWithItem: _p_item
+                             withView: o_parent_view];
+            } else {
+                p_control = [[StringListConfigControl alloc]
+                             initWithItem: _p_item
+                             withView: o_parent_view];
+            }
             break;
         case CONFIG_ITEM_LOADFILE:
         case CONFIG_ITEM_SAVEFILE:
-            i_margin = 8;
+        case CONFIG_ITEM_DIRECTORY:
+            p_control = [[FileConfigControl alloc]
+                         initWithItem: _p_item
+                         withView: o_parent_view];
             break;
         case CONFIG_ITEM_MODULE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 9;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 10;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_KEY:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 8;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 6;
+            p_control = [[StringListConfigControl alloc]
+                         initWithItem: _p_item
+                         withView: o_parent_view];
             break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 6;
+        case CONFIG_ITEM_MODULE_CAT:
+            p_control = [[ModuleConfigControl alloc]
+                         initWithItem: _p_item
+                         withView: o_parent_view];
             break;
         case CONFIG_ITEM_INTEGER:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
+            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];
             break;
         case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 8;
+            p_control = [[BoolConfigControl alloc]
+                         initWithItem: _p_item
+                         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];
+            else
+                p_control = [[FloatConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
+            break;
+            /* 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:
+             p_control = [[KeyConfigControl alloc]
+             initWithItem: _p_item
+             withView: o_parent_view];
+             break; */
         case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 10;
-            break;
-        default:
-            i_margin = 20;
-            break;
-        }
-        break;
-    case CONFIG_ITEM_MODULE_LIST:
-        switch(i_lastItem) {
-        case CONFIG_ITEM_STRING:
-        case CONFIG_ITEM_PASSWORD:
-            i_margin = 10;
-            break;
-        case CONFIG_ITEM_STRING_LIST:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_LOADFILE:
-        case CONFIG_ITEM_SAVEFILE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_MODULE:
-            i_margin = 6;
-            break;
-        case CONFIG_ITEM_INTEGER:
-            i_margin = 9;
-            break;
-        case CONFIG_ITEM_RANGED_INTEGER:
-            i_margin = 5;
-            break;
-        case CONFIG_ITEM_BOOL:
-            i_margin = 7;
-            break;
-        case CONFIG_ITEM_KEY:
-            i_margin = 5;
+        case CONFIG_ITEM_MODULE_LIST_CAT:
+            p_control = [[ModuleListConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
             break;
-        case CONFIG_ITEM_MODULE_LIST:
-            i_margin = 8;
+        case CONFIG_SECTION:
+            p_control = [[SectionControl alloc] initWithItem: _p_item withView: o_parent_view];
             break;
         default:
-            i_margin = 20;
             break;
-        }
-        break;
-    default:
-        i_margin = 20;
-        break;
-    }
-    return i_margin;
-}
-
-+ (VLCConfigControl *)newControl: (module_config_t *)_p_item
-                      withView: (NSView *)o_parent_view
-{
-    VLCConfigControl *p_control = NULL;
-
-    switch(_p_item->i_type) {
-    case CONFIG_ITEM_STRING:
-    case CONFIG_ITEM_PASSWORD:
-        if (!_p_item->list_count) {
-            p_control = [[StringConfigControl alloc]
-                    initWithItem: _p_item
-                    withView: o_parent_view];
-        } else {
-            p_control = [[StringListConfigControl alloc]
-                    initWithItem: _p_item
-                    withView: o_parent_view];
-        }
-        break;
-    case CONFIG_ITEM_LOADFILE:
-    case CONFIG_ITEM_SAVEFILE:
-    case CONFIG_ITEM_DIRECTORY:
-        p_control = [[FileConfigControl alloc]
-                    initWithItem: _p_item
-                    withView: o_parent_view];
-        break;
-    case CONFIG_ITEM_MODULE:
-            p_control = [[StringListConfigControl alloc]
-                         initWithItem: _p_item
-                         withView: o_parent_view];
-            break;
-    case CONFIG_ITEM_MODULE_CAT:
-        p_control = [[ModuleConfigControl alloc]
-                    initWithItem: _p_item
-                    withView: o_parent_view];
-        break;
-    case CONFIG_ITEM_INTEGER:
-        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];
-        break;
-    case CONFIG_ITEM_BOOL:
-        p_control = [[BoolConfigControl alloc]
-                    initWithItem: _p_item
-                    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];
-        else
-            p_control = [[FloatConfigControl alloc] initWithItem: _p_item withView: o_parent_view];
-        break;
-    /* 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:
-        p_control = [[KeyConfigControl alloc]
-                        initWithItem: _p_item
-                        withView: o_parent_view];
-        break; */
-    case CONFIG_ITEM_MODULE_LIST:
-    case CONFIG_ITEM_MODULE_LIST_CAT:
-        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;
     }
     return p_control;
 }
@@ -853,31 +876,31 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void)applyChanges
 {
     vlc_value_t val;
-    switch(p_item->i_type) {
-    case CONFIG_ITEM_STRING:
-    case CONFIG_ITEM_PASSWORD:
-    case CONFIG_ITEM_LOADFILE:
-    case CONFIG_ITEM_SAVEFILE:
-    case CONFIG_ITEM_DIRECTORY:
-    case CONFIG_ITEM_MODULE:
-    case CONFIG_ITEM_MODULE_LIST:
-    case CONFIG_ITEM_MODULE_LIST_CAT: {
-        char *psz_val = [self stringValue];
-        config_PutPsz(VLCIntf, psz_name, psz_val);
-        free(psz_val);
-        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);
-    case CONFIG_ITEM_INTEGER:
-    case CONFIG_ITEM_BOOL:
-        config_PutInt(VLCIntf, psz_name, [self intValue]);
-        break;
-    case CONFIG_ITEM_FLOAT:
-        config_PutFloat(VLCIntf, psz_name, [self floatValue]);
-        break;
+    switch(self.p_item->i_type) {
+        case CONFIG_ITEM_STRING:
+        case CONFIG_ITEM_PASSWORD:
+        case CONFIG_ITEM_LOADFILE:
+        case CONFIG_ITEM_SAVEFILE:
+        case CONFIG_ITEM_DIRECTORY:
+        case CONFIG_ITEM_MODULE:
+        case CONFIG_ITEM_MODULE_LIST:
+        case CONFIG_ITEM_MODULE_LIST_CAT: {
+            char *psz_val = [self stringValue];
+            config_PutPsz(VLCIntf, psz_name, psz_val);
+            free(psz_val);
+            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);
+        case CONFIG_ITEM_INTEGER:
+        case CONFIG_ITEM_BOOL:
+            config_PutInt(VLCIntf, psz_name, [self intValue]);
+            break;
+        case CONFIG_ITEM_FLOAT:
+            config_PutFloat(VLCIntf, psz_name, [self floatValue]);
+            break;
     }
 }
 
@@ -887,7 +910,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (int)labelSize
 {
-    return [o_label frame].size.width;
+    return self.label.frame.size.width;
 }
 
 - (void) alignWithXPosition:(int)i_xPos;
@@ -897,9 +920,15 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface StringConfigControl()
+{
+    NSTextField     *o_textfield;
+}
+@end
+
 @implementation StringConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_textfieldString, *o_textfieldTooltip;
@@ -908,11 +937,11 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
         if (p_item->i_type == CONFIG_ITEM_PASSWORD)
-            i_view_type = CONFIG_ITEM_PASSWORD;
+            self.viewType = CONFIG_ITEM_PASSWORD;
         else
-            i_view_type = CONFIG_ITEM_STRING;
+            self.viewType = CONFIG_ITEM_STRING;
 
         o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -921,9 +950,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
         if (p_item->value.psz)
@@ -931,13 +960,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         else
             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)
+            ADD_SECURETEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
+                                0, mainFrame.size.width - [self.label frame].size.width -
+                                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)
+            ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
+                          0, mainFrame.size.width - [self.label frame].size.width -
+                          2, o_textfieldTooltip, o_textfieldString)
         }
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
 
@@ -950,9 +979,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     NSRect frame;
     NSRect superFrame = [self frame];
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_textfield frame];
     frame.origin.x = i_xPos + 2;
@@ -968,7 +997,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = _NS(psz_value);
     else
@@ -978,9 +1007,15 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface StringListConfigControl()
+{
+    NSPopUpButton      *o_popup;
+}
+@end
+
 @implementation StringListConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_textfieldTooltip;
@@ -989,11 +1024,11 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
+    if ([super initWithFrame: mainFrame item:p_item] != nil) {
         if (p_item->i_type == CONFIG_ITEM_STRING)
-            i_view_type = CONFIG_ITEM_STRING_LIST;
+            self.viewType = CONFIG_ITEM_STRING_LIST;
         else
-            i_view_type = CONFIG_ITEM_MODULE;
+            self.viewType = CONFIG_ITEM_MODULE;
 
         o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS(p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1002,13 +1037,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
-        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
-            -2, 0, o_textfieldTooltip)
+        ADD_POPUP(o_popup, mainFrame, [self.label frame].size.width,
+                  -2, 0, o_textfieldTooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable];
 
         /* add items */
@@ -1023,9 +1058,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     NSRect frame;
     NSRect superFrame = [self frame];
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_popup frame];
     frame.origin.x = i_xPos + 2;
@@ -1046,10 +1081,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
 
     char **values, **texts;
-    ssize_t count = config_GetPszChoices(VLC_OBJECT(VLCIntf), p_item->psz_name,
+    ssize_t count = config_GetPszChoices(VLC_OBJECT(VLCIntf), self.p_item->psz_name,
                                          &values, &texts);
     for (ssize_t i = 0; i < count && texts; i++) {
         if (texts[i] == NULL || values[i] == NULL)
@@ -1074,9 +1109,17 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface FileConfigControl()
+{
+    NSTextField     *o_textfield;
+    NSButton        *o_button;
+    BOOL            b_directory;
+}
+@end
+
 @implementation FileConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_itemTooltip, *o_textfieldString;
@@ -1085,8 +1128,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_LOADFILE;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_LOADFILE;
 
         o_itemTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1098,13 +1141,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, 3, o_labelString, o_itemTooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, 3, o_labelString, o_itemTooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the button */
         ADD_RIGHT_BUTTON(o_button, mainFrame, 0, 0, o_itemTooltip,
-                            _NS("Browse..."))
+                         _NS("Browse..."))
         [o_button setAutoresizingMask:NSViewMinXMargin ];
         [self addSubview: o_button];
 
@@ -1114,8 +1157,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         else
             o_textfieldString = @"";
         ADD_TEXTFIELD(o_textfield, mainFrame, 12, 2, mainFrame.size.width -
-                        8 - [o_button frame].size.width,
-                        o_itemTooltip, o_textfieldString)
+                      8 - [o_button frame].size.width,
+                      o_itemTooltip, o_textfieldString)
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
         [self addSubview: o_textfield];
     }
@@ -1127,12 +1170,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     ;
 }
 
-- (IBAction)openFileDialog: (id)sender
+- (IBAction)openFileDialog:(id)sender
 {
     NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
 
-    [o_open_panel setTitle: (b_directory)?
-        _NS("Select a directory"):_NS("Select a file")];
+    [o_open_panel setTitle:(b_directory)?
+     _NS("Select a directory"):_NS("Select a file")];
     [o_open_panel setPrompt: _NS("Select")];
     [o_open_panel setAllowsMultipleSelection: NO];
     [o_open_panel setCanChooseFiles: !b_directory];
@@ -1141,7 +1184,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         if (returnCode == NSOKButton) {
             NSString *o_path = [[[o_open_panel URLs] objectAtIndex:0] path];
             [o_textfield setStringValue: o_path];
-        }        
+        }
     }];
 }
 
@@ -1156,7 +1199,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 -(void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(VLCIntf, p_item->psz_name);
+    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = [NSString stringWithFormat: @"%s", psz_value];
     else
@@ -1167,9 +1210,15 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface ModuleConfigControl()
+{
+    NSPopUpButton   *o_popup;
+}
+@end
+
 @implementation ModuleConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_popupTooltip;
@@ -1178,8 +1227,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_MODULE;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_MODULE;
 
         o_popupTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1189,13 +1238,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         else
             o_labelString = @"";
 
-        ADD_LABEL(o_label, mainFrame, 0, -1, o_labelString, o_popupTooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -1, o_labelString, o_popupTooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the popup */
-        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
-            -2, 0, o_popupTooltip)
+        ADD_POPUP(o_popup, mainFrame, [self.label frame].size.width,
+                  -2, 0, o_popupTooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
         [o_popup addItemWithTitle: _NS("Default")];
         [[o_popup lastItem] setTag: -1];
@@ -1211,9 +1260,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     NSRect frame;
     NSRect superFrame = [self frame];
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_popup frame];
     frame.origin.x = i_xPos - 1;
@@ -1254,8 +1303,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     }
     module_list_free(p_list);
 
-    if(returnval == NULL && [newval isEqualToString: _NS("Default")] && p_item->orig.psz != NULL) {
-        returnval = strdup(p_item->orig.psz);
+    if(returnval == NULL && [newval isEqualToString: _NS("Default")] && self.p_item->orig.psz != NULL) {
+        returnval = strdup(self.p_item->orig.psz);
     }
     return returnval;
 }
@@ -1279,12 +1328,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             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) {
+                p_config->value.i == self.p_item->min.i) {
                 NSString *o_description = _NS(module_get_name(p_parser, TRUE));
                 [o_popup addItemWithTitle: o_description];
 
-                if (p_item->value.psz && !strcmp(p_item->value.psz,
-                                                 module_get_object(p_parser)))
+                if (self.p_item->value.psz && !strcmp(self.p_item->value.psz,
+                                                      module_get_object(p_parser)))
                     [o_popup selectItem:[o_popup lastItem]];
             }
         }
@@ -1295,9 +1344,16 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface IntegerConfigControl() <NSTextFieldDelegate>
+{
+    NSTextField     *o_textfield;
+    NSStepper       *o_stepper;
+}
+@end
+
 @implementation IntegerConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1306,8 +1362,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_INTEGER;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_INTEGER;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1316,25 +1372,25 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the stepper */
         ADD_STEPPER(o_stepper, mainFrame, mainFrame.size.width - 19,
-            0, o_tooltip, -100000, 100000)
+                    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, @"")
+                      1, 49, o_tooltip, @"")
         [o_textfield setIntValue: p_item->value.i];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
-            selector: @selector(textfieldChanged:)
-            name: NSControlTextDidChangeNotification
-            object: o_textfield];
+                                                 selector: @selector(textfieldChanged:)
+                                                     name: NSControlTextDidChangeNotification
+                                                   object: o_textfield];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [self addSubview: o_textfield];
     }
@@ -1344,9 +1400,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void) alignWithXPosition:(int)i_xPos
 {
     NSRect frame;
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_textfield frame];
     frame.origin.x = i_xPos + 2;
@@ -1374,16 +1430,22 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 -(void)resetValues
 {
-    [o_textfield setIntValue: config_GetInt(VLCIntf, p_item->psz_name)];
+    [o_textfield setIntValue: config_GetInt(VLCIntf, self.p_item->psz_name)];
     [super resetValues];
 }
 
 @end
 
+@interface IntegerListConfigControl()
+{
+    NSPopUpButton      *o_popup;
+}
+@end
+
 @implementation IntegerListConfigControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_textfieldTooltip;
@@ -1392,8 +1454,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_STRING_LIST;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_STRING_LIST;
 
         o_textfieldTooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1402,18 +1464,18 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
-        ADD_POPUP(o_popup, mainFrame, [o_label frame].size.width,
-            -2, 0, o_textfieldTooltip)
+        ADD_POPUP(o_popup, mainFrame, [self.label frame].size.width,
+                  -2, 0, o_textfieldTooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
 
         /* add items */
         [self resetValues];
-        
+
         [self addSubview: o_popup];
     }
     return self;
@@ -1423,9 +1485,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     NSRect frame;
     NSRect superFrame = [self frame];
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_popup frame];
     frame.origin.x = i_xPos + 2;
@@ -1447,10 +1509,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    int i_current_selection = config_GetInt(VLCIntf, p_item->psz_name);
+    int i_current_selection = config_GetInt(VLCIntf, self.p_item->psz_name);
     int64_t *values;
     char **texts;
-    ssize_t count = config_GetIntChoices(VLC_OBJECT(VLCIntf), p_item->psz_name, &values, &texts);
+    ssize_t count = config_GetIntChoices(VLC_OBJECT(VLCIntf), self.p_item->psz_name, &values, &texts);
     for (ssize_t i = 0; i < count; i++) {
         NSMenuItem *mi = [[NSMenuItem alloc] initWithTitle: toNSStr(texts[i]) action: NULL keyEquivalent: @""];
         [mi setRepresentedObject:[NSNumber numberWithInt:values[i]]];
@@ -1465,9 +1527,18 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 }
 @end
 
+@interface RangedIntegerConfigControl() <NSTextFieldDelegate>
+{
+    NSSlider        *o_slider;
+    NSTextField     *o_textfield;
+    NSTextField     *o_textfield_min;
+    NSTextField     *o_textfield_max;
+}
+@end
+
 @implementation RangedIntegerConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1476,8 +1547,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_RANGED_INTEGER;
+    if ([super initWithFrame: mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_RANGED_INTEGER;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1486,20 +1557,20 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
-        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
-            28, 49, o_tooltip, @"")
+        ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
+                      28, 49, o_tooltip, @"")
         [o_textfield setIntValue: p_item->value.i];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
-            selector: @selector(textfieldChanged:)
-            name: NSControlTextDidChangeNotification
-            object: o_textfield];
+                                                 selector: @selector(textfieldChanged:)
+                                                     name: NSControlTextDidChangeNotification
+                                                   object: o_textfield];
         [self addSubview: o_textfield];
 
         /* build the mintextfield */
@@ -1511,24 +1582,24 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
         /* build the maxtextfield */
         ADD_LABEL(o_textfield_max, mainFrame,
-                    mainFrame.size.width - 31, -30, @"8888", @"")
+                  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 +
-            [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)
+                   [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)
         [o_slider setIntValue: p_item->value.i];
         [o_slider setAutoresizingMask:NSViewWidthSizable ];
         [o_slider setTarget: self];
         [o_slider setAction: @selector(sliderChanged:)];
         [o_slider sendActionOn:NSLeftMouseUpMask | NSLeftMouseDownMask |
-            NSLeftMouseDraggedMask];
+         NSLeftMouseDraggedMask];
         [self addSubview: o_slider];
 
     }
@@ -1538,9 +1609,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void) alignWithXPosition:(int)i_xPos
 {
     NSRect frame;
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_textfield frame];
     frame.origin.x = i_xPos + 2;
@@ -1564,16 +1635,23 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    int value = config_GetInt(VLCIntf, p_item->psz_name);
+    int value = config_GetInt(VLCIntf, self.p_item->psz_name);
     [o_textfield setIntValue:value];
     [o_slider setIntValue:value];
     [super resetValues];
 }
 @end
 
+@interface FloatConfigControl() <NSTextFieldDelegate>
+{
+    NSTextField     *o_textfield;
+    NSStepper       *o_stepper;
+}
+@end
+
 @implementation FloatConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1582,8 +1660,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_INTEGER;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_INTEGER;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1592,26 +1670,26 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -2, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -2, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the stepper */
         ADD_STEPPER(o_stepper, mainFrame, mainFrame.size.width - 19,
-            0, o_tooltip, -100000, 100000)
+                    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, @"")
+                      1, 49, o_tooltip, @"")
         [o_textfield setFloatValue: p_item->value.f];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
-            selector: @selector(textfieldChanged:)
-            name: NSControlTextDidChangeNotification
-            object: o_textfield];
+                                                 selector: @selector(textfieldChanged:)
+                                                     name: NSControlTextDidChangeNotification
+                                                   object: o_textfield];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [self addSubview: o_textfield];
     }
@@ -1621,9 +1699,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void) alignWithXPosition:(int)i_xPos
 {
     NSRect frame;
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_textfield frame];
     frame.origin.x = i_xPos + 2;
@@ -1651,14 +1729,23 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_textfield setFloatValue: config_GetFloat(VLCIntf, p_item->psz_name)];
+    [o_textfield setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
     [super resetValues];
 }
 @end
 
+@interface RangedFloatConfigControl() <NSTextFieldDelegate>
+{
+    NSSlider        *o_slider;
+    NSTextField     *o_textfield;
+    NSTextField     *o_textfield_min;
+    NSTextField     *o_textfield_max;
+}
+@end
+
 @implementation RangedFloatConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1667,8 +1754,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_RANGED_INTEGER;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_RANGED_INTEGER;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1677,20 +1764,20 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
-        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
-            28, 49, o_tooltip, @"")
+        ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
+                      28, 49, o_tooltip, @"")
         [o_textfield setFloatValue: p_item->value.f];
         [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
-            selector: @selector(textfieldChanged:)
-            name: NSControlTextDidChangeNotification
-            object: o_textfield];
+                                                 selector: @selector(textfieldChanged:)
+                                                     name: NSControlTextDidChangeNotification
+                                                   object: o_textfield];
         [self addSubview: o_textfield];
 
         /* build the mintextfield */
@@ -1702,24 +1789,24 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
         /* build the maxtextfield */
         ADD_LABEL(o_textfield_max, mainFrame, mainFrame.size.width - 31,
-            -30, @"8888", @"")
+                  -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 +
-            [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)
+                   [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)
         [o_slider setFloatValue: p_item->value.f];
         [o_slider setAutoresizingMask:NSViewWidthSizable ];
         [o_slider setTarget: self];
         [o_slider setAction: @selector(sliderChanged:)];
         [o_slider sendActionOn:NSLeftMouseUpMask | NSLeftMouseDownMask |
-            NSLeftMouseDraggedMask];
+         NSLeftMouseDraggedMask];
         [self addSubview: o_slider];
 
     }
@@ -1729,9 +1816,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void) alignWithXPosition:(int)i_xPos
 {
     NSRect frame;
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_textfield frame];
     frame.origin.x = i_xPos + 2;
@@ -1755,16 +1842,22 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_textfield setFloatValue: config_GetFloat(VLCIntf, p_item->psz_name)];
-    [o_slider setFloatValue: config_GetFloat(VLCIntf, p_item->psz_name)];
+    [o_textfield setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
+    [o_slider setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
     [super resetValues];
 }
 @end
 
+@interface BoolConfigControl()
+{
+    NSButton        *o_checkbox;
+}
+@end
+
 @implementation BoolConfigControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1773,8 +1866,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_BOOL;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_BOOL;
 
         if (p_item->psz_text)
             o_labelString = _NS((char *)p_item->psz_text);
@@ -1785,7 +1878,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
         /* add the checkbox */
         ADD_CHECKBOX(o_checkbox, mainFrame, 0,
-                        0, o_labelString, o_tooltip, p_item->value.i, NSImageLeft)
+                     0, o_labelString, o_tooltip, p_item->value.i, NSImageLeft)
         [o_checkbox setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_checkbox];
     }
@@ -1799,14 +1892,20 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_checkbox setState: config_GetInt(VLCIntf, p_item->psz_name)];
+    [o_checkbox setState: config_GetInt(VLCIntf, self.p_item->psz_name)];
     [super resetValues];
 }
 @end
 
+@interface KeyConfigControl()
+{
+    NSPopUpButton   *o_popup;
+}
+@end
+
 @implementation KeyConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -1815,8 +1914,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_KEY;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_KEY;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -1825,14 +1924,14 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -1, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -1, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the popup */
-        ADD_POPUP(o_popup, mainFrame, [o_label frame].origin.x +
-            [o_label frame].size.width + 3,
-            -2, 0, o_tooltip)
+        ADD_POPUP(o_popup, mainFrame, [self.label frame].origin.x +
+                  [self.label frame].size.width + 3,
+                  -2, 0, o_tooltip)
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
 
         if (o_keys_menu == nil) {
@@ -1843,10 +1942,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             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],
+                                   [NSString stringWithUTF8String:vlc_key[i].psz_key_string],
                                    vlc_key[i].i_key_code)
 #endif
-        }
+                    }
         [o_popup setMenu:[o_keys_menu copyWithZone:nil]];
         [o_popup selectItem:[[o_popup menu] itemWithTag:p_item->value.i]];
         [self addSubview: o_popup];
@@ -1859,9 +1958,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     NSRect frame;
     NSRect superFrame = [self frame];
-    frame = [o_label frame];
+    frame = [self.label frame];
     frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
+    [self.label setFrame:frame];
 
     frame = [o_popup frame];
     frame.origin.x = i_xPos - 1;
@@ -1876,16 +1975,24 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (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, self.p_item->psz_name)]];
     [super resetValues];
 }
 @end
 
+@interface ModuleListConfigControl() <NSTextFieldDelegate, NSTableViewDataSource>
+{
+    NSTextField     *o_textfield;
+    NSTableView     *o_tableview;
+    NSMutableArray  *o_modulearray;
+}
+@end
+
 @implementation ModuleListConfigControl
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
-    BOOL b_by_cat = _p_item->i_type == CONFIG_ITEM_MODULE_LIST_CAT;
+    BOOL b_by_cat = p_item->i_type == CONFIG_ITEM_MODULE_LIST_CAT;
 
     //Fill our array to know how may items we have...
     module_t *p_parser, **p_list;
@@ -1916,13 +2023,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
                 /* Hack: required subcategory is stored in i_min */
                 if (p_config->i_type == CONFIG_SUBCATEGORY &&
-                    p_config->value.i == _p_item->min.i) {
+                    p_config->value.i == p_item->min.i) {
 
                     o_modulelongname = [NSString stringWithUTF8String: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)))
+                    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];
@@ -1937,15 +2044,15 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
                  * 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) {
+                    !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]]
+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");
@@ -1957,14 +2064,14 @@ else\
             module_config_free(p_configlist);
 
 
-        } else if (module_provides(p_parser, _p_item->psz_type)) {
+        } else if (module_provides(p_parser, p_item->psz_type)) {
 
             NSString *o_modulelongname = toNSStr(module_get_name(p_parser, TRUE));
             NSString *o_modulename = toNSStr(module_get_object(p_parser));
 
             NSNumber *o_moduleenabled = nil;
-            if (_p_item->value.psz &&
-                strstr(_p_item->value.psz, 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];
@@ -2025,8 +2132,8 @@ else\
     mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        i_view_type = CONFIG_ITEM_MODULE_LIST;
+    if ([super initWithFrame:mainFrame item:p_item] != nil) {
+        self.viewType = CONFIG_ITEM_MODULE_LIST;
 
         o_tooltip = [[VLCStringUtility sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
 
@@ -2035,18 +2142,18 @@ else\
             o_labelString = _NS((char *)p_item->psz_text);
         else
             o_labelString = @"";
-        ADD_LABEL(o_label, mainFrame, 0, -3, o_labelString, o_tooltip)
-        [o_label setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_label];
+        ADD_LABEL(self.label, mainFrame, 0, -3, o_labelString, o_tooltip)
+        [self.label setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: self.label];
 
         /* build the textfield */
         if (p_item->value.psz)
             o_textfieldString = _NS((char *)p_item->value.psz);
         else
             o_textfieldString = @"";
-        ADD_TEXTFIELD(o_textfield, mainFrame, [o_label frame].size.width + 2,
+        ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
                       mainFrame.size.height - 22, mainFrame.size.width -
-                      [o_label frame].size.width - 2, o_tooltip, o_textfieldString)
+                      [self.label frame].size.width - 2, o_tooltip, o_textfieldString)
         [o_textfield setAutoresizingMask:NSViewWidthSizable ];
         [self addSubview: o_textfield];
 
@@ -2066,14 +2173,14 @@ else\
     NSUInteger count = [o_modulearray count];
     for (NSUInteger i = 0 ; i < count ; i++)
         if ([[[o_modulearray objectAtIndex:i] objectAtIndex:2]
-            boolValue] != NO) {
+             boolValue] != NO) {
             o_newstring = [o_newstring stringByAppendingString:
-                [[o_modulearray objectAtIndex:i] objectAtIndex:0]];
+                           [[o_modulearray objectAtIndex:i] objectAtIndex:0]];
             o_newstring = [o_newstring stringByAppendingString:@":"];
         }
 
     [o_textfield setStringValue: [o_newstring
-        substringToIndex: ([o_newstring length])?[o_newstring length] - 1:0]];
+                                  substringToIndex:([o_newstring length])?[o_newstring length] - 1:0]];
 }
 
 - (char *)stringValue
@@ -2093,7 +2200,7 @@ else\
 @implementation ModuleListConfigControl (NSTableDataSource)
 
 - (BOOL)tableView:(NSTableView*)table writeRows:(NSArray*)rows
-    toPasteboard:(NSPasteboard*)pb
+     toPasteboard:(NSPasteboard*)pb
 {
     // We only want to allow dragging of selected rows.
     NSEnumerator    *iter = [rows objectEnumerator];
@@ -2109,8 +2216,8 @@ else\
 }
 
 - (NSDragOperation)tableView:(NSTableView*)table
-    validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row
-    proposedDropOperation:(NSTableViewDropOperation)op
+                validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row
+       proposedDropOperation:(NSTableViewDropOperation)op
 {
     // Make drops at the end of the table go to the end.
     if (row == -1) {
@@ -2126,7 +2233,7 @@ else\
 }
 
 - (BOOL)tableView:(NSTableView*)table acceptDrop:(id <NSDraggingInfo>)info
-    row:(NSInteger)dropRow dropOperation:(NSTableViewDropOperation)op;
+              row:(NSInteger)dropRow dropOperation:(NSTableViewDropOperation)op;
 {
     NSPasteboard    *pb = [info draggingPasteboard];
     NSDragOperation srcMask = [info draggingSourceOperationMask];
@@ -2134,45 +2241,45 @@ else\
 
     NS_DURING
 
-        NSArray *array;
-
-        // Intra-table drag - data is the array of rows.
-        if (!accepted && (array =
-            [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) {
-                NSArray *o_tmp = [[o_modulearray objectAtIndex:
-                    [val intValue]] mutableCopyWithZone:nil];
-                [o_modulearray removeObject:o_tmp];
-                [o_modulearray insertObject:o_tmp
-                    atIndex:(dropRow>[val intValue]) ? dropRow - 1 : dropRow];
-                dropRow++;
-            }
+    NSArray *array;
+
+    // Intra-table drag - data is the array of rows.
+    if (!accepted && (array =
+                      [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) {
+            NSArray *o_tmp = [[o_modulearray objectAtIndex:
+                               [val intValue]] mutableCopyWithZone:nil];
+            [o_modulearray removeObject:o_tmp];
+            [o_modulearray insertObject:o_tmp
+                                atIndex:(dropRow>[val intValue]) ? dropRow - 1 : dropRow];
+            dropRow++;
+        }
 
-            // Select the newly-dragged items.
-            iter = [array objectEnumerator];
-//TODO...
-            [table deselectAll:self];
+        // Select the newly-dragged items.
+        iter = [array objectEnumerator];
+        //TODO...
+        [table deselectAll:self];
 
-            [self tableChanged:self];
-            [table setNeedsDisplay:YES];
-            // Indicate that we finished the drag.
-            accepted = YES;
-        }
-        [table reloadData];
+        [self tableChanged:self];
         [table setNeedsDisplay:YES];
+        // Indicate that we finished the drag.
+        accepted = YES;
+    }
+    [table reloadData];
+    [table setNeedsDisplay:YES];
 
-        NS_HANDLER
+    NS_HANDLER
 
-            // An exception occurred. Uh-oh. Update the track table so that
-            // it stays consistent, and re-raise the exception.
-            [table reloadData];
-            [localException raise];
-            [table setNeedsDisplay:YES];
+    // An exception occurred. Uh-oh. Update the track table so that
+    // it stays consistent, and re-raise the exception.
+    [table reloadData];
+    [localException raise];
+    [table setNeedsDisplay:YES];
     NS_ENDHANDLER
 
     return accepted;
@@ -2184,7 +2291,7 @@ else\
 }
 
 - (id)tableView:(NSTableView *)aTableView
-    objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
 {
     if ([[aTableColumn identifier] isEqualToString: @"Enabled"])
         return [[o_modulearray objectAtIndex:rowIndex] objectAtIndex:2];
@@ -2195,17 +2302,17 @@ else\
 }
 
 - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject
-    forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+   forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
 {
     [[o_modulearray objectAtIndex:rowIndex] replaceObjectAtIndex:2
-        withObject: anObject];
+                                                      withObject: anObject];
 }
 @end
 
 @implementation SectionControl
 
-- (id) initWithItem: (module_config_t *)_p_item
-           withView: (NSView *)o_parent_view
+- (id)initWithitem:(module_config_t *)p_item
+          withView:(NSView *)o_parent_view
 {
     NSRect mainFrame = [o_parent_view frame];
     NSString *o_labelString, *o_tooltip;
@@ -2214,29 +2321,30 @@ else\
     mainFrame.origin.x = LEFTMARGIN;
     mainFrame.origin.y = 0;
 
-    if ([super initWithFrame: mainFrame item: _p_item] != nil) {
-        
+    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];
+                                        [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];
+        ADD_LABEL(self.label, mainFrame, 1, 0, @"", @"")
+        [self.label setAttributedStringValue: o_bold_string];
+        [self.label sizeToFit];
         
-        [o_label setAutoresizingMask:NSViewNotSizable];
-        [self addSubview: o_label];
+        [self.label setAutoresizingMask:NSViewNotSizable];
+        [self addSubview: self.label];
     }
     return self;
 }
 
 @end
 
+//#undef CONFIG_ITEM_LIST_STRING
+//#undef CONFIG_ITEM_RANGED_INTEGER
index 83d59e2..f0e51a0 100644 (file)
     IBOutlet NSPopUpButton *o_urlhandler_smb_pop;
     IBOutlet NSPopUpButton *o_urlhandler_udp_pop;
     IBOutlet id o_urlhandler_win;
-
-    BOOL b_audioSettingChanged;
-    BOOL b_intfSettingChanged;
-    BOOL b_videoSettingChanged;
-    BOOL b_osdSettingChanged;
-    BOOL b_inputSettingChanged;
-    BOOL b_hotkeyChanged;
-    id o_currentlyShownCategoryView;
-
-    NSOpenPanel *o_selectFolderPanel;
-    NSArray *o_hotkeyDescriptions;
-    NSArray *o_hotkeyNames;
-    NSArray *o_hotkeysNonUseableKeys;
-    NSMutableArray *o_hotkeySettings;
-    NSString *o_keyInTransition;
-
-    intf_thread_t *p_intf;
 }
 + (VLCSimplePrefs *)sharedInstance;
 
 /* toolbar */
-- (NSToolbarItem *) toolbar: (NSToolbar *)o_toolbar
-      itemForItemIdentifier: (NSString *)o_itemIdent
 willBeInsertedIntoToolbar: (BOOL)b_willBeInserted;
-- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar;
-- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar;
+- (NSToolbarItem *)toolbar:(NSToolbar *)o_toolbar
+     itemForItemIdentifier:(NSString *)o_itemIdent
willBeInsertedIntoToolbar:(BOOL)b_willBeInserted;
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar;
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar;
 
-- (void)initStrings;
-- (void)resetControls;
 - (void)showSimplePrefs;
 - (void)showSimplePrefsWithLevel:(NSInteger)i_window_level;
 
          returnCode:(int)i_return
         contextInfo:(void *)o_context;
 
-- (void)saveChangedSettings;
-
 /* interface */
 - (IBAction)interfaceSettingChanged:(id)sender;
-- (void)showInterfaceSettings;
 
 /* audio */
 - (IBAction)audioSettingChanged:(id)sender;
-- (void)showAudioSettings;
 
 /* video */
 - (IBAction)videoSettingChanged:(id)sender;
-- (void)showVideoSettings;
 
 /* OSD / subtitles */
 - (IBAction)osdSettingChanged:(id)sender;
 - (IBAction)showFontPicker:(id)sender;
-- (void)showOSDSettings;
 - (void)changeFont:(id)sender;
 
 /* input & codecs */
 - (IBAction)inputSettingChanged:(id)sender;
-- (void)showInputSettings;
 - (IBAction)urlHandlerAction:(id)sender;
 
 /* hotkeys */
 - (IBAction)hotkeySettingChanged:(id)sender;
-- (void)showHotkeySettings;
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
 - (BOOL)changeHotkeyTo: (NSString *)theKey;
 
 @end
index 4296a10..1deb83a 100644 (file)
@@ -179,6 +179,27 @@ static NSString* VLCOSDSettingToolbarIdentifier = @"Subtitles Settings Item Iden
 static NSString* VLCInputSettingToolbarIdentifier = @"Input Settings Item Identifier";
 static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Identifier";
 
+@interface VLCSimplePrefs()
+{
+    BOOL b_audioSettingChanged;
+    BOOL b_intfSettingChanged;
+    BOOL b_videoSettingChanged;
+    BOOL b_osdSettingChanged;
+    BOOL b_inputSettingChanged;
+    BOOL b_hotkeyChanged;
+    id o_currentlyShownCategoryView;
+
+    NSOpenPanel *o_selectFolderPanel;
+    NSArray *o_hotkeyDescriptions;
+    NSArray *o_hotkeyNames;
+    NSArray *o_hotkeysNonUseableKeys;
+    NSMutableArray *o_hotkeySettings;
+    NSString *o_keyInTransition;
+
+    intf_thread_t *p_intf;
+}
+@end
+
 @implementation VLCSimplePrefs
 
 static VLCSimplePrefs *_o_sharedInstance = nil;
index 2bd7bb1..7872d58 100644 (file)
     IBOutlet id o_t8_txt_ttl;
     IBOutlet id o_t8_txt_mrl;
     IBOutlet id o_t8_txt_local;
-
-    NSMutableDictionary * o_userSelections;
-    NSArray * o_videoCodecs;
-    NSArray * o_audioCodecs;
-    NSArray * o_encapFormats;
-    NSArray * o_strmgMthds;
-    NSString * o_opts;
 }
++ (VLCWizard *)sharedInstance;
+
+- (void)showWizard;
+- (void)resetWizard;
+
+- (id)playlistWizard;
+- (void)initWithExtractValuesFrom:(NSString *)from
+                               to:(NSString *)to
+                           ofItem:(NSString *)item;
+
 - (IBAction)cancelRun:(id)sender;
 - (IBAction)nextTab:(id)sender;
 - (IBAction)prevTab:(id)sender;
 - (IBAction)t67_mrInfo_local:(id)sender;
 - (IBAction)t7_selectTrnscdDestFile:(id)sender;
 
-+ (VLCWizard *)sharedInstance;
-
-- (void)showWizard;
-- (void)showSummary;
-- (void)resetWizard;
-- (void)createOpts;
-- (void)rebuildCodecMenus;
-- (id)playlistWizard;
-- (void)initWithExtractValuesFrom: (NSString *)from to: (NSString *)to ofItem: (NSString *)item;
-
 @end
index e8ace7c..77eb79b 100644 (file)
  * VLCWizard implementation
  *****************************************************************************/
 
+@interface VLCWizard()
+{
+    NSMutableDictionary * o_userSelections;
+    NSArray * o_videoCodecs;
+    NSArray * o_audioCodecs;
+    NSArray * o_encapFormats;
+    NSArray * o_strmgMthds;
+    NSString * o_opts;
+}
+@end
+
 @implementation VLCWizard
 
 static VLCWizard *_o_sharedInstance = nil;