|
|
|
@ -406,8 +406,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \ |
|
|
|
|
|
|
|
if (self != nil) { |
|
|
|
_p_item = p_item; |
|
|
|
psz_name = p_item->psz_name; |
|
|
|
_type = p_item->i_type; |
|
|
|
if (p_item) { |
|
|
|
psz_name = p_item->psz_name; |
|
|
|
_type = p_item->i_type; |
|
|
|
} else { |
|
|
|
psz_name = NULL; |
|
|
|
} |
|
|
|
[self setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin ]; |
|
|
|
} |
|
|
|
return (self); |
|
|
|
@ -1940,6 +1944,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \ |
|
|
|
- (id)initWithItem:(module_config_t *)p_item |
|
|
|
withView:(NSView *)parentView |
|
|
|
{ |
|
|
|
self = [super initWithFrame:CGRectZero item:p_item]; |
|
|
|
if (!self) { |
|
|
|
return self; |
|
|
|
} |
|
|
|
self.viewType = CONFIG_ITEM_MODULE_LIST; |
|
|
|
|
|
|
|
BOOL b_by_cat = p_item->i_type == CONFIG_ITEM_MODULE_LIST_CAT; |
|
|
|
|
|
|
|
//Fill our array to know how may items we have... |
|
|
|
@ -2010,7 +2020,6 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\ |
|
|
|
} |
|
|
|
module_config_free(p_configlist); |
|
|
|
|
|
|
|
|
|
|
|
} else if (module_provides(p_parser, p_item->psz_type)) { |
|
|
|
|
|
|
|
NSString *o_modulelongname = toNSStr(module_get_name(p_parser, TRUE)); |
|
|
|
@ -2079,30 +2088,29 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\ |
|
|
|
mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; |
|
|
|
mainFrame.origin.x = LEFTMARGIN; |
|
|
|
mainFrame.origin.y = 0; |
|
|
|
if (self = [super initWithFrame:mainFrame item:p_item]) { |
|
|
|
self.viewType = CONFIG_ITEM_MODULE_LIST; |
|
|
|
self.frame = mainFrame; |
|
|
|
|
|
|
|
toolTip = [[VLCStringUtility sharedInstance] wrapString: _NS(p_item->psz_longtext) toWidth: PREFS_WRAP]; |
|
|
|
toolTip = [[VLCStringUtility sharedInstance] wrapString: _NS(p_item->psz_longtext) toWidth: PREFS_WRAP]; |
|
|
|
|
|
|
|
/* add the label */ |
|
|
|
labelString = _NS((char *)p_item->psz_text); |
|
|
|
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip) |
|
|
|
[self.label setAutoresizingMask:NSViewNotSizable ]; |
|
|
|
[self addSubview: self.label]; |
|
|
|
/* add the label */ |
|
|
|
labelString = _NS((char *)p_item->psz_text); |
|
|
|
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip) |
|
|
|
[self.label setAutoresizingMask:NSViewNotSizable ]; |
|
|
|
[self addSubview: self.label]; |
|
|
|
|
|
|
|
/* build the textfield */ |
|
|
|
if (p_item->value.psz) |
|
|
|
o_textfieldString = _NS(p_item->value.psz); |
|
|
|
else |
|
|
|
o_textfieldString = @""; |
|
|
|
ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2, |
|
|
|
mainFrame.size.height - 22, mainFrame.size.width - |
|
|
|
[self.label frame].size.width - 2, toolTip, o_textfieldString) |
|
|
|
[o_textfield setAutoresizingMask:NSViewWidthSizable ]; |
|
|
|
[self addSubview: o_textfield]; |
|
|
|
/* build the textfield */ |
|
|
|
if (p_item->value.psz) |
|
|
|
o_textfieldString = _NS(p_item->value.psz); |
|
|
|
else |
|
|
|
o_textfieldString = @""; |
|
|
|
ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2, |
|
|
|
mainFrame.size.height - 22, mainFrame.size.width - |
|
|
|
[self.label frame].size.width - 2, toolTip, o_textfieldString) |
|
|
|
[o_textfield setAutoresizingMask:NSViewWidthSizable ]; |
|
|
|
[self addSubview: o_textfield]; |
|
|
|
|
|
|
|
[self addSubview: o_tableview]; |
|
|
|
|
|
|
|
[self addSubview: o_tableview]; |
|
|
|
} |
|
|
|
return self; |
|
|
|
} |
|
|
|
|
|
|
|
|