Commit 822bbc63 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* moved the preferences-window to a seperate nib-file

parent 46f1af78
...@@ -229,7 +229,6 @@ ...@@ -229,7 +229,6 @@
"o_mu_visual" = id; "o_mu_visual" = id;
"o_mu_window" = id; "o_mu_window" = id;
"o_playlist" = id; "o_playlist" = id;
"o_prefs" = id;
"o_scrollfield" = id; "o_scrollfield" = id;
"o_timefield" = id; "o_timefield" = id;
"o_timeslider" = id; "o_timeslider" = id;
......
...@@ -24,10 +24,6 @@ ...@@ -24,10 +24,6 @@
<integer>2206</integer> <integer>2206</integer>
<integer>2199</integer> <integer>2199</integer>
</array> </array>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
</array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>7S215</string> <string>7S215</string>
</dict> </dict>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>30 60 505 518 0 0 800 578 </string>
<key>IBFramework Version</key>
<string>364.0</string>
<key>IBLockedObjects</key>
<array>
<integer>2203</integer>
<integer>2208</integer>
<integer>2206</integer>
<integer>2199</integer>
</array>
<key>IBSystem Version</key>
<string>7S215</string>
</dict>
</plist>
...@@ -814,6 +814,7 @@ ...@@ -814,6 +814,7 @@
8E9CA1C006D7DEE800B7186C, 8E9CA1C006D7DEE800B7186C,
8E9CA1C106D7DEE800B7186C, 8E9CA1C106D7DEE800B7186C,
DCA00AA9075F948800E6BF46, DCA00AA9075F948800E6BF46,
DCF358BB077F10BA007DB450,
); );
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -835,8 +836,7 @@ ...@@ -835,8 +836,7 @@
}; };
089C167CFE841241C02AAC07 = { 089C167CFE841241C02AAC07 = {
children = ( children = (
DCA00AA7075F948800E6BF46, DCF358BC077F1236007DB450,
F74F13EA02C2A79C01EE194C,
8E445F86047289E50059A3A7, 8E445F86047289E50059A3A7,
8ECA7E520563CD9500DFC000, 8ECA7E520563CD9500DFC000,
8EE1AFA30444660F0059A3A7, 8EE1AFA30444660F0059A3A7,
...@@ -2244,6 +2244,41 @@ ...@@ -2244,6 +2244,41 @@
settings = { settings = {
}; };
}; };
DCF358B9077F10BA007DB450 = {
children = (
DCF358BA077F10BA007DB450,
);
isa = PBXVariantGroup;
name = Preferences.nib;
path = "";
refType = 4;
sourceTree = "<group>";
};
DCF358BA077F10BA007DB450 = {
isa = PBXFileReference;
lastKnownFileType = wrapper.nib;
name = English;
path = Resources/English.lproj/Preferences.nib;
refType = 4;
sourceTree = "<group>";
};
DCF358BB077F10BA007DB450 = {
fileRef = DCF358B9077F10BA007DB450;
isa = PBXBuildFile;
settings = {
};
};
DCF358BC077F1236007DB450 = {
children = (
DCA00AA7075F948800E6BF46,
F74F13EA02C2A79C01EE194C,
DCF358B9077F10BA007DB450,
);
isa = PBXGroup;
name = nibs;
refType = 4;
sourceTree = "<group>";
};
//DC0 //DC0
//DC1 //DC1
//DC2 //DC2
......
...@@ -292,6 +292,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -292,6 +292,7 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
o_about = [[VLAboutBox alloc] init]; o_about = [[VLAboutBox alloc] init];
o_prefs = [[VLCPrefs alloc] init];
return _o_sharedMainInstance; return _o_sharedMainInstance;
} }
......
...@@ -38,28 +38,34 @@ ...@@ -38,28 +38,34 @@
*****************************************************************************/ *****************************************************************************/
@implementation VLCPrefs @implementation VLCPrefs
- (id)init static VLCPrefs *_o_sharedMainInstance = nil;
+ (VLCPrefs *)sharedInstance
{ {
self = [super init]; return _o_sharedMainInstance ? _o_sharedMainInstance : [[self alloc] init];
}
if( self != nil ) - (id)init
{ {
o_empty_view = [[NSView alloc] init]; if( _o_sharedMainInstance) {
o_save_prefs = [[NSMutableDictionary alloc] init]; [self dealloc];
} else {
_o_sharedMainInstance = [super init];
} }
return( self ); return _o_sharedMainInstance;
} }
- (void)dealloc - (void)showPrefs
{ {
[o_empty_view release]; /* load our nib */
[o_save_prefs release]; [NSBundle loadNibNamed:@"Preferences" owner:self];
[super dealloc];
}
- (void)awakeFromNib /* from "init" > r8571 */
{ o_empty_view = [[NSView alloc] init];
o_save_prefs = [[NSMutableDictionary alloc] init];
/* from "awakeFromNib" > r8571 */
p_intf = VLCIntf; p_intf = VLCIntf;
b_advanced = config_GetInt( p_intf, "advanced" ); b_advanced = config_GetInt( p_intf, "advanced" );
...@@ -71,6 +77,14 @@ ...@@ -71,6 +77,14 @@
[o_prefs_view setRulersVisible: NO]; [o_prefs_view setRulersVisible: NO];
[o_prefs_view setDocumentView: o_empty_view]; [o_prefs_view setDocumentView: o_empty_view];
[o_tree selectRow:0 byExtendingSelection:NO]; [o_tree selectRow:0 byExtendingSelection:NO];
/* end of the previous "awakeFromNib" method */
[o_save_prefs release];
o_save_prefs = [[NSMutableDictionary alloc] init];
[self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID]
andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]];
[o_prefs_window center];
[o_prefs_window makeKeyAndOrderFront:self];
} }
- (void)initStrings - (void)initStrings
...@@ -82,16 +96,6 @@ ...@@ -82,16 +96,6 @@
[o_advanced_ckb setTitle: _NS("Advanced")]; [o_advanced_ckb setTitle: _NS("Advanced")];
} }
- (void)showPrefs
{
[o_save_prefs release];
o_save_prefs = [[NSMutableDictionary alloc] init];
[self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID]
andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]];
[o_prefs_window center];
[o_prefs_window makeKeyAndOrderFront:self];
}
- (IBAction)savePrefs: (id)sender - (IBAction)savePrefs: (id)sender
{ {
id o_vlc_config; id o_vlc_config;
......
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