Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions Source/DBPrefsWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ - (void)windowDidLoad
// Create a new window to display the preference views.
// If the developer attached a window to this controller
// in Interface Builder, it gets replaced with this one.
NSWindow *window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
styleMask:(NSTitledWindowMask |
NSClosableWindowMask |
NSMiniaturizableWindowMask)
backing:NSBackingStoreBuffered
defer:YES] autorelease];
defer:YES];
[self setWindow:window];
contentSubview = [[[NSView alloc] initWithFrame:[[[self window] contentView] frame]] autorelease];
contentSubview = [[NSView alloc] initWithFrame:[[[self window] contentView] frame]];
[contentSubview setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)];
[[[self window] contentView] addSubview:contentSubview];
[[self window] setShowsToolbarButton:NO];
Expand All @@ -90,17 +90,6 @@ - (void)windowDidLoad



- (void) dealloc {
[toolbarIdentifiers release];
[toolbarViews release];
[toolbarItems release];
[viewAnimation release];
[super dealloc];
}




#pragma mark -
#pragma mark Configuration

Expand Down Expand Up @@ -129,12 +118,12 @@ - (void)addView:(NSView *)view label:(NSString *)label image:(NSImage *)image
NSAssert (view != nil,
@"Attempted to add a nil view when calling -addView:label:image:.");

NSString *identifier = [[label copy] autorelease];
NSString *identifier = [label copy];

[toolbarIdentifiers addObject:identifier];
[toolbarViews setObject:view forKey:identifier];

NSToolbarItem *item = [[[NSToolbarItem alloc] initWithItemIdentifier:identifier] autorelease];
NSToolbarItem *item = [[NSToolbarItem alloc] initWithItemIdentifier:identifier];
[item setLabel:label];
[item setImage:image];
[item setTarget:self];
Expand Down Expand Up @@ -208,7 +197,6 @@ - (IBAction)showWindow:(id)sender
[toolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel];
[toolbar setDelegate:(id<NSToolbarDelegate>)self];
[[self window] setToolbar:toolbar];
[toolbar release];
}

NSString *firstIdentifier = [toolbarIdentifiers objectAtIndex:0];
Expand Down