Commit d66f3c87 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx gui: Fix resetting of the prefs.

Ok, this isn't making it much nicer, and this code definetly needs a more careful rewrite, but this is patchwork for the 1.0-bugfix release and at least it will do for now.

- reset's the values in any loaded views after reset of the config is called
- does not reset the module selector atm. might follow later on.
parent bbe8ccf8
...@@ -194,6 +194,7 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -194,6 +194,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[o_prefs_window center]; [o_prefs_window center];
[o_prefs_window makeKeyAndOrderFront:self]; [o_prefs_window makeKeyAndOrderFront:self];
[_rootTreeItem resetView];
} }
- (void)initStrings - (void)initStrings
...@@ -233,11 +234,8 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -233,11 +234,8 @@ static VLCPrefs *_o_sharedMainInstance = nil;
{ {
if( i_return == NSAlertAlternateReturn ) if( i_return == NSAlertAlternateReturn )
{ {
[o_prefs_view setDocumentView: o_empty_view];
config_ResetAll( p_intf ); config_ResetAll( p_intf );
[_rootTreeItem resetView]; [_rootTreeItem resetView];
[[o_tree itemAtRow:[o_tree selectedRow]]
showView:o_prefs_view];
} }
} }
...@@ -649,12 +647,16 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -649,12 +647,16 @@ static VLCPrefs *_o_sharedMainInstance = nil;
- (void)resetView - (void)resetView
{ {
[_subviews release];
_subviews = nil;
unsigned int i; unsigned int i;
for( i = 0 ; i < [_subviews count] ; i++ )
[[_subviews objectAtIndex:i] resetValues];
for( i = 0 ; i < [_options count] ; i++ )
[[_options objectAtIndex:i] resetView];
for( i = 0 ; i < [_children count] ; i++ ) for( i = 0 ; i < [_children count] ; i++ )
[[_children objectAtIndex:i] resetView]; [[_children objectAtIndex:i] resetView];
} }
- (NSMutableArray *)children - (NSMutableArray *)children
......
...@@ -51,6 +51,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -51,6 +51,7 @@ static NSMenu *o_keys_menu = nil;
- (float)floatValue; - (float)floatValue;
- (char *)stringValue; - (char *)stringValue;
- (void)applyChanges; - (void)applyChanges;
- (void)resetValues;
- (int)labelSize; - (int)labelSize;
- (void) alignWithXPosition:(int)i_xPos; - (void) alignWithXPosition:(int)i_xPos;
......
This diff is collapsed.
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