Commit 06ab53f3 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Removed the 'Advanced' function from the complete prefs because we want them...

Removed the 'Advanced' function from the complete prefs because we want them to be complete in any case thanks to SPrefs

Additionally, removed the temporary Simple Prefences menu item.
parent 92a7fbd1
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
<integer>5</integer> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>282</integer>
<integer>915</integer>
<integer>2416</integer> <integer>2416</integer>
<integer>29</integer>
<integer>2197</integer> <integer>2197</integer>
<integer>282</integer>
<integer>21</integer> <integer>21</integer>
<integer>29</integer>
<integer>915</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9E17</string> <string>9E17</string>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
}, },
{ {
ACTIONS = { ACTIONS = {
advancedToggle = id;
buttonAction = id; buttonAction = id;
closePrefs = id; closePrefs = id;
resetAll = id; resetAll = id;
...@@ -30,7 +29,6 @@ ...@@ -30,7 +29,6 @@
CLASS = VLCPrefs; CLASS = VLCPrefs;
LANGUAGE = ObjC; LANGUAGE = ObjC;
OUTLETS = { OUTLETS = {
"o_advanced_ckb" = id;
"o_basicFull_matrix" = id; "o_basicFull_matrix" = id;
"o_cancel_btn" = id; "o_cancel_btn" = id;
"o_prefs_view" = id; "o_prefs_view" = id;
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>2311</key> <key>2311</key>
<string>345 435 590 230 0 0 1280 778 </string> <string>345 426 590 230 0 0 1280 778 </string>
<key>2330</key> <key>2330</key>
<string>345 223 590 502 0 0 1280 778 </string> <string>345 222 590 502 0 0 1280 778 </string>
<key>2440</key> <key>2440</key>
<string>345 307 590 389 0 0 1280 778 </string> <string>345 307 590 389 0 0 1280 778 </string>
<key>2523</key> <key>2523</key>
...@@ -27,16 +27,16 @@ ...@@ -27,16 +27,16 @@
<integer>5</integer> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>2562</integer>
<integer>2523</integer>
<integer>2311</integer> <integer>2311</integer>
<integer>2562</integer>
<integer>1530</integer>
<integer>2440</integer> <integer>2440</integer>
<integer>2668</integer> <integer>2523</integer>
<integer>2330</integer> <integer>2330</integer>
<integer>1530</integer> <integer>2668</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9D34</string> <string>9E17</string>
<key>targetFramework</key> <key>targetFramework</key>
<string>IBCocoaFramework</string> <string>IBCocoaFramework</string>
</dict> </dict>
......
...@@ -1920,12 +1920,7 @@ end: ...@@ -1920,12 +1920,7 @@ end:
o_prefs= [[VLCPrefs alloc] init]; o_prefs= [[VLCPrefs alloc] init];
} }
if( sender == o_mi_sprefs ) [o_sprefs showSimplePrefs];
{
[o_sprefs showSimplePrefs];
}
else
[o_prefs showPrefs];
} }
- (IBAction)checkForUpdate:(id)sender - (IBAction)checkForUpdate:(id)sender
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- (NSString *)getTitle; - (NSString *)getTitle;
- (NSString *)getHelp; - (NSString *)getHelp;
- (BOOL)hasPrefs:(NSString *)o_module_name; - (BOOL)hasPrefs:(NSString *)o_module_name;
- (NSView *)showView:(NSScrollView *)o_prefs_view advancedView:(bool) b_advanced; - (NSView *)showView:(NSScrollView *)o_prefs_view;
- (void)applyChanges; - (void)applyChanges;
- (void)resetView; - (void)resetView;
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
@interface VLCPrefs : NSObject @interface VLCPrefs : NSObject
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf;
bool b_advanced;
VLCTreeItem *o_config_tree; VLCTreeItem *o_config_tree;
NSView *o_empty_view; NSView *o_empty_view;
NSMutableDictionary *o_save_prefs; NSMutableDictionary *o_save_prefs;
...@@ -65,7 +64,6 @@ ...@@ -65,7 +64,6 @@
IBOutlet id o_save_btn; IBOutlet id o_save_btn;
IBOutlet id o_cancel_btn; IBOutlet id o_cancel_btn;
IBOutlet id o_reset_btn; IBOutlet id o_reset_btn;
IBOutlet id o_advanced_ckb;
IBOutlet id o_basicFull_matrix; IBOutlet id o_basicFull_matrix;
} }
...@@ -77,7 +75,6 @@ ...@@ -77,7 +75,6 @@
- (IBAction)savePrefs: (id)sender; - (IBAction)savePrefs: (id)sender;
- (IBAction)closePrefs: (id)sender; - (IBAction)closePrefs: (id)sender;
- (IBAction)resetAll: (id)sender; - (IBAction)resetAll: (id)sender;
- (IBAction)advancedToggle: (id)sender;
- (IBAction)buttonAction: (id)sender; - (IBAction)buttonAction: (id)sender;
@end @end
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
- the documentview with all the prefs widgets in it - the documentview with all the prefs widgets in it
- a saveChanges action - a saveChanges action
- a revertChanges action - a revertChanges action
- an advanced action (to hide/show advanced options)
- a redraw view action - a redraw view action
- the children action should generate a list of the treeitems children (to be used by VLCPrefs datasource) - the children action should generate a list of the treeitems children (to be used by VLCPrefs datasource)
...@@ -97,10 +96,8 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -97,10 +96,8 @@ static VLCPrefs *_o_sharedMainInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
p_intf = VLCIntf; p_intf = VLCIntf;
b_advanced = config_GetInt( p_intf, "advanced" );
[self initStrings]; [self initStrings];
[o_advanced_ckb setState: b_advanced];
[o_prefs_view setBorderType: NSGrooveBorder]; [o_prefs_view setBorderType: NSGrooveBorder];
[o_prefs_view setHasVerticalScroller: YES]; [o_prefs_view setHasVerticalScroller: YES];
[o_prefs_view setDrawsBackground: NO]; [o_prefs_view setDrawsBackground: NO];
...@@ -128,7 +125,6 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -128,7 +125,6 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[o_save_btn setTitle: _NS("Save")]; [o_save_btn setTitle: _NS("Save")];
[o_cancel_btn setTitle: _NS("Cancel")]; [o_cancel_btn setTitle: _NS("Cancel")];
[o_reset_btn setTitle: _NS("Reset All")]; [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: 0] setStringValue: _NS("Basic")];
[[o_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")]; [[o_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")];
} }
...@@ -164,20 +160,10 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -164,20 +160,10 @@ static VLCPrefs *_o_sharedMainInstance = nil;
config_ResetAll( p_intf ); config_ResetAll( p_intf );
[[VLCTreeItem rootItem] resetView]; [[VLCTreeItem rootItem] resetView];
[[o_tree itemAtRow:[o_tree selectedRow]] [[o_tree itemAtRow:[o_tree selectedRow]]
showView:o_prefs_view advancedView: showView:o_prefs_view];
( [o_advanced_ckb state] == NSOnState ) ? true : false];
} }
} }
- (IBAction)advancedToggle: (id)sender
{
b_advanced = !b_advanced;
[o_advanced_ckb setState: b_advanced];
/* refresh the view of the current treeitem */
[[o_tree itemAtRow:[o_tree selectedRow]] showView:o_prefs_view advancedView:
( [o_advanced_ckb state] == NSOnState ) ? true : false];
}
- (IBAction)buttonAction: (id)sender - (IBAction)buttonAction: (id)sender
{ {
[o_prefs_window orderOut: self]; [o_prefs_window orderOut: self];
...@@ -197,9 +183,7 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -197,9 +183,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
/* update the document view to the view of the selected tree item */ /* update the document view to the view of the selected tree item */
- (void)outlineViewSelectionDidChange:(NSNotification *)o_notification - (void)outlineViewSelectionDidChange:(NSNotification *)o_notification
{ {
[[o_tree itemAtRow:[o_tree selectedRow]] showView: o_prefs_view [[o_tree itemAtRow:[o_tree selectedRow]] showView: o_prefs_view];
advancedView:( [o_advanced_ckb state] == NSOnState ) ?
true : false];
} }
@end @end
...@@ -521,7 +505,6 @@ static VLCTreeItem *o_root_item = nil; ...@@ -521,7 +505,6 @@ static VLCTreeItem *o_root_item = nil;
} }
- (NSView *)showView:(NSScrollView *)o_prefs_view - (NSView *)showView:(NSScrollView *)o_prefs_view
advancedView:(bool) b_advanced
{ {
NSRect s_vrc; NSRect s_vrc;
NSView *o_view; NSView *o_view;
...@@ -648,27 +631,19 @@ static VLCTreeItem *o_root_item = nil; ...@@ -648,27 +631,19 @@ static VLCTreeItem *o_root_item = nil;
int i_lastItem = 0; int i_lastItem = 0;
int i_yPos = -2; int i_yPos = -2;
int i_max_label = 0; int i_max_label = 0;
int i_show_advanced = 0;
NSEnumerator *enumerator = [o_subviews objectEnumerator]; NSEnumerator *enumerator = [o_subviews objectEnumerator];
VLCConfigControl *o_widget; VLCConfigControl *o_widget;
NSRect o_frame; NSRect o_frame;
while( ( o_widget = [enumerator nextObject] ) ) while( ( o_widget = [enumerator nextObject] ) )
if( ( [o_widget isAdvanced] ) && (! b_advanced) ) if( i_max_label < [o_widget getLabelSize] )
continue;
else if( i_max_label < [o_widget getLabelSize] )
i_max_label = [o_widget getLabelSize]; i_max_label = [o_widget getLabelSize];
enumerator = [o_subviews objectEnumerator]; enumerator = [o_subviews objectEnumerator];
while( ( o_widget = [enumerator nextObject] ) ) while( ( o_widget = [enumerator nextObject] ) )
{ {
int i_widget; int i_widget;
if( ( [o_widget isAdvanced] ) && (! b_advanced) )
{
i_show_advanced++;
continue;
}
i_widget = [o_widget getViewType]; i_widget = [o_widget getViewType];
i_yPos += [VLCConfigControl calcVerticalMargin:i_widget i_yPos += [VLCConfigControl calcVerticalMargin:i_widget
...@@ -683,28 +658,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -683,28 +658,7 @@ static VLCTreeItem *o_root_item = nil;
i_lastItem = i_widget; i_lastItem = i_widget;
[o_view addSubview:o_widget]; [o_view addSubview:o_widget];
} }
if( i_show_advanced != 0 )
{
/* We add the advanced notice... */
NSRect s_rc = [o_view frame];
NSTextField *o_label;
s_rc.size.height = 17;
s_rc.origin.x = LEFTMARGIN;
s_rc.origin.y = i_yPos += [VLCConfigControl
calcVerticalMargin:CONFIG_ITEM_STRING
lastItem:i_lastItem];
o_label = [[[NSTextField alloc] initWithFrame: s_rc] retain];
[o_label setDrawsBackground: NO];
[o_label setBordered: NO];
[o_label setEditable: NO];
[o_label setSelectable: NO];
[o_label setStringValue: _NS("Some options are hidden. " \
"Check \"Advanced\" to display them.")];
[o_label setFont:[NSFont systemFontOfSize:10]];
[o_label sizeToFit];
[o_view addSubview:o_label];
i_yPos += [o_label frame].size.height;
}
o_frame = [o_view frame]; o_frame = [o_view frame];
o_frame.size.height = i_yPos; o_frame.size.height = i_yPos;
[o_view setFrame:o_frame]; [o_view setFrame:o_frame];
......
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