/*****************************************************************************
* prefs_widgets.m: Preferences controls
*****************************************************************************
- * Copyright (C) 2002-2003 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2002-2003 the VideoLAN team
* $Id$
*
* Authors: Derk-Jan Hartman <hartman at videolan.org>
{
return [o_label frame].size.width;
}
+
+- (void) alignWithXPosition:(int)i_xPos;
+{
+ /* FIXME: not implemented atm, but created to shut up the warning
+ * about "method definition not found" -- FK @ 7/24/05 */
+}
@end
@implementation StringConfigControl
{
i_view_type = CONFIG_ITEM_BOOL;
+ /* add the checkbox */
+ o_tooltip = [[VLCMain sharedInstance]
+ wrapString: [[VLCMain sharedInstance]
+ localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
+ ADD_CHECKBOX( o_checkbox, mainFrame, 0,
+ 0, @"", o_tooltip, p_item->i_value, NSImageLeft)
+ [o_checkbox setAutoresizingMask:NSViewNotSizable ];
+ [self addSubview: o_checkbox];
/* add the label */
if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance]
localizedString: p_item->psz_text];
else
o_labelString = [NSString stringWithString:@""];
- ADD_LABEL( o_label, mainFrame, 0, 0, o_labelString )
+ ADD_LABEL( o_label, mainFrame, [o_checkbox frame].size.width, 0, o_labelString )
[o_label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: o_label];
- /* add the checkbox */
- o_tooltip = [[VLCMain sharedInstance]
- wrapString: [[VLCMain sharedInstance]
- localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
- ADD_CHECKBOX( o_checkbox, mainFrame, [o_label frame].size.width,
- 0, @"", o_tooltip, p_item->i_value, NSImageLeft)
- [o_checkbox setAutoresizingMask:NSViewNotSizable ];
- [self addSubview: o_checkbox];
}
return self;
}
-- (void) alignWithXPosition:(int)i_xPos
-{
- NSRect frame;
- frame = [o_label frame];
- frame.origin.x = i_xPos - frame.size.width - 3;
- [o_label setFrame:frame];
-
- frame = [o_checkbox frame];
- frame.origin.x = i_xPos;
- [o_checkbox setFrame:frame];
-}
-
- (void)dealloc
{
[o_checkbox release];
i_new_key |= ([o_shift_checkbox state] == NSOnState) ?
KEY_MODIFIER_SHIFT : 0;
- i_new_key |= StringToKey([[[o_popup selectedItem] title] cString]);
+ i_new_key |= StringToKey((char *)[[[o_popup selectedItem] title] cString]);
return i_new_key;
}
@end