diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-13 12:53:05 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-13 12:53:05 -0400 |
| commit | 963feb6c0668b3c64242607fe71f458420a91f32 (patch) | |
| tree | 89876bc232359f6b166dc325a609bf27cac05ed7 /new/tab_darwin.m | |
| parent | e4147f14afecc95db90430143d672512a9e92bdb (diff) | |
Converted and fixed the Mac OS X code for uiParent. I'm still not happy, but this is DEFINITELY a step in the right direction... Perhaps automatic deletion is a pipe dream :/ I should also really nail the parenting/unparenting logic, but for that I need to add one more method.
Diffstat (limited to 'new/tab_darwin.m')
| -rw-r--r-- | new/tab_darwin.m | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/new/tab_darwin.m b/new/tab_darwin.m index 4e835b3..c36181e 100644 --- a/new/tab_darwin.m +++ b/new/tab_darwin.m @@ -13,6 +13,7 @@ - (void)viewDidMoveToSuperview { + // TODO free all tabs explicitly if (uiDarwinControlFreeWhenAppropriate(self.uiC, [self superview])) self.uiC = NULL; [super viewDidMoveToSuperview]; @@ -52,16 +53,15 @@ uiControl *uiNewTab(void) void uiTabAddPage(uiControl *c, const char *name, uiControl *child) { uiNSTabView *tv; - uiContainer *container; + uiParent *content; NSTabViewItem *i; - container = [[uiContainer alloc] initWithFrame:NSZeroRect]; - container.uiChild = child; - uiControlSetParent(container.uiChild, (uintptr_t) container); + content = uiNewParent(0); + uiParentSetChild(content, child); i = [[NSTabViewItem alloc] initWithIdentifier:nil]; [i setLabel:toNSString(name)]; - [i setView:container]; + [i setView:((NSView *) uiParentHandle(content))]; tv = (uiNSTabView *) uiControlHandle(c); [tv addTabViewItem:i]; } |
