aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authormltownsend <mltownsend@gmail.com>2009-08-13 23:35:38 +0000
committermltownsend <mltownsend@gmail.com>2009-08-13 23:35:38 +0000
commitbb87b4f4fe51c64909a6ae40b00cc775adc660d7 (patch)
treea76b94dffb3812a3e14393523b3fb55e98487108 /Source
parent2701aa9a7abc6f1e7172f6a5f8449cc855a588b8 (diff)
downloadsequelpro-bb87b4f4fe51c64909a6ae40b00cc775adc660d7.tar.gz
sequelpro-bb87b4f4fe51c64909a6ae40b00cc775adc660d7.tar.bz2
sequelpro-bb87b4f4fe51c64909a6ae40b00cc775adc660d7.zip
Change SPUserManager to a subclass of NSWindowController which actually fixed some memory issues.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPUserManager.h4
-rw-r--r--Source/SPUserManager.m10
2 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h
index febeb472..09c1ecb5 100644
--- a/Source/SPUserManager.h
+++ b/Source/SPUserManager.h
@@ -26,7 +26,7 @@
@class MCPConnection;
-@interface SPUserManager : NSObject {
+@interface SPUserManager : NSWindowController {
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSManagedObjectModel *managedObjectModel;
@@ -40,7 +40,7 @@
IBOutlet NSOutlineView* outlineView;
IBOutlet NSTabView *tabView;
IBOutlet NSTreeController *treeController;
- IBOutlet NSWindow *window;
+// IBOutlet NSWindow *window;
IBOutlet NSPanel *addHostSheet;
}
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index e44c9e51..973ff142 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -105,7 +105,7 @@
[self _initializeUsers];
// [NSThread detachNewThreadSelector:@selector(_initializeUsers) toTarget:self withObject:nil];
- [window makeKeyAndOrderFront:nil];
+ [[self window] makeKeyAndOrderFront:nil];
}
- (void)_initializeUsers
@@ -293,7 +293,7 @@
if (!outlineView) {
[NSBundle loadNibNamed:@"UserManagerView" owner:self];
}
- [window makeKeyAndOrderFront:nil];
+ [[self window] makeKeyAndOrderFront:nil];
}
#pragma mark -
@@ -362,7 +362,7 @@
- (IBAction)doCancel:(id)sender
{
[[self managedObjectContext] rollback];
- [window close];
+ [[self window] close];
}
- (IBAction)doApply:(id)sender
@@ -375,7 +375,7 @@
}
else
{
- [window close];
+ [[self window] close];
}
// [self _clearData];
}
@@ -643,7 +643,7 @@
nil,
nil,
nil,
- window,
+ [self window],
self,
NULL,
NULL,