Commit 909cfe7c authored by Felix Paul Kühne's avatar Felix Paul Kühne

* compilation fixes to address courmisch's API changes. need massive testing...

* compilation fixes to address courmisch's API changes. need massive testing and more fixes to handle various strings
parent 1affc74d
...@@ -270,7 +270,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -270,7 +270,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
} }
[o_file_sub_encoding_pop selectItemWithTitle: [o_file_sub_encoding_pop selectItemWithTitle:
[NSString stringWithCString: [NSString stringWithCString:
p_item->psz_value]]; p_item->value.psz]];
} }
p_item = config_FindConfig( VLC_OBJECT(p_intf), "subsdec-align" ); p_item = config_FindConfig( VLC_OBJECT(p_intf), "subsdec-align" );
...@@ -283,7 +283,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -283,7 +283,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[NSString stringWithUTF8String: [NSString stringWithUTF8String:
p_item->ppsz_list_text[i_index]]]; p_item->ppsz_list_text[i_index]]];
} }
[o_file_sub_align_pop selectItemAtIndex: p_item->i_value]; [o_file_sub_align_pop selectItemAtIndex: p_item->value.i];
} }
p_item = config_FindConfig( VLC_OBJECT(p_intf), "freetype-rel-fontsize" ); p_item = config_FindConfig( VLC_OBJECT(p_intf), "freetype-rel-fontsize" );
...@@ -295,7 +295,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -295,7 +295,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_file_sub_size_pop addItemWithTitle: [o_file_sub_size_pop addItemWithTitle:
[NSString stringWithUTF8String: [NSString stringWithUTF8String:
p_item->ppsz_list_text[i_index]]]; p_item->ppsz_list_text[i_index]]];
if ( p_item->i_value == p_item->pi_list[i_index] ) if ( p_item->value.i == p_item->pi_list[i_index] )
{ {
[o_file_sub_size_pop selectItemAtIndex: i_index]; [o_file_sub_size_pop selectItemAtIndex: i_index];
} }
......
...@@ -272,13 +272,19 @@ static VLCTreeItem *o_root_item = nil; ...@@ -272,13 +272,19 @@ static VLCTreeItem *o_root_item = nil;
intf_thread_t *p_intf = VLCIntf; intf_thread_t *p_intf = VLCIntf;
vlc_list_t *p_list; vlc_list_t *p_list;
module_t *p_module = NULL; module_t *p_module = NULL;
module_config_t *p_item; module_t *p_parser;
module_config_t *p_item,
*p_end;
int i_index; int i_index;
/* List the modules */ /* List the modules */
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 nil; if( !p_list ) return nil;
/* get parser */
p_parser = (module_t *)p_list->p_values[i_index].p_object;
p_end = p_parser->p_config + p_parser->confsize;
if( [[self getName] isEqualToString: @"main"] ) if( [[self getName] isEqualToString: @"main"] )
{ {
/* /*
...@@ -312,47 +318,47 @@ static VLCTreeItem *o_root_item = nil; ...@@ -312,47 +318,47 @@ static VLCTreeItem *o_root_item = nil;
switch( p_item->i_type ) switch( p_item->i_type )
{ {
case CONFIG_CATEGORY: case CONFIG_CATEGORY:
if( p_item->i_value == -1 ) break; if( p_item->value.i == -1 ) break;
o_child_name = [[VLCMain sharedInstance] o_child_name = [[VLCMain sharedInstance]
localizedString: config_CategoryNameGet( p_item->i_value )]; localizedString: config_CategoryNameGet( p_item->value.i )];
o_child_title = o_child_name; o_child_title = o_child_name;
o_child_help = [[VLCMain sharedInstance] o_child_help = [[VLCMain sharedInstance]
localizedString: config_CategoryHelpGet( p_item->i_value )]; localizedString: config_CategoryHelpGet( p_item->value.i )];
p_last_category = [VLCTreeItem alloc]; p_last_category = [VLCTreeItem alloc];
[o_children addObject:[p_last_category [o_children addObject:[p_last_category
initWithName: o_child_name initWithName: o_child_name
withTitle: o_child_title withTitle: o_child_title
withHelp: o_child_help withHelp: o_child_help
ID: p_item->i_value ID: p_item->value.i
parent:self parent:self
children:[[NSMutableArray alloc] children:[[NSMutableArray alloc]
initWithCapacity:10] initWithCapacity:10]
whithCategory: p_item - p_module->p_config]]; whithCategory: p_item - p_module->p_config]];
break; break;
case CONFIG_SUBCATEGORY: case CONFIG_SUBCATEGORY:
if( p_item->i_value == -1 ) break; if( p_item->value.i == -1 ) break;
if( p_item->i_value != SUBCAT_PLAYLIST_GENERAL && if( p_item->value.i != SUBCAT_PLAYLIST_GENERAL &&
p_item->i_value != SUBCAT_VIDEO_GENERAL && p_item->value.i != SUBCAT_VIDEO_GENERAL &&
p_item->i_value != SUBCAT_INPUT_GENERAL && p_item->value.i != SUBCAT_INPUT_GENERAL &&
p_item->i_value != SUBCAT_INTERFACE_GENERAL && p_item->value.i != SUBCAT_INTERFACE_GENERAL &&
p_item->i_value != SUBCAT_SOUT_GENERAL && p_item->value.i != SUBCAT_SOUT_GENERAL &&
p_item->i_value != SUBCAT_ADVANCED_MISC && p_item->value.i != SUBCAT_ADVANCED_MISC &&
p_item->i_value != SUBCAT_AUDIO_GENERAL ) p_item->value.i != SUBCAT_AUDIO_GENERAL )
{ {
o_child_name = [[VLCMain sharedInstance] o_child_name = [[VLCMain sharedInstance]
localizedString: config_CategoryNameGet( p_item->i_value ) ]; localizedString: config_CategoryNameGet( p_item->value.i ) ];
o_child_title = o_child_name; o_child_title = o_child_name;
o_child_help = [[VLCMain sharedInstance] o_child_help = [[VLCMain sharedInstance]
localizedString: config_CategoryHelpGet( p_item->i_value ) ]; localizedString: config_CategoryHelpGet( p_item->value.i ) ];
[p_last_category->o_children [p_last_category->o_children
addObject:[[VLCTreeItem alloc] addObject:[[VLCTreeItem alloc]
initWithName: o_child_name initWithName: o_child_name
withTitle: o_child_title withTitle: o_child_title
withHelp: o_child_help withHelp: o_child_help
ID: p_item->i_value ID: p_item->value.i
parent:p_last_category parent:p_last_category
children:[[NSMutableArray alloc] children:[[NSMutableArray alloc]
initWithCapacity:10] initWithCapacity:10]
...@@ -363,7 +369,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -363,7 +369,7 @@ static VLCTreeItem *o_root_item = nil;
default: default:
break; break;
} }
} while( p_item->i_type != CONFIG_HINT_END && p_item++ ); } while( p_item < p_end && p_item++ );
} }
/* Build a tree of the plugins */ /* Build a tree of the plugins */
...@@ -390,15 +396,15 @@ static VLCTreeItem *o_root_item = nil; ...@@ -390,15 +396,15 @@ static VLCTreeItem *o_root_item = nil;
do do
{ {
if( p_item->i_type == CONFIG_CATEGORY ) if( p_item->i_type == CONFIG_CATEGORY )
i_category = p_item->i_value; i_category = p_item->value.i;
else if( p_item->i_type == CONFIG_SUBCATEGORY ) else if( p_item->i_type == CONFIG_SUBCATEGORY )
i_subcategory = p_item->i_value; i_subcategory = p_item->value.i;
if( p_item->i_type & CONFIG_ITEM ) if( p_item->i_type & CONFIG_ITEM )
i_options ++; i_options ++;
if( i_options > 0 && i_category >= 0 && i_subcategory >= 0 ) if( i_options > 0 && i_category >= 0 && i_subcategory >= 0 )
break; break;
} while( p_item->i_type != CONFIG_HINT_END && p_item++ ); } while( p_item < p_end && p_item++ );
if( !i_options ) continue; if( !i_options ) continue;
/* Find the right category item */ /* Find the right category item */
...@@ -533,7 +539,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -533,7 +539,8 @@ static VLCTreeItem *o_root_item = nil;
intf_thread_t *p_intf = VLCIntf; intf_thread_t *p_intf = VLCIntf;
vlc_list_t *p_list; vlc_list_t *p_list;
module_t *p_parser = NULL; module_t *p_parser = NULL;
module_config_t *p_item; module_config_t *p_item,
*p_end = p_parser->p_config + p_parser->confsize;
o_subviews = [[NSMutableArray alloc] initWithCapacity:10]; o_subviews = [[NSMutableArray alloc] initWithCapacity:10];
/* Get a pointer to the module */ /* Get a pointer to the module */
...@@ -556,6 +563,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -556,6 +563,8 @@ static VLCTreeItem *o_root_item = nil;
msg_Err( p_intf, "invalid preference item found" ); msg_Err( p_intf, "invalid preference item found" );
break; break;
} }
if( p_item < p_end )
break;
switch(p_item->i_type) switch(p_item->i_type)
{ {
case CONFIG_SUBCATEGORY: case CONFIG_SUBCATEGORY:
...@@ -564,8 +573,6 @@ static VLCTreeItem *o_root_item = nil; ...@@ -564,8 +573,6 @@ static VLCTreeItem *o_root_item = nil;
break; break;
case CONFIG_SECTION: case CONFIG_SECTION:
break; break;
case CONFIG_HINT_END:
break;
case CONFIG_HINT_USAGE: case CONFIG_HINT_USAGE:
break; break;
default: default:
...@@ -582,7 +589,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -582,7 +589,7 @@ static VLCTreeItem *o_root_item = nil;
} }
break; break;
} }
} while( p_item++->i_type != CONFIG_HINT_END ); } while( p_item < p_end && p_item++ );
vlc_object_release( p_parser ); vlc_object_release( p_parser );
} }
...@@ -608,12 +615,12 @@ static VLCTreeItem *o_root_item = nil; ...@@ -608,12 +615,12 @@ static VLCTreeItem *o_root_item = nil;
} }
p_item = (p_parser->p_config + i_object_category); p_item = (p_parser->p_config + i_object_category);
if( ( p_item->i_type == CONFIG_CATEGORY ) && if( ( p_item->i_type == CONFIG_CATEGORY ) &&
( ( p_item->i_value == CAT_PLAYLIST ) || ( ( p_item->value.i == CAT_PLAYLIST ) ||
( p_item->i_value == CAT_AUDIO ) || ( p_item->value.i == CAT_AUDIO ) ||
( p_item->i_value == CAT_VIDEO ) || ( p_item->value.i == CAT_VIDEO ) ||
( p_item->i_value == CAT_INTERFACE ) || ( p_item->value.i == CAT_INTERFACE ) ||
( p_item->i_value == CAT_INPUT ) || ( p_item->value.i == CAT_INPUT ) ||
( p_item->i_value == CAT_SOUT ) ) ) ( p_item->value.i == CAT_SOUT ) ) )
p_item++; p_item++;
do do
...@@ -624,6 +631,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -624,6 +631,8 @@ static VLCTreeItem *o_root_item = nil;
msg_Err( p_intf, "invalid preference item found" ); msg_Err( p_intf, "invalid preference item found" );
break; break;
} }
if( p_item < p_end )
break;
switch( p_item->i_type ) switch( p_item->i_type )
{ {
case CONFIG_SUBCATEGORY: case CONFIG_SUBCATEGORY:
...@@ -632,8 +641,6 @@ static VLCTreeItem *o_root_item = nil; ...@@ -632,8 +641,6 @@ static VLCTreeItem *o_root_item = nil;
break; break;
case CONFIG_SECTION: case CONFIG_SECTION:
break; break;
case CONFIG_HINT_END:
break;
case CONFIG_HINT_USAGE: case CONFIG_HINT_USAGE:
break; break;
default: default:
...@@ -654,7 +661,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -654,7 +661,7 @@ static VLCTreeItem *o_root_item = nil;
break; break;
} }
} }
} while ( ( p_item->i_type != CONFIG_HINT_END ) && } while ( ( p_item < p_end ) &&
( p_item->i_type != CONFIG_SUBCATEGORY ) ); ( p_item->i_type != CONFIG_SUBCATEGORY ) );
vlc_list_release( p_list ); vlc_list_release( p_list );
......
...@@ -857,7 +857,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -857,7 +857,7 @@ if( MACOS_VERSION >= 10.3 ) \
initWithItem: _p_item initWithItem: _p_item
withView: o_parent_view]; withView: o_parent_view];
} }
else if( _p_item->i_min != 0 || _p_item->i_max != 0 ) else if( _p_item->min.i != 0 || _p_item->max.i != 0 )
{ {
p_control = [[RangedIntegerConfigControl alloc] p_control = [[RangedIntegerConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
...@@ -876,7 +876,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -876,7 +876,7 @@ if( MACOS_VERSION >= 10.3 ) \
withView: o_parent_view]; withView: o_parent_view];
break; break;
case CONFIG_ITEM_FLOAT: case CONFIG_ITEM_FLOAT:
if( _p_item->f_min != 0 || _p_item->f_max != 0 ) if( _p_item->min.f != 0 || _p_item->max.f != 0 )
{ {
p_control = [[RangedFloatConfigControl alloc] p_control = [[RangedFloatConfigControl alloc]
initWithItem: _p_item initWithItem: _p_item
...@@ -1017,9 +1017,9 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1017,9 +1017,9 @@ if( MACOS_VERSION >= 10.3 ) \
o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: o_textfieldTooltip = [[VLCMain sharedInstance] wrapString:
[[VLCMain sharedInstance] localizedString: p_item->psz_longtext] [[VLCMain sharedInstance] localizedString: p_item->psz_longtext]
toWidth: PREFS_WRAP]; toWidth: PREFS_WRAP];
if( p_item->psz_value ) if( p_item->value.psz )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = [[VLCMain sharedInstance]
localizedString: p_item->psz_value]; localizedString: p_item->value.psz];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2, ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
...@@ -1091,8 +1091,8 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1091,8 +1091,8 @@ if( MACOS_VERSION >= 10.3 ) \
-2, 0, o_textfieldTooltip ) -2, 0, o_textfieldTooltip )
[o_combo setAutoresizingMask:NSViewWidthSizable ]; [o_combo setAutoresizingMask:NSViewWidthSizable ];
for( i_index = 0; i_index < p_item->i_list; i_index++ ) for( i_index = 0; i_index < p_item->i_list; i_index++ )
if( p_item->psz_value && if( p_item->value.psz &&
!strcmp( p_item->psz_value, p_item->ppsz_list[i_index] ) ) !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
[o_combo selectItemAtIndex: i_index]; [o_combo selectItemAtIndex: i_index];
[self addSubview: o_combo]; [self addSubview: o_combo];
} }
...@@ -1188,9 +1188,9 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1188,9 +1188,9 @@ if( MACOS_VERSION >= 10.3 ) \
o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: o_textfieldTooltip = [[VLCMain sharedInstance] wrapString:
[[VLCMain sharedInstance] [[VLCMain sharedInstance]
localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP]; localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
if( p_item->psz_value ) if( p_item->value.psz )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = [[VLCMain sharedInstance]
localizedString: p_item->psz_value]; localizedString: p_item->value.psz];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
ADD_TEXTFIELD( o_textfield, mainFrame, 12, 2, mainFrame.size.width - ADD_TEXTFIELD( o_textfield, mainFrame, 12, 2, mainFrame.size.width -
...@@ -1270,6 +1270,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1270,6 +1270,7 @@ if( MACOS_VERSION >= 10.3 ) \
int i_index; int i_index;
vlc_list_t *p_list; vlc_list_t *p_list;
module_t *p_parser; module_t *p_parser;
module_config_t *p_end;
i_view_type = CONFIG_ITEM_MODULE; i_view_type = CONFIG_ITEM_MODULE;
/* add the label */ /* add the label */
...@@ -1297,7 +1298,8 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1297,7 +1298,8 @@ if( MACOS_VERSION >= 10.3 ) \
p_list = vlc_list_find( VLCIntf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); p_list = vlc_list_find( VLCIntf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
for( i_index = 0; i_index < p_list->i_count; i_index++ ) for( i_index = 0; i_index < p_list->i_count; i_index++ )
{ {
p_parser = (module_t *)p_list->p_values[i_index].p_object ; p_parser = (module_t *)p_list->p_values[i_index].p_object;
p_end = p_item + p_parser->confsize;
if( p_item->i_type == CONFIG_ITEM_MODULE ) if( p_item->i_type == CONFIG_ITEM_MODULE )
{ {
if( !strcmp( p_parser->psz_capability, if( !strcmp( p_parser->psz_capability,
...@@ -1307,8 +1309,8 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1307,8 +1309,8 @@ if( MACOS_VERSION >= 10.3 ) \
localizedString: p_parser->psz_longname]; localizedString: p_parser->psz_longname];
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
if( p_item->psz_value && if( p_item->value.psz &&
!strcmp( p_item->psz_value, p_parser->psz_object_name ) ) !strcmp( p_item->value.psz, p_parser->psz_object_name ) )
[o_popup selectItem:[o_popup lastItem]]; [o_popup selectItem:[o_popup lastItem]];
} }
} }
...@@ -1323,17 +1325,17 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1323,17 +1325,17 @@ if( MACOS_VERSION >= 10.3 ) \
{ {
/* Hack: required subcategory is stored in i_min */ /* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY && if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->i_value == p_item->i_min ) p_config->value.i == p_item->min.i )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = [[VLCMain sharedInstance]
localizedString: p_parser->psz_longname]; localizedString: p_parser->psz_longname];
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
if( p_item->psz_value && !strcmp(p_item->psz_value, if( p_item->value.psz && !strcmp(p_item->value.psz,
p_parser->psz_object_name) ) p_parser->psz_object_name) )
[o_popup selectItem:[o_popup lastItem]]; [o_popup selectItem:[o_popup lastItem]];
} }
} while( p_config->i_type != CONFIG_HINT_END && p_config++ ); } while( p_item < p_end && p_config++ );
} }
} }
vlc_list_release( p_list ); vlc_list_release( p_list );
...@@ -1369,11 +1371,13 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1369,11 +1371,13 @@ if( MACOS_VERSION >= 10.3 ) \
int i_index; int i_index;
vlc_list_t *p_list; vlc_list_t *p_list;
module_t *p_parser; module_t *p_parser;
module_config_t *p_end;
p_list = vlc_list_find( VLCIntf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); p_list = vlc_list_find( VLCIntf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
for( i_index = 0; i_index < p_list->i_count; i_index++ ) for( i_index = 0; i_index < p_list->i_count; i_index++ )
{ {
p_parser = (module_t *)p_list->p_values[i_index].p_object ; p_parser = (module_t *)p_list->p_values[i_index].p_object;
p_end = p_item + p_parser->confsize;
if( p_item->i_type == CONFIG_ITEM_MODULE ) if( p_item->i_type == CONFIG_ITEM_MODULE )
{ {
if( !strcmp( p_parser->psz_capability, if( !strcmp( p_parser->psz_capability,
...@@ -1399,7 +1403,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1399,7 +1403,7 @@ if( MACOS_VERSION >= 10.3 ) \
{ {
/* Hack: required subcategory is stored in i_min */ /* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY && if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->i_value == p_item->i_min ) p_config->value.i == p_item->min.i )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = [[VLCMain sharedInstance]
localizedString: p_parser->psz_longname]; localizedString: p_parser->psz_longname];
...@@ -1409,7 +1413,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1409,7 +1413,7 @@ if( MACOS_VERSION >= 10.3 ) \
break; break;
} }
} }
} while( p_config->i_type != CONFIG_HINT_END && p_config++ ); } while( p_item < p_end && p_config++ );
} }
} }
vlc_list_release( p_list ); vlc_list_release( p_list );
...@@ -1449,19 +1453,19 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1449,19 +1453,19 @@ if( MACOS_VERSION >= 10.3 ) \
/* build the stepper */ /* build the stepper */
ADD_STEPPER( o_stepper, mainFrame, mainFrame.size.width - 19, ADD_STEPPER( o_stepper, mainFrame, mainFrame.size.width - 19,
0, o_tooltip, -1600, 1600) 0, o_tooltip, -1600, 1600)
[o_stepper setIntValue: p_item->i_value]; [o_stepper setIntValue: p_item->value.i];
[o_stepper setAutoresizingMask:NSViewMaxXMargin ]; [o_stepper setAutoresizingMask:NSViewMaxXMargin ];
[self addSubview: o_stepper]; [self addSubview: o_stepper];
/* build the textfield */ /* build the textfield */
if( p_item->psz_value ) if( p_item->value.psz )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = [[VLCMain sharedInstance]
localizedString: p_item->psz_value]; localizedString: p_item->value.psz];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
ADD_TEXTFIELD( o_textfield, mainFrame, mainFrame.size.width - 19 - 52, ADD_TEXTFIELD( o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
1, 49, o_tooltip, @"" ) 1, 49, o_tooltip, @"" )
[o_textfield setIntValue: p_item->i_value]; [o_textfield setIntValue: p_item->value.i];
[o_textfield setDelegate: self]; [o_textfield setDelegate: self];
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(textfieldChanged:) selector: @selector(textfieldChanged:)
...@@ -1549,7 +1553,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1549,7 +1553,7 @@ if( MACOS_VERSION >= 10.3 ) \
[o_combo setAutoresizingMask:NSViewWidthSizable ]; [o_combo setAutoresizingMask:NSViewWidthSizable ];
for( i_index = 0; i_index < p_item->i_list; i_index++ ) for( i_index = 0; i_index < p_item->i_list; i_index++ )
{ {
if( p_item->i_value == p_item->pi_list[i_index] ) if( p_item->value.i == p_item->pi_list[i_index] )
{ {
[o_combo selectItemAtIndex: i_index]; [o_combo selectItemAtIndex: i_index];
} }
...@@ -1635,7 +1639,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1635,7 +1639,7 @@ if( MACOS_VERSION >= 10.3 ) \
localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP]; localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2, ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
28, 49, o_tooltip, @"" ) 28, 49, o_tooltip, @"" )
[o_textfield setIntValue: p_item->i_value]; [o_textfield setIntValue: p_item->value.i];
[o_textfield setAutoresizingMask:NSViewMaxXMargin ]; [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield setDelegate: self]; [o_textfield setDelegate: self];
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
...@@ -1646,7 +1650,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1646,7 +1650,7 @@ if( MACOS_VERSION >= 10.3 ) \
/* build the mintextfield */ /* build the mintextfield */
ADD_LABEL( o_textfield_min, mainFrame, 12, -30, @"-8888" ) ADD_LABEL( o_textfield_min, mainFrame, 12, -30, @"-8888" )
[o_textfield_min setIntValue: p_item->i_min]; [o_textfield_min setIntValue: p_item->min.i];
[o_textfield_min setAutoresizingMask:NSViewMaxXMargin ]; [o_textfield_min setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield_min setAlignment:NSRightTextAlignment]; [o_textfield_min setAlignment:NSRightTextAlignment];
[self addSubview: o_textfield_min]; [self addSubview: o_textfield_min];
...@@ -1654,7 +1658,7 @@ if( MACOS_VERSION >= 10.3 ) \ ...@@ -1654,7 +1658,7 @@ if( MACOS_VERSION >= 10.3 ) \
/* build the maxtextfield */ /* build the maxtextfield */
ADD_LABEL( o_textfield_max, mainFrame, ADD_LABEL( o_textfield_max, mainFrame,
mainFrame.size.width - 31, -30, @"8888" ) mainFrame.size.width - 31, -30, @"8888" )
[o_textfield_max setIntValue: p_item->i_max]; [o_textfield_max setIntValue: p_item->max.i];
[o_textfield_max setAutoresizingMask:NSViewMinXMargin ]; [o_textfield_max setAutoresizingMask:NSViewMinXMargin ];