diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-04-30 21:28:40 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-04-30 21:28:40 +0000 |
commit | c6d9ccf48dcc12c907fd6e86035b5964972ab881 (patch) | |
tree | 0619736b463a946653f847e45a24186e5d5b2d5b /Source/TableDocument.m | |
parent | e322bb1f2baf8c5f91ab6d676e81c682e93291ea (diff) | |
download | sequelpro-c6d9ccf48dcc12c907fd6e86035b5964972ab881.tar.gz sequelpro-c6d9ccf48dcc12c907fd6e86035b5964972ab881.tar.bz2 sequelpro-c6d9ccf48dcc12c907fd6e86035b5964972ab881.zip |
• added "MySQL Help" to the MainMenu > Help submenu
- it shows the MySQL Help TOC of the front most tableDocument mysql connection, i.e. each tableDocument has its own Help window (due to the fact that the Help is version specific), and makes it the keyWindow
- changed the way for getting the mySQLversion into the CustomQuery; now a new tableDocument set it via [customQueryInstance setMySQLversion:foo]; the other way was to unsafe regarding to get the version if MySQL Help was invoked via MainMenu
• Help window and Create Table Syntax window will be released while closing the tableDocument
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 3acb53b4..ecbe6d86 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -339,6 +339,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum [tableSourceInstance setConnection:mySQLConnection]; [tableContentInstance setConnection:mySQLConnection]; [customQueryInstance setConnection:mySQLConnection]; + [customQueryInstance setMySQLversion:mySQLVersion]; [tableDumpInstance setConnection:mySQLConnection]; [spExportControllerInstance setConnection:mySQLConnection]; [tableStatusInstance setConnection:mySQLConnection]; @@ -1436,11 +1437,22 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum return [self export:sender]; } +/* + * Show the MySQL Help TOC of the current MySQL connection + * Invoked by the MainMenu > Help > MySQL Help + */ +- (IBAction)showMySQLHelp:(id)sender +{ + [customQueryInstance showHelpFor:SP_HELP_TOC_SEARCH_STRING addToHistory:YES]; + [[customQueryInstance helpWebViewWindow] makeKeyWindow]; +} + + /** * Menu validation */ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem -{ +{ if ([menuItem action] == @selector(import:) || [menuItem action] == @selector(export:) || [menuItem action] == @selector(exportMultipleTables:) || @@ -1816,7 +1828,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum //set up toolbar [self setupToolbar]; - // [self connectToDB:nil]; + // [self connectToDB:nil]; [self performSelector:@selector(connectToDB:) withObject:tableWindow afterDelay:0.0f]; if([prefs boolForKey:@"SelectLastFavoriteUsed"] == YES){ @@ -1835,6 +1847,8 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum { if ([mySQLConnection isConnected]) [self closeConnection]; if ([[[SPQueryConsole sharedQueryConsole] window] isVisible]) [self toggleConsole:self]; + [[customQueryInstance helpWebViewWindow] release]; + [createTableSyntaxWindow release]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } |