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

Implement the full/basic switch correctly and completely. Additionally, fixed...

Implement the full/basic switch correctly and completely. Additionally, fixed a rare sprefs init failure.
parent ca0d8dc7
......@@ -2,22 +2,39 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>48 424 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2311</key>
<string>345 402 590 264 0 0 1280 778 </string>
<key>2330</key>
<string>345 223 590 502 0 0 1280 778 </string>
<key>2440</key>
<string>345 308 590 389 0 0 1280 778 </string>
<key>2523</key>
<string>345 320 590 373 0 0 1280 778 </string>
<key>2562</key>
<string>345 221 590 505 0 0 1280 778 </string>
<key>2668</key>
<string>345 257 590 457 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>667</string>
<string>489.0</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>2265</integer>
<integer>2311</integer>
<integer>2410</integer>
<integer>2678</integer>
<integer>2523</integer>
<integer>2668</integer>
<integer>2330</integer>
<integer>2563</integer>
<integer>2440</integer>
<integer>2562</integer>
<integer>2330</integer>
<integer>2523</integer>
<integer>1530</integer>
</array>
<key>IBSystem Version</key>
<string>9D34</string>
......
......@@ -423,7 +423,7 @@ static VLCMain *_o_sharedMainInstance = nil;
_o_sharedMainInstance = [super init];
o_about = [[VLAboutBox alloc] init];
o_prefs = [[VLCPrefs alloc] init];
o_prefs = nil;
o_open = [[VLCOpen alloc] init];
o_wizard = [[VLCWizard alloc] init];
o_extended = nil;
......@@ -1801,22 +1801,25 @@ static VLCMain *_o_sharedMainInstance = nil;
/* release some other objects here, because it isn't sure whether dealloc
* will be called later on */
if( nib_about_loaded )
[o_about release];
if( nib_prefs_loaded )
{
[o_sprefs release];
[o_prefs release];
}
if( nib_open_loaded )
[o_open release];
if( nib_extended_loaded )
{
[o_extended collapsAll];
[o_extended release];
}
if( nib_bookmarks_loaded )
[o_bookmarks release];
......@@ -2003,11 +2006,14 @@ static VLCMain *_o_sharedMainInstance = nil;
- (IBAction)viewPreferences:(id)sender
{
if( !nib_prefs_loaded )
{
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self];
o_sprefs = [[VLCSimplePrefs alloc] init];
o_prefs= [[VLCPrefs alloc] init];
}
if( sender == o_mi_sprefs )
{
o_sprefs = [[VLCSimplePrefs alloc] init];
[o_sprefs showSimplePrefs];
}
else
......
......@@ -66,6 +66,7 @@
IBOutlet id o_cancel_btn;
IBOutlet id o_reset_btn;
IBOutlet id o_advanced_ckb;
IBOutlet id o_basicFull_matrix;
}
+ (VLCPrefs *)sharedInstance;
......@@ -77,6 +78,7 @@
- (IBAction)closePrefs: (id)sender;
- (IBAction)resetAll: (id)sender;
- (IBAction)advancedToggle: (id)sender;
- (IBAction)buttonAction: (id)sender;
@end
......
......@@ -53,10 +53,11 @@
#include <vlc_common.h>
#include <vlc_config_cat.h>
#include "intf.h"
#include "prefs.h"
#include "prefs_widgets.h"
#include "vlc_keys.h"
#import "intf.h"
#import "prefs.h"
#import "simple_prefs.h"
#import "prefs_widgets.h"
#import "vlc_keys.h"
/*****************************************************************************
* VLCPrefs implementation
......@@ -112,6 +113,9 @@ static VLCPrefs *_o_sharedMainInstance = nil;
- (void)showPrefs
{
[[o_basicFull_matrix cellAtRow:0 column:0] setState: NSOffState];
[[o_basicFull_matrix cellAtRow:0 column:1] setState: NSOnState];
[o_prefs_window center];
[o_prefs_window makeKeyAndOrderFront:self];
}
......@@ -123,6 +127,8 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[o_cancel_btn setTitle: _NS("Cancel")];
[o_reset_btn setTitle: _NS("Reset All")];
[o_advanced_ckb setTitle: _NS("Advanced")];
[[o_basicFull_matrix cellAtRow: 0 column: 0] setStringValue: _NS("Basic")];
[[o_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")];
}
- (IBAction)savePrefs: (id)sender
......@@ -170,6 +176,14 @@ static VLCPrefs *_o_sharedMainInstance = nil;
( [o_advanced_ckb state] == NSOnState ) ? true : false];
}
- (IBAction)buttonAction: (id)sender
{
[o_prefs_window orderOut: self];
[[o_basicFull_matrix cellAtRow:0 column:0] setState: NSOnState];
[[o_basicFull_matrix cellAtRow:0 column:1] setState: NSOffState];
[[[VLCMain sharedInstance] getSimplePreferences] showSimplePrefs];
}
- (void)loadConfigTree
{
}
......
......@@ -48,10 +48,10 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
if (_o_sharedInstance) {
[self dealloc];
} else {
p_intf = VLCIntf;
_o_sharedInstance = [super init];
p_intf = VLCIntf;
}
return _o_sharedInstance;
}
......@@ -274,14 +274,6 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[o_osd_osd_box setTitle: _NS("On Screen Display")];
[o_osd_osd_ckb setTitle: _NS("Enable OSD")];
/* generic stuff */
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 0] setStringValue: _NS("Basic")];
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")];
[o_sprefs_cancel_btn setTitle: _NS("Cancel")];
[o_sprefs_reset_btn setTitle: _NS("Reset Preferences")];
[o_sprefs_save_btn setTitle: _NS("Save")];
[o_sprefs_win setTitle: _NS("Preferences")];
/* video */
[o_video_black_ckb setTitle: _NS("Black screens in Fullscreen mode")];
[o_video_device_txt setStringValue: _NS("Display device")];
......@@ -297,6 +289,14 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[o_video_snap_format_txt setStringValue: _NS("Format")];
[o_video_snap_prefix_txt setStringValue: _NS("Prefix")];
[o_video_snap_seqnum_ckb setTitle: _NS("Sequential numbering")];
/* generic stuff */
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 0] setStringValue: _NS("Basic")];
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")];
[o_sprefs_cancel_btn setTitle: _NS("Cancel")];
[o_sprefs_reset_btn setTitle: _NS("Reset Preferences")];
[o_sprefs_save_btn setTitle: _NS("Save")];
[o_sprefs_win setTitle: _NS("Preferences")];
}
- (void)resetControls
......@@ -356,6 +356,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
vlc_list_release( p_list ); \
[object setToolTip: _NS(p_item->psz_longtext)]
[[o_sprefs_basicFull_matrix cellAtRow:0 column:0] setState: NSOnState];
[[o_sprefs_basicFull_matrix cellAtRow:0 column:1] setState: NSOffState];
/**********************
* interface settings *
**********************/
......@@ -610,8 +613,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
else if( sender == o_sprefs_basicFull_matrix )
{
[o_sprefs_win orderOut: self];
[[o_sprefs_basicFull_matrix cellAtRow:0 column:0] setState: NSOffState];
[[o_sprefs_basicFull_matrix cellAtRow:0 column:1] setState: NSOnState];
[[[VLCMain sharedInstance] getPreferences] showPrefs];
[self resetControls];
}
else
msg_Err( p_intf, "unknown buttonAction sender" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment