diff options
author | Johan Paulsson <gonz@badcode.net> | 2014-03-23 02:48:06 +0000 |
---|---|---|
committer | Johan Paulsson <gonz@badcode.net> | 2014-03-23 02:48:06 +0000 |
commit | 5532f8878b7219720de6145eabbe57efb894957c (patch) | |
tree | 25e3ce1d092bc3e57096f63989e98409870d3e9b /tikzit/src/osx/PreferenceController.m | |
parent | 2d6b88d5d016237acbc8cb63f2cf2477ccfe9e69 (diff) |
Converting from GC to ARC
This should only be for the osx specific code as all common files are left out. Hopefully this shouldn't introduce any problems on the other systems.
Diffstat (limited to 'tikzit/src/osx/PreferenceController.m')
-rw-r--r-- | tikzit/src/osx/PreferenceController.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tikzit/src/osx/PreferenceController.m b/tikzit/src/osx/PreferenceController.m index ab992ed..099bf48 100644 --- a/tikzit/src/osx/PreferenceController.m +++ b/tikzit/src/osx/PreferenceController.m @@ -30,8 +30,8 @@ @implementation PreferenceController -- (id)initWithWindowNibName:(NSString *)windowNibName preambleController:(PreambleController*)pc{ - [super initWithWindowNibName:windowNibName]; +- (id)initWithWindowNibName:(NSString *)windowNibName preambleController:(PreambleController *)pc{ + if (!(self = [super initWithWindowNibName:windowNibName])) return nil; preambleController = pc; @@ -69,6 +69,9 @@ case 3: view = preambleView; break; + case 4: + view = customNodeView; + break; } return view; @@ -96,6 +99,11 @@ [[[self window] contentView] replaceSubview:preambleView with:[preambleController view]]; preambleView = [preambleController view]; + customNodeController = [[CustomNodeController alloc] initWithNibName:@"CustomNodes" bundle:nil]; + [[customNodeController view] setFrame:[customNodeView frame]]; + [[[self window] contentView] replaceSubview:customNodeView with:[customNodeController view]]; + customNodeView = [customNodeController view]; + [[self window] setContentSize:[preambleView frame].size]; [[[self window] contentView] addSubview:preambleView]; currentViewTag = 3; |