Commit ade1ff28 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: GUI demo of Simple Preferences showing the Interface and Audio...

macosx: GUI demo of Simple Preferences showing the Interface and Audio categories. Feedback is welcome.
parent bcca390d
......@@ -304,6 +304,7 @@
"o_mi_show_all" = id;
"o_mi_slower" = id;
"o_mi_snapshot" = id;
"o_mi_sprefs" = id;
"o_mi_stop" = id;
"o_mi_subtitle" = id;
"o_mi_title" = id;
......
......@@ -25,13 +25,13 @@
<array/>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>2197</integer>
<integer>1789</integer>
<integer>2769</integer>
<integer>21</integer>
<integer>2730</integer>
<integer>29</integer>
<integer>2416</integer>
<integer>1789</integer>
<integer>29</integer>
<integer>2197</integer>
</array>
<key>IBSystem Version</key>
<string>8S2167</string>
......
......@@ -2,6 +2,7 @@
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{CLASS = NSDatePicker; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
{
ACTIONS = {showPanel = id; };
CLASS = VLAboutBox;
......@@ -441,6 +442,54 @@
"o_tree" = id;
};
SUPERCLASS = NSObject;
},
{
ACTIONS = {audioSettingChanged = id; buttonAction = id; interfaceSettingChanged = id; };
CLASS = VLCSimplePrefs;
LANGUAGE = ObjC;
OUTLETS = {
"o_audio_dolby_pop" = id;
"o_audio_dolby_txt" = id;
"o_audio_effects_box" = id;
"o_audio_enable_ckb" = id;
"o_audio_general_box" = id;
"o_audio_headphone_ckb" = id;
"o_audio_lang_fld" = id;
"o_audio_lang_txt" = id;
"o_audio_last_box" = id;
"o_audio_last_ckb" = id;
"o_audio_lastpwd_fld" = id;
"o_audio_lastpwd_txt" = id;
"o_audio_lastuser_fld" = id;
"o_audio_lastuser_txt" = id;
"o_audio_norm_ckb" = id;
"o_audio_norm_fld" = id;
"o_audio_spdif_ckb" = id;
"o_audio_view" = id;
"o_audio_visual_pop" = id;
"o_audio_visual_txt" = id;
"o_audio_vol_fld" = id;
"o_audio_vol_sld" = id;
"o_audio_vol_txt" = id;
"o_intf_art_pop" = id;
"o_intf_art_txt" = id;
"o_intf_black_ckb" = id;
"o_intf_embvout_ckb" = id;
"o_intf_fspanel_ckb" = id;
"o_intf_lang_pop" = id;
"o_intf_lang_txt" = id;
"o_intf_meta_ckb" = id;
"o_intf_network_box" = id;
"o_intf_view" = id;
"o_sprefs_basicFull_matrix" = id;
"o_sprefs_basic_box" = id;
"o_sprefs_cancel_btn" = id;
"o_sprefs_controls_box" = id;
"o_sprefs_reset_btn" = id;
"o_sprefs_save_btn" = id;
"o_sprefs_win" = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
......
......@@ -3,9 +3,26 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>179 90 505 518 0 0 1280 1002 </string>
<string>398 124 505 518 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2311</key>
<string>310 385 660 305 0 0 1280 778 </string>
<key>2330</key>
<string>190 210 660 502 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>439.0</string>
<string>446.1</string>
<key>IBGroupedObjects</key>
<dict>
<key>1</key>
<array>
<string>2352</string>
<string>2353</string>
</array>
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBLockedObjects</key>
<array>
<integer>2203</integer>
......@@ -15,9 +32,10 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>1530</integer>
<integer>2265</integer>
<integer>2330</integer>
</array>
<key>IBSystem Version</key>
<string>8C46</string>
<string>8S2167</string>
</dict>
</plist>
......@@ -68,6 +68,12 @@
C2F2A707095AE51700018C74 /* play_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = C2F2A703095AE51600018C74 /* play_embedded_blue.png */; };
C2F2A708095AE51700018C74 /* skip_forward_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = C2F2A704095AE51600018C74 /* skip_forward_embedded_blue.png */; };
C2F2A709095AE51700018C74 /* skip_previous_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = C2F2A705095AE51600018C74 /* skip_previous_embedded_blue.png */; };
CC0B723D0D54F2B000448E00 /* spref_cone_Audio_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B72370D54F2B000448E00 /* spref_cone_Audio_64.png */; };
CC0B723E0D54F2B000448E00 /* spref_cone_Hotkeys_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B72380D54F2B000448E00 /* spref_cone_Hotkeys_64.png */; };
CC0B723F0D54F2B100448E00 /* spref_cone_Input_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B72390D54F2B000448E00 /* spref_cone_Input_64.png */; };
CC0B72400D54F2B100448E00 /* spref_cone_Interface_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B723A0D54F2B000448E00 /* spref_cone_Interface_64.png */; };
CC0B72410D54F2B100448E00 /* spref_cone_Subtitles_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B723B0D54F2B000448E00 /* spref_cone_Subtitles_64.png */; };
CC0B72420D54F2B100448E00 /* spref_cone_Video_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0B723C0D54F2B000448E00 /* spref_cone_Video_64.png */; };
CC1941250B9C1F8400635F6B /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1941240B9C1F8400635F6B /* QTKit.framework */; };
CC1AC1BC0A7BDA41002478C3 /* InteractionErrorPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC1AC1BA0A7BDA41002478C3 /* InteractionErrorPanel.nib */; };
CC1B4B4D09A8CF9E0078AD2E /* Interaction.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC1B4B4B09A8CF9E0078AD2E /* Interaction.nib */; };
......@@ -1067,6 +1073,12 @@
C2F2A703095AE51600018C74 /* play_embedded_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = play_embedded_blue.png; path = Resources/play_embedded_blue.png; sourceTree = "<group>"; };
C2F2A704095AE51600018C74 /* skip_forward_embedded_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = skip_forward_embedded_blue.png; path = Resources/skip_forward_embedded_blue.png; sourceTree = "<group>"; };
C2F2A705095AE51600018C74 /* skip_previous_embedded_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = skip_previous_embedded_blue.png; path = Resources/skip_previous_embedded_blue.png; sourceTree = "<group>"; };
CC0B72370D54F2B000448E00 /* spref_cone_Audio_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Audio_64.png; path = Resources/spref_cone_Audio_64.png; sourceTree = "<group>"; };
CC0B72380D54F2B000448E00 /* spref_cone_Hotkeys_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Hotkeys_64.png; path = Resources/spref_cone_Hotkeys_64.png; sourceTree = "<group>"; };
CC0B72390D54F2B000448E00 /* spref_cone_Input_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Input_64.png; path = Resources/spref_cone_Input_64.png; sourceTree = "<group>"; };
CC0B723A0D54F2B000448E00 /* spref_cone_Interface_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Interface_64.png; path = Resources/spref_cone_Interface_64.png; sourceTree = "<group>"; };
CC0B723B0D54F2B000448E00 /* spref_cone_Subtitles_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Subtitles_64.png; path = Resources/spref_cone_Subtitles_64.png; sourceTree = "<group>"; };
CC0B723C0D54F2B000448E00 /* spref_cone_Video_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Video_64.png; path = Resources/spref_cone_Video_64.png; sourceTree = "<group>"; };
CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
CC1AC1BB0A7BDA41002478C3 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/InteractionErrorPanel.nib; sourceTree = "<group>"; };
CC1B4B4C09A8CF9E0078AD2E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/Interaction.nib; sourceTree = "<group>"; };
......@@ -1107,6 +1119,8 @@
CC6EDD4F0B9CA2140096068A /* eyetv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = eyetv.h; path = ../../modules/gui/macosx/eyetv.h; sourceTree = SOURCE_ROOT; };
CC6EDD500B9CA2140096068A /* eyetv.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = eyetv.m; path = ../../modules/gui/macosx/eyetv.m; sourceTree = SOURCE_ROOT; };
CC962E2C0CC7992800A56695 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
CCB24D5D0D54BBAE004D780C /* simple_prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = simple_prefs.m; path = ../../modules/gui/macosx/simple_prefs.m; sourceTree = SOURCE_ROOT; };
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_prefs.h; path = ../../modules/gui/macosx/simple_prefs.h; sourceTree = SOURCE_ROOT; };
CCC593780AB4A9FB0004FF52 /* embeddedwindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = embeddedwindow.h; path = ../../modules/gui/macosx/embeddedwindow.h; sourceTree = SOURCE_ROOT; };
CCC593790AB4A9FB0004FF52 /* embeddedwindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = embeddedwindow.m; path = ../../modules/gui/macosx/embeddedwindow.m; sourceTree = SOURCE_ROOT; };
CCCB86C00ACFDFB300CF1E10 /* fs_time_slider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = fs_time_slider.png; path = Resources/fs_time_slider.png; sourceTree = "<group>"; };
......@@ -1208,6 +1222,7 @@
8ECA7E520563CD9500DFC000 /* Controller */,
F69B0CA602E24F6401A80112 /* InfoPlist.strings */,
8EBF3FA303F13FFB0059A3A7 /* vlc.scriptSuite */,
CC0B71E00D54F0DD00448E00 /* simple prefs (taken from qt4) */,
8EBF3FA503F140960059A3A7 /* vlc.scriptTerminology */,
8EDAC3430440F72D0059A3A7 /* README.MacOSX.rtf */,
);
......@@ -1266,6 +1281,8 @@
2AEF857709A5FEC900130822 /* fspanel.m */,
CC6EDD4F0B9CA2140096068A /* eyetv.h */,
CC6EDD500B9CA2140096068A /* eyetv.m */,
CCB24D5D0D54BBAE004D780C /* simple_prefs.m */,
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */,
);
name = Classes;
sourceTree = "<group>";
......@@ -1346,6 +1363,19 @@
name = Controller;
sourceTree = "<group>";
};
CC0B71E00D54F0DD00448E00 /* simple prefs (taken from qt4) */ = {
isa = PBXGroup;
children = (
CC0B72370D54F2B000448E00 /* spref_cone_Audio_64.png */,
CC0B72380D54F2B000448E00 /* spref_cone_Hotkeys_64.png */,
CC0B72390D54F2B000448E00 /* spref_cone_Input_64.png */,
CC0B723A0D54F2B000448E00 /* spref_cone_Interface_64.png */,
CC0B723B0D54F2B000448E00 /* spref_cone_Subtitles_64.png */,
CC0B723C0D54F2B000448E00 /* spref_cone_Video_64.png */,
);
name = "simple prefs (taken from qt4)";
sourceTree = "<group>";
};
CC33C26C0D257958008C4683 /* embedded */ = {
isa = PBXGroup;
children = (
......@@ -1642,6 +1672,12 @@
CC33C25F0D2578F5008C4683 /* stop_graphite.png in Resources */,
CC33C2600D2578F5008C4683 /* volumeslider_graphite.png in Resources */,
CC33C2610D2578F5008C4683 /* fullscreen_graphite.png in Resources */,
CC0B723D0D54F2B000448E00 /* spref_cone_Audio_64.png in Resources */,
CC0B723E0D54F2B000448E00 /* spref_cone_Hotkeys_64.png in Resources */,
CC0B723F0D54F2B100448E00 /* spref_cone_Input_64.png in Resources */,
CC0B72400D54F2B100448E00 /* spref_cone_Interface_64.png in Resources */,
CC0B72410D54F2B100448E00 /* spref_cone_Subtitles_64.png in Resources */,
CC0B72420D54F2B100448E00 /* spref_cone_Video_64.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -31,6 +31,8 @@ SOURCES_macosx = \
prefs.h \
prefs_widgets.h \
prefs_widgets.m \
simple_prefs.h \
simple_prefs.m \
output.h \
output.m \
vout.m \
......
......@@ -97,6 +97,7 @@ struct intf_sys_t
{
intf_thread_t *p_intf; /* The main intf object */
id o_prefs; /* VLCPrefs */
id o_sprefs; /* VLCSimplePrefs */
id o_about; /* VLAboutBox */
id o_open; /* VLCOpen */
id o_wizard; /* VLCWizard */
......@@ -161,6 +162,7 @@ struct intf_sys_t
IBOutlet id o_mi_about;
IBOutlet id o_mi_prefs;
IBOutlet id o_mi_sprefs;
IBOutlet id o_mi_checkForUpdate;
IBOutlet id o_mi_add_intf;
IBOutlet id o_mu_add_intf;
......@@ -309,6 +311,8 @@ struct intf_sys_t
- (void)controlTintChanged;
- (id)getControls;
- (id)getSimplePreferences;
- (id)getPreferences;
- (id)getPlaylist;
- (id)getInfo;
- (id)getWizard;
......
......@@ -49,6 +49,7 @@
#import "update.h"
#import "AppleRemote.h"
#import "eyetv.h"
#import "simple_prefs.h"
#import <vlc_input.h>
......@@ -808,7 +809,7 @@ static VLCMain *_o_sharedMainInstance = nil;
{
o_str = [[[NSString alloc] initWithUTF8String: psz] autorelease];
if ( o_str == NULL )
if( o_str == NULL )
{
msg_Err( VLCIntf, "could not translate: %s", psz );
return( @"" );
......@@ -826,7 +827,7 @@ static VLCMain *_o_sharedMainInstance = nil;
/* When user click in the Dock icon our double click in the finder */
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)hasVisibleWindows
{
if (!hasVisibleWindows)
if(!hasVisibleWindows)
[o_window makeKeyAndOrderFront:self];
return YES;
......@@ -836,7 +837,7 @@ static VLCMain *_o_sharedMainInstance = nil;
{
#ifdef UPDATE_CHECK
/* Check for update silently on startup */
if ( !nib_update_loaded )
if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self];
// FIXME
......@@ -864,7 +865,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)computerWillSleep: (NSNotification *)notification
{
/* Pause */
if ( p_intf->p_sys->i_play_status == PLAYING_S )
if( p_intf->p_sys->i_play_status == PLAYING_S )
{
vlc_value_t val;
val.i_int = config_GetInt( p_intf, "key-play-pause" );
......@@ -876,7 +877,7 @@ static VLCMain *_o_sharedMainInstance = nil;
increase/decrease as long as the user holds the left/right, plus/minus button */
- (void) executeHoldActionForRemoteButton: (NSNumber*) buttonIdentifierNumber
{
if (b_remote_button_hold)
if(b_remote_button_hold)
{
switch([buttonIdentifierNumber intValue])
{
......@@ -893,7 +894,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_controls volumeDown: self];
break;
}
if (b_remote_button_hold)
if(b_remote_button_hold)
{
/* trigger event */
[self performSelector:@selector(executeHoldActionForRemoteButton:)
......@@ -911,7 +912,7 @@ static VLCMain *_o_sharedMainInstance = nil;
switch( buttonIdentifier )
{
case kRemoteButtonPlay:
if (count >= 2) {
if(count >= 2) {
[o_controls toogleFullscreen:self];
} else {
[o_controls play: self];
......@@ -957,7 +958,7 @@ static VLCMain *_o_sharedMainInstance = nil;
allowLossyConversion: NO];
char * psz_string;
if ( o_data == nil )
if( o_data == nil )
{
o_data = [id dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: YES];
......@@ -1007,7 +1008,7 @@ static VLCMain *_o_sharedMainInstance = nil;
effectiveRange: &effectiveRange];
charRange = [o_layout_manager characterRangeForGlyphRange: effectiveRange
actualGlyphRange: &effectiveRange];
if ([o_wrapped lineRangeForRange:
if([o_wrapped lineRangeForRange:
NSMakeRange(charRange.location + breaksInserted, charRange.length)].length > charRange.length) {
[o_wrapped insertString: @"\n" atIndex: NSMaxRange(charRange) + breaksInserted];
breaksInserted++;
......@@ -1081,62 +1082,79 @@ static VLCMain *_o_sharedMainInstance = nil;
- (id)getControls
{
if ( o_controls )
{
if( o_controls )
return o_controls;
}
return nil;
}
- (id)getSimplePreferences
{
if( !o_sprefs )
return nil;
if( !nib_prefs_loaded )
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self];
return o_sprefs;
}
- (id)getPreferences
{
if( !o_prefs )
return nil;
if( !nib_prefs_loaded )
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self];
return o_prefs;
}
- (id)getPlaylist
{
if( o_playlist )
return o_playlist;
return nil;
}
- (id)getInfo
{
if ( o_info )
{
if( o_info )
return o_info;
}
return nil;
}
- (id)getWizard
{
if ( o_wizard )
{
if( o_wizard )
return o_wizard;
}
return nil;
}
- (id)getBookmarks
{
if ( o_bookmarks )
{
if( o_bookmarks )
return o_bookmarks;
}
return nil;
}
- (id)getEmbeddedList
{
if( o_embedded_list )
{
return o_embedded_list;
}
return nil;
}
- (id)getInteractionList
{
if( o_interaction_list )
{
return o_interaction_list;
}
return nil;
}
......@@ -1145,7 +1163,6 @@ static VLCMain *_o_sharedMainInstance = nil;
if( o_main_pgbar )
return o_main_pgbar;
msg_Err( p_intf, "main interface progress bar item wasn't found" );
return nil;
}
......@@ -1165,6 +1182,7 @@ static VLCMain *_o_sharedMainInstance = nil;
{
if( o_eyetv )
return o_eyetv;
return nil;
}
......@@ -1437,7 +1455,7 @@ static VLCMain *_o_sharedMainInstance = nil;
aout_instance_t * p_aout = vlc_object_find( p_intf, VLC_OBJECT_AOUT,
FIND_ANYWHERE );
if ( p_aout != NULL )
if( p_aout != NULL )
{
[o_controls setupVarMenuItem: o_mi_channels target: (vlc_object_t *)p_aout
var: "audio-channels" selector: @selector(toggleVar:)];
......@@ -1453,7 +1471,7 @@ static VLCMain *_o_sharedMainInstance = nil;
vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if ( p_vout != NULL )
if( p_vout != NULL )
{
vlc_object_t * p_dec_obj;
......@@ -1473,7 +1491,7 @@ static VLCMain *_o_sharedMainInstance = nil;
(vlc_object_t *)p_vout,
VLC_OBJECT_DECODER,
FIND_PARENT );
if ( p_dec_obj != NULL )
if( p_dec_obj != NULL )
{
[o_controls setupVarMenuItem: o_mi_ffmpeg_pp target:
(vlc_object_t *)p_dec_obj var:"ffmpeg-pp-q" selector:
......@@ -1729,7 +1747,7 @@ static VLCMain *_o_sharedMainInstance = nil;
returnedValue );
/* save the prefs if they were changed in the extended panel */
if (o_extended && [o_extended getConfigChanged])
if(o_extended && [o_extended getConfigChanged])
{
[o_extended savePrefs];
}
......@@ -1834,7 +1852,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)intfOpenFile:(id)sender
{
if ( !nib_open_loaded )
if( !nib_open_loaded )
{
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
[o_open awakeFromNib];
......@@ -1846,7 +1864,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)intfOpenFileGeneric:(id)sender
{
if ( !nib_open_loaded )
if( !nib_open_loaded )
{
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
[o_open awakeFromNib];
......@@ -1858,7 +1876,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)intfOpenDisc:(id)sender
{
if ( !nib_open_loaded )
if( !nib_open_loaded )
{
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
[o_open awakeFromNib];
......@@ -1870,7 +1888,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)intfOpenNet:(id)sender
{
if ( !nib_open_loaded )
if( !nib_open_loaded )
{
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
[o_open awakeFromNib];
......@@ -1882,7 +1900,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)showWizard:(id)sender
{
if ( !nib_wizard_loaded )
if( !nib_wizard_loaded )
{
nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner:self];
[o_wizard initStrings];
......@@ -1896,11 +1914,11 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)showExtended:(id)sender
{
if ( o_extended == nil )
if( o_extended == nil )
{
o_extended = [[VLCExtended alloc] init];
}
if ( !nib_extended_loaded )
if( !nib_extended_loaded )
{
nib_extended_loaded = [NSBundle loadNibNamed:@"Extended" owner:self];
[o_extended initStrings];
......@@ -1912,11 +1930,11 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)showSFilters:(id)sender
{
if ( o_sfilters == nil )
if( o_sfilters == nil )
{
o_sfilters = [[VLCsFilters alloc] init];
}
if ( !nib_sfilters_loaded )
if( !nib_sfilters_loaded )
{
nib_sfilters_loaded = [NSBundle loadNibNamed:@"SFilters" owner:self];
[o_sfilters initStrings];
......@@ -1929,13 +1947,13 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)showBookmarks:(id)sender
{
/* we need the wizard-nib for the bookmarks's extract functionality */
if ( !nib_wizard_loaded )
if( !nib_wizard_loaded )
{
nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner:self];
[o_wizard initStrings];
}
if ( !nib_bookmarks_loaded )
if( !nib_bookmarks_loaded )
nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner:self];
[o_bookmarks showBookmarks];
......@@ -1962,17 +1980,23 @@ static VLCMain *_o_sharedMainInstance = nil;
if( !nib_prefs_loaded )
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self];
[o_prefs showPrefs];
if( sender == o_mi_sprefs )
{
o_sprefs = [[VLCSimplePrefs alloc] init];
[o_sprefs showSimplePrefs];
}
else
[o_prefs showPrefs];
}
#ifdef UPDATE_CHECK
- (IBAction)checkForUpdate:(id)sender
{/* FIXME
{
if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self];
[o_update showUpdateWindow];
*/}
}
#endif
- (IBAction)viewHelp:(id)sender
......@@ -2030,7 +2054,7 @@ static VLCMain *_o_sharedMainInstance = nil;
stringByExpandingTildeInPath];
if ( [[NSFileManager defaultManager] fileExistsAtPath: o_path ] )
if( [[NSFileManager defaultManager] fileExistsAtPath: o_path ] )
{
[[NSWorkspace sharedWorkspace] openFile: o_path
withApplication: @"Console"];
......@@ -2084,14 +2108,14 @@ static VLCMain *_o_sharedMainInstance = nil;
b_restore_size = true;
b_small_window = YES; /* we know we are small, make sure this is actually set (see case below) */
/* make large */
if ( o_size_with_playlist.height > 200 )
if( o_size_with_playlist.height > 200 )
{
o_rect.size.height = o_size_with_playlist.height;
} else {
o_rect.size.height = 500;
}
if ( o_size_with_playlist.width > [o_window minSize].width )
if( o_size_with_playlist.width > [o_window minSize].width )
{
o_rect.size.width = o_size_with_playlist.width;
} else {
......@@ -2105,10 +2129,10 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_window minSize].height;
NSRect screenRect = [[o_window screen] visibleFrame];
if ( !NSContainsRect( screenRect, o_rect ) ) {
if ( NSMaxX(o_rect) > NSMaxX(screenRect) )
if( !NSContainsRect( screenRect, o_rect ) ) {
if( NSMaxX(o_rect) > NSMaxX(screenRect) )
o_rect.origin.x = ( NSMaxX(screenRect) - o_rect.size.width );
if ( NSMinY(o_rect) < NSMinY(screenRect) )
if( NSMinY(o_rect) < NSMinY(screenRect) )
o_rect.origin.y = ( NSMinY(screenRect) );
}
......@@ -2125,7 +2149,7 @@ static VLCMain *_o_sharedMainInstance = nil;
o_rect.origin.y = [o_window frame].origin.y +
[o_window frame].size.height - [o_window minSize].height;
if ( b_restore_size )
if( b_restore_size )
o_rect = o_restore_rect;
[o_playlist_view setAutoresizesSubviews: NO];
......
......@@ -271,192 +271,182 @@ static VLCTreeItem *o_root_item = nil;
if( [ o_children count] == 0 )
{
intf_thread_t *p_intf = VLCIntf;
vlc_list_t *p_list;
module_t *p_module = NULL;
module_t *p_parser;
int i_index = 0;
module_config_t *p_item,
*p_end;
int i_index = 0;
/* List the modules */
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
if( !p_list ) return nil;