Resolved some TODOs (including one resolved a while ago on IRC but not removed until now; thanks various people in irc.freenode.net/#macdev).
This commit is contained in:
parent
6f5b5dc4e4
commit
b4d527736c
|
@ -2,8 +2,6 @@
|
|||
#import <stdio.h>
|
||||
#import "uipriv_darwin.h"
|
||||
|
||||
// TODO is there a better alternative to NSCAssert()? preferably a built-in allocator that panics on out of memory for us?
|
||||
|
||||
void *uiAlloc(size_t size, const char *type)
|
||||
{
|
||||
void *out;
|
||||
|
|
|
@ -17,9 +17,9 @@ uiLogObjCClassAllocations
|
|||
- (void)viewDidMoveToSuperview
|
||||
{
|
||||
if ([self superview] == nil)
|
||||
if (self.child != NULL) {
|
||||
uiControlDestroy(self.child);
|
||||
self.child = NULL;
|
||||
if (self.uiChild != NULL) {
|
||||
uiControlDestroy(self.uiChild);
|
||||
self.uiChild = NULL;
|
||||
}
|
||||
[super viewDidMoveToSuperview];
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ uiLogObjCClassAllocations
|
|||
uiSizing d;
|
||||
intmax_t x, y, width, height;
|
||||
|
||||
if (self.child == NULL)
|
||||
if (self.uiChild == NULL)
|
||||
return;
|
||||
x = [self bounds].origin.x;
|
||||
y = [self bounds].origin.y;
|
||||
|
@ -56,7 +56,7 @@ uiLogObjCClassAllocations
|
|||
}
|
||||
d.xPadding = macXPadding;
|
||||
d.yPadding = macYPadding;
|
||||
uiControlResize(self.child, x, y, width, height, &d);
|
||||
uiControlResize(self.uiChild, x, y, width, height, &d);
|
||||
}
|
||||
|
||||
- (BOOL)uiMargined
|
||||
|
|
|
@ -29,8 +29,7 @@ extern void setStandardControlFont(NSControl *);
|
|||
|
||||
// container_darwin.m
|
||||
@interface uiContainer : NSView
|
||||
// TODO rename to uiChild
|
||||
@property uiControl *child;
|
||||
@property uiControl *uiChild;
|
||||
- (void)uiUpdateNow;
|
||||
- (BOOL)uiMargined;
|
||||
- (void)uiSetMargined:(BOOL)margined;
|
||||
|
|
|
@ -107,8 +107,8 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data)
|
|||
|
||||
void uiWindowSetChild(uiWindow *w, uiControl *c)
|
||||
{
|
||||
D.container.child = c;
|
||||
uiControlSetParent(D.container.child, (uintptr_t) (D.container));
|
||||
D.container.uiChild = c;
|
||||
uiControlSetParent(D.container.uiChild, (uintptr_t) (D.container));
|
||||
}
|
||||
|
||||
int uiWindowMargined(uiWindow *w)
|
||||
|
|
Loading…
Reference in New Issue