diff options
author | mltownsend <mltownsend@gmail.com> | 2009-08-11 20:45:28 +0000 |
---|---|---|
committer | mltownsend <mltownsend@gmail.com> | 2009-08-11 20:45:28 +0000 |
commit | 9cbae0171595e4afbd6109098b89f1922c623827 (patch) | |
tree | 8d97d4d58f118ee1d44e65c32327008a033cae96 /Source/TableDocument.m | |
parent | f5dd205cc35a1825152dc2a32bc339182706fcc8 (diff) | |
download | sequelpro-9cbae0171595e4afbd6109098b89f1922c623827.tar.gz sequelpro-9cbae0171595e4afbd6109098b89f1922c623827.tar.bz2 sequelpro-9cbae0171595e4afbd6109098b89f1922c623827.zip |
Fix some MainMenu references by index.
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index ee314b65..523031cd 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -194,6 +194,14 @@ [tableDataInstance setConnection:mySQLConnection]; [extendedTableInfoInstance setConnection:mySQLConnection]; [databaseDataInstance setConnection:mySQLConnection]; + if (userManagerInstance == nil) + { + userManagerInstance = [[SPUserManager alloc] initWithConnection:mySQLConnection]; + } + else + { + [userManagerInstance setConnection:mySQLConnection]; + } // Set the cutom query editor's MySQL version [customQueryInstance setMySQLversion:mySQLVersion]; @@ -679,7 +687,7 @@ // Get the menu item for showing and hiding the console. This is isn't the best way to get it as any // changes to the menu structure will result in the wrong item being selected. - NSMenuItem *menuItem = [[[[NSApp mainMenu] itemAtIndex:3] submenu] itemAtIndex:5]; + NSMenuItem *menuItem = [[[[NSApp mainMenu] itemWithTitle:@"View"] submenu] itemAtIndex:5]; // Only update the menu item title if its the menu item and not the toolbar [menuItem setTitle:(!isConsoleVisible) ? NSLocalizedString(@"Hide Console", @"Hide Console") : NSLocalizedString(@"Show Console", @"Show Console")]; @@ -2551,6 +2559,7 @@ if (mySQLVersion) [mySQLVersion release]; [allDatabases release]; if(queryEditorInitString) [queryEditorInitString release]; + if(userManagerInstance) [userManagerInstance release]; [super dealloc]; } @@ -2559,9 +2568,9 @@ if (userManagerInstance == nil) { userManagerInstance = [[SPUserManager alloc] initWithConnection:mySQLConnection]; - } else { - [userManagerInstance show]; } + + [userManagerInstance show]; } @end |