Commit 35736da0 authored by Jérome Decoodt's avatar Jérome Decoodt

*: remove useless code

parent 060244a8
...@@ -491,8 +491,6 @@ fprintf( stderr, "[%s] showView\n", [o_name UTF8String] ); ...@@ -491,8 +491,6 @@ fprintf( stderr, "[%s] showView\n", [o_name UTF8String] );
} }
p_item = p_parser->p_config; p_item = p_parser->p_config;
int i = 0; int i = 0;
int i_yPos = -2;
int i_lastItem = 0;
p_item = p_parser->p_config + 1; p_item = p_parser->p_config + 1;
...@@ -521,83 +519,20 @@ fprintf( stderr, "end of (sub)category\n" ); ...@@ -521,83 +519,20 @@ fprintf( stderr, "end of (sub)category\n" );
fprintf( stderr, "skipping hint usage\n" ); fprintf( stderr, "skipping hint usage\n" );
break; break;
default: default:
fprintf( stderr, "%s (%d) is ", p_item->psz_name, p_item->i_type ); fprintf( stderr, "%s (%d)", p_item->psz_name, p_item->i_type );
{ {
VLCConfigControl *o_control = nil; VLCConfigControl *o_control = nil;
int i_widget = 0;
switch( p_item->i_type )
{
case CONFIG_ITEM_STRING:
fprintf( stderr, "CONFIG_ITEM_STRING" );
if( !p_item->i_list )
i_widget = CONFIG_ITEM_STRING;
else
i_widget = CONFIG_ITEM_STRING_LIST;
break;
case CONFIG_ITEM_FILE:
case CONFIG_ITEM_DIRECTORY:
fprintf( stderr, "CONFIG_ITEM_FILE" );
i_widget = CONFIG_ITEM_FILE;
break;
case CONFIG_ITEM_MODULE:
case CONFIG_ITEM_MODULE_CAT:
fprintf( stderr, "CONFIG_ITEM_MODULE" );
i_widget = CONFIG_ITEM_MODULE;
break;
case CONFIG_ITEM_INTEGER:
fprintf( stderr, "CONFIG_ITEM_INTEGER" );
if( p_item->i_list )
i_widget = CONFIG_ITEM_STRING_LIST;
else if( p_item->i_min != 0 || p_item->i_max != 0 )
i_widget = CONFIG_ITEM_RANGED_INTEGER;
else
i_widget = CONFIG_ITEM_INTEGER;
break;
case CONFIG_ITEM_FLOAT:
fprintf( stderr, "CONFIG_ITEM_FLOAT" );
if( p_item->f_min != 0 || p_item->f_max != 0 )
i_widget = CONFIG_ITEM_RANGED_INTEGER;
else
i_widget = CONFIG_ITEM_INTEGER;
break;
case CONFIG_ITEM_BOOL:
fprintf( stderr, "CONFIG_ITEM_BOOL" );
i_widget = CONFIG_ITEM_BOOL;
break;
case CONFIG_ITEM_KEY:
fprintf( stderr, "CONFIG_ITEM_KEY" );
if( MACOS_VERSION < 10.3 )
i_widget = CONFIG_ITEM_KEY_BEFORE_10_3;
else
i_widget = CONFIG_ITEM_KEY_AFTER_10_3;
break;
case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT:
fprintf( stderr, "CONFIG_ITEM_MODULE_LIST" );
i_widget = CONFIG_ITEM_MODULE_LIST;
break;
default:
fprintf( stderr, "***UNKNOWN***" );
}
if( i_widget != 0 )
{
i_yPos += [VLCConfigControl
calcVerticalMargin:i_widget lastItem:i_lastItem];
o_control = [VLCConfigControl newControl:p_item o_control = [VLCConfigControl newControl:p_item
withView:o_view withView:o_view];
yOffset: i_yPos];
if( o_control != nil ) if( o_control != nil )
{ {
i_yPos += [o_control frame].size.height;
i_lastItem = i_widget;
[o_control setAutoresizingMask: NSViewMaxYMargin | [o_control setAutoresizingMask: NSViewMaxYMargin |
NSViewWidthSizable]; NSViewWidthSizable];
[o_subviews addObject: o_control]; [o_subviews addObject: o_control];
} }
}
fprintf( stderr, "\n" ); fprintf( stderr, "\n" );
break;
} }
break;
} }
} while( p_item++->i_type != CONFIG_HINT_END ); } while( p_item++->i_type != CONFIG_HINT_END );
...@@ -606,8 +541,6 @@ fprintf( stderr, "\n" ); ...@@ -606,8 +541,6 @@ fprintf( stderr, "\n" );
else else
{ {
int i = 0; int i = 0;
int i_yPos = -2;
int i_lastItem = 0;
int i_index; int i_index;
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
if( !p_list ) return o_view; if( !p_list ) return o_view;
...@@ -659,81 +592,17 @@ fprintf( stderr, "end of (sub)category\n" ); ...@@ -659,81 +592,17 @@ fprintf( stderr, "end of (sub)category\n" );
fprintf( stderr, "skipping hint usage\n" ); fprintf( stderr, "skipping hint usage\n" );
break; break;
default: default:
fprintf( stderr, "%s (%d) is ", p_item->psz_name, p_item->i_type ); fprintf( stderr, "%s (%d)", p_item->psz_name, p_item->i_type );
{ {
VLCConfigControl *o_control = nil; VLCConfigControl *o_control = nil;
int i_widget = 0;
switch( p_item->i_type )
{
case CONFIG_ITEM_STRING:
fprintf( stderr, "CONFIG_ITEM_STRING" );
if( !p_item->i_list )
i_widget = CONFIG_ITEM_STRING;
else
i_widget = CONFIG_ITEM_STRING_LIST;
break;
case CONFIG_ITEM_FILE:
case CONFIG_ITEM_DIRECTORY:
fprintf( stderr, "CONFIG_ITEM_FILE" );
i_widget = CONFIG_ITEM_FILE;
break;
case CONFIG_ITEM_MODULE:
case CONFIG_ITEM_MODULE_CAT:
fprintf( stderr, "CONFIG_ITEM_MODULE" );
i_widget = CONFIG_ITEM_MODULE;
break;
case CONFIG_ITEM_INTEGER:
fprintf( stderr, "CONFIG_ITEM_INTEGER" );
if( p_item->i_list )
i_widget = CONFIG_ITEM_STRING_LIST;
else if( p_item->i_min != 0 || p_item->i_max != 0 )
i_widget = CONFIG_ITEM_RANGED_INTEGER;
else
i_widget = CONFIG_ITEM_INTEGER;
break;
case CONFIG_ITEM_FLOAT:
fprintf( stderr, "CONFIG_ITEM_FLOAT" );
if( p_item->f_min != 0 || p_item->f_max != 0 )
i_widget = CONFIG_ITEM_RANGED_INTEGER;
else
i_widget = CONFIG_ITEM_INTEGER;
break;
case CONFIG_ITEM_BOOL:
fprintf( stderr, "CONFIG_ITEM_BOOL" );
i_widget = CONFIG_ITEM_BOOL;
break;
case CONFIG_ITEM_KEY:
fprintf( stderr, "CONFIG_ITEM_KEY" );
if( MACOS_VERSION < 10.3 )
i_widget = CONFIG_ITEM_KEY_BEFORE_10_3;
else
i_widget = CONFIG_ITEM_KEY_AFTER_10_3;
break;
case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT:
fprintf( stderr, "CONFIG_ITEM_MODULE_LIST" );
i_widget = CONFIG_ITEM_MODULE_LIST;
break;
default:
fprintf( stderr, "***UNKNOWN***" );
}
if( i_widget != 0 )
{
i_yPos += [VLCConfigControl
calcVerticalMargin:i_widget lastItem:i_lastItem];
o_control = [VLCConfigControl newControl:p_item o_control = [VLCConfigControl newControl:p_item
withView:o_view withView:o_view];
yOffset: i_yPos];
if( o_control != nil ) if( o_control != nil )
{ {
i_yPos += [o_control frame].size.height;
i_lastItem = i_widget;
[o_control setAutoresizingMask: NSViewMaxYMargin | [o_control setAutoresizingMask: NSViewMaxYMargin |
NSViewWidthSizable]; NSViewWidthSizable];
[o_subviews addObject: o_control]; [o_subviews addObject: o_control];
} }
}
fprintf( stderr, "\n" );
break; break;
} }
} }
...@@ -748,7 +617,7 @@ fprintf( stderr, "\n" ); ...@@ -748,7 +617,7 @@ fprintf( stderr, "\n" );
if( o_view != nil ) if( o_view != nil )
{ {
int i_lastItem = 0; int i_lastItem = 0;
int i_yPos = 0; int i_yPos = -2;
unsigned int i; unsigned int i;
for( i = 0 ; i < [o_subviews count] ; i++ ) for( i = 0 ; i < [o_subviews count] ; i++ )
{ {
...@@ -763,8 +632,6 @@ fprintf( stderr, "\n" ); ...@@ -763,8 +632,6 @@ fprintf( stderr, "\n" );
[o_widget setYPos:i_yPos]; [o_widget setYPos:i_yPos];
i_yPos += [o_widget frame].size.height; i_yPos += [o_widget frame].size.height;
i_lastItem = i_widget; i_lastItem = i_widget;
[o_widget setAutoresizingMask: NSViewMaxYMargin |
NSViewWidthSizable];
[o_view addSubview:o_widget]; [o_view addSubview:o_widget];
} }
...@@ -777,12 +644,10 @@ fprintf( stderr, "\n" ); ...@@ -777,12 +644,10 @@ fprintf( stderr, "\n" );
{ {
unsigned int i; unsigned int i;
if( o_subviews != nil ) if( o_subviews != nil )
{
//Item has been shown //Item has been shown
fprintf( stderr, "[%s] applying changes\n", [o_name cString]);
for( i = 0 ; i < [o_subviews count] ; i++ ) for( i = 0 ; i < [o_subviews count] ; i++ )
[[o_subviews objectAtIndex:i] applyChanges]; [[o_subviews objectAtIndex:i] applyChanges];
}
if( o_children != IsALeafNode ) if( o_children != IsALeafNode )
for( i = 0 ; i < [o_children count] ; i++ ) for( i = 0 ; i < [o_children count] ; i++ )
[[o_children objectAtIndex:i] applyChanges]; [[o_children objectAtIndex:i] applyChanges];
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
} }
+ (VLCConfigControl *)newControl: (module_config_t *)_p_item + (VLCConfigControl *)newControl: (module_config_t *)_p_item
withView: (NSView *)o_parent_view yOffset:(int) i_yPos; withView: (NSView *)o_parent_view;
- (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item; - (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item;
- (NSString *)getName; - (NSString *)getName;
- (int)getType; - (int)getType;
...@@ -63,8 +63,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -63,8 +63,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -74,8 +73,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -74,8 +73,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -87,8 +85,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -87,8 +85,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
- (IBAction)openFileDialog: (id)sender; - (IBAction)openFileDialog: (id)sender;
- (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void *)o_context_info; - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void *)o_context_info;
...@@ -101,8 +98,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -101,8 +98,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -114,8 +110,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -114,8 +110,7 @@ static NSMenu *o_keys_menu = nil;
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
- (IBAction)stepperChanged:(id)sender; - (IBAction)stepperChanged:(id)sender;
- (void)textfieldChanged:(NSNotification *)o_notification; - (void)textfieldChanged:(NSNotification *)o_notification;
...@@ -127,8 +122,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -127,8 +122,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -142,8 +136,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -142,8 +136,7 @@ static NSMenu *o_keys_menu = nil;
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
- (IBAction)sliderChanged:(id)sender; - (IBAction)sliderChanged:(id)sender;
- (void)textfieldChanged:(NSNotification *)o_notification; - (void)textfieldChanged:(NSNotification *)o_notification;
...@@ -155,8 +148,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -155,8 +148,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -168,8 +160,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -168,8 +160,7 @@ static NSMenu *o_keys_menu = nil;
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
- (IBAction)stepperChanged:(id)sender; - (IBAction)stepperChanged:(id)sender;
- (void)textfieldChanged:(NSNotification *)o_notification; - (void)textfieldChanged:(NSNotification *)o_notification;
...@@ -185,8 +176,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -185,8 +176,7 @@ static NSMenu *o_keys_menu = nil;
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
- (IBAction)sliderChanged:(id)sender; - (IBAction)sliderChanged:(id)sender;
- (void)textfieldChanged:(NSNotification *)o_notification; - (void)textfieldChanged:(NSNotification *)o_notification;
...@@ -202,8 +192,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -202,8 +192,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -213,8 +202,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -213,8 +202,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
...@@ -226,8 +214,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -226,8 +214,7 @@ static NSMenu *o_keys_menu = nil;
} }
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view;
withVerticalOffset: (int)i_yPos;
@end @end
......
...@@ -833,7 +833,6 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -833,7 +833,6 @@ if( MACOS_VERSION >= 10.3 ) \
+ (VLCConfigControl *)newControl: (module_config_t *)_p_item + (VLCConfigControl *)newControl: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
yOffset:(int) i_yPos
{ {
VLCConfigControl *p_control = NULL; VLCConfigControl *p_control = NULL;
switch( _p_item->i_type ) switch( _p_item->i_type )
...@@ -843,74 +842,64 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -843,74 +842,64 @@ if( MACOS_VERSION >= 10.3 ) \
{ {
p_control = [[StringConfigControl alloc] p_control = [[StringConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
else else
{ {
p_control = [[StringListConfigControl alloc] p_control = [[StringListConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
break; break;
case CONFIG_ITEM_FILE: case CONFIG_ITEM_FILE:
case CONFIG_ITEM_DIRECTORY: case CONFIG_ITEM_DIRECTORY:
p_control = [[FileConfigControl alloc] p_control = [[FileConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
break; break;
case CONFIG_ITEM_MODULE: case CONFIG_ITEM_MODULE:
case CONFIG_ITEM_MODULE_CAT: case CONFIG_ITEM_MODULE_CAT:
p_control = [[ModuleConfigControl alloc] p_control = [[ModuleConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
break; break;
case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_INTEGER:
if( _p_item->i_list ) if( _p_item->i_list )
{ {
p_control = [[IntegerListConfigControl alloc] p_control = [[IntegerListConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
else if( _p_item->i_min != 0 || _p_item->i_max != 0 ) else if( _p_item->i_min != 0 || _p_item->i_max != 0 )
{ {
p_control = [[RangedIntegerConfigControl alloc] p_control = [[RangedIntegerConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
else else
{ {
p_control = [[IntegerConfigControl alloc] p_control = [[IntegerConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
break; break;
case CONFIG_ITEM_BOOL: case CONFIG_ITEM_BOOL:
p_control = [[BoolConfigControl alloc] p_control = [[BoolConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
break; break;
case CONFIG_ITEM_FLOAT: case CONFIG_ITEM_FLOAT:
if( _p_item->f_min != 0 || _p_item->f_max != 0 ) if( _p_item->f_min != 0 || _p_item->f_max != 0 )
{ {
p_control = [[RangedFloatConfigControl alloc] p_control = [[RangedFloatConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
else else
{ {
p_control = [[FloatConfigControl alloc] p_control = [[FloatConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
break; break;
case CONFIG_ITEM_KEY: case CONFIG_ITEM_KEY:
...@@ -918,23 +907,20 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -918,23 +907,20 @@ if( MACOS_VERSION >= 10.3 ) \
{ {
p_control = [[KeyConfigControlBefore103 alloc] p_control = [[KeyConfigControlBefore103 alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
else else
{ {
p_control = [[KeyConfigControlAfter103 alloc] p_control = [[KeyConfigControlAfter103 alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
} }
break; break;
case CONFIG_ITEM_MODULE_LIST: case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT: case CONFIG_ITEM_MODULE_LIST_CAT:
p_control = [[ModuleListConfigControl alloc] p_control = [[ModuleListConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view withView: o_parent_view];
withVerticalOffset: i_yPos];
break; break;
default: default:
break; break;
...@@ -1012,14 +998,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1012,14 +998,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation StringConfigControl @implementation StringConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_textfieldString, *o_textfieldTooltip; NSString *o_labelString, *o_textfieldString, *o_textfieldTooltip;
mainFrame.size.height = 22; mainFrame.size.height = 22;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1069,14 +1054,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1069,14 +1054,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation StringListConfigControl @implementation StringListConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_textfieldTooltip; NSString *o_labelString, *o_textfieldTooltip;
mainFrame.size.height = 22; mainFrame.size.height = 22;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1144,7 +1128,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1144,7 +1128,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation FileConfigControl @implementation FileConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_buttonTooltip, *o_textfieldString; NSString *o_labelString, *o_buttonTooltip, *o_textfieldString;
...@@ -1152,7 +1135,7 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1152,7 +1135,7 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
mainFrame.size.height = 46; mainFrame.size.height = 46;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1248,14 +1231,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1248,14 +1231,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation ModuleConfigControl @implementation ModuleConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_popupTooltip; NSString *o_labelString, *o_popupTooltip;
mainFrame.size.height = 22; mainFrame.size.height = 22;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1398,14 +1380,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1398,14 +1380,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation IntegerConfigControl @implementation IntegerConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip, *o_textfieldString; NSString *o_labelString, *o_tooltip, *o_textfieldString;
mainFrame.size.height = 23; mainFrame.size.height = 23;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1480,14 +1461,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1480,14 +1461,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_textfieldTooltip; NSString *o_labelString, *o_textfieldTooltip;
mainFrame.size.height = 22; mainFrame.size.height = 22;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1557,14 +1537,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1557,14 +1537,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation RangedIntegerConfigControl @implementation RangedIntegerConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip; NSString *o_labelString, *o_tooltip;
mainFrame.size.height = 50; mainFrame.size.height = 50;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1655,14 +1634,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1655,14 +1634,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation FloatConfigControl @implementation FloatConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip, *o_textfieldString; NSString *o_labelString, *o_tooltip, *o_textfieldString;
mainFrame.size.height = 23; mainFrame.size.height = 23;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1735,14 +1713,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1735,14 +1713,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation RangedFloatConfigControl @implementation RangedFloatConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip; NSString *o_labelString, *o_tooltip;
mainFrame.size.height = 50; mainFrame.size.height = 50;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1835,14 +1812,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1835,14 +1812,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip; NSString *o_labelString, *o_tooltip;
mainFrame.size.height = 17; mainFrame.size.height = 17;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1882,14 +1858,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1882,14 +1858,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip; NSString *o_labelString, *o_tooltip;
mainFrame.size.height = 37; mainFrame.size.height = 37;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -1997,14 +1972,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -1997,14 +1972,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation KeyConfigControlAfter103 @implementation KeyConfigControlAfter103
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
NSRect mainFrame = [o_parent_view frame]; NSRect mainFrame = [o_parent_view frame];
NSString *o_labelString, *o_tooltip; NSString *o_labelString, *o_tooltip;
mainFrame.size.height = 22; mainFrame.size.height = 22;
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
...@@ -2062,7 +2036,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name ); ...@@ -2062,7 +2036,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation ModuleListConfigControl @implementation ModuleListConfigControl
- (id) initWithItem: (module_config_t *)_p_item - (id) initWithItem: (module_config_t *)_p_item
withView: (NSView *)o_parent_view withView: (NSView *)o_parent_view
withVerticalOffset: (int)i_yPos
{ {
if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST ) if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
//TODO.... //TODO....
...@@ -2116,7 +2089,7 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST ) ...@@ -2116,7 +2089,7 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
mainFrame.size.height = 30 + 18 * [o_modulearray count]; mainFrame.size.height = 30 + 18 * [o_modulearray count];
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
mainFrame.origin.x = LEFTMARGIN; mainFrame.origin.x = LEFTMARGIN;
mainFrame.origin.y = i_yPos; mainFrame.origin.y = 0;
if( [super initWithFrame: mainFrame item: _p_item] != nil ) if( [super initWithFrame: mainFrame item: _p_item] != nil )
{ {
i_view_type = CONFIG_ITEM_MODULE_LIST; i_view_type = CONFIG_ITEM_MODULE_LIST;
......
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