Browse Source

macosx/prefswidget: fix initilization

pull/70/head
Felix Paul Kühne 8 years ago
parent
commit
2378131a7c
  1. 16
      modules/gui/macosx/prefs_widgets.m

16
modules/gui/macosx/prefs_widgets.m

@ -406,8 +406,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self != nil) {
_p_item = p_item;
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,8 +2088,7 @@ 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];
@ -2102,7 +2110,7 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
[self addSubview: o_textfield];
[self addSubview: o_tableview];
}
return self;
}

Loading…
Cancel
Save