diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-04-28 13:22:24 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-04-28 13:22:24 +0000 |
commit | 1ffe77ae75328174b30e0fbe8067222698aa67b9 (patch) | |
tree | a762d1e983431366e716ff1f58ded8299717809b | |
parent | a2f339ecc420468f54cbf55d70f380bbf0d64151 (diff) | |
download | sequelpro-1ffe77ae75328174b30e0fbe8067222698aa67b9.tar.gz sequelpro-1ffe77ae75328174b30e0fbe8067222698aa67b9.tar.bz2 sequelpro-1ffe77ae75328174b30e0fbe8067222698aa67b9.zip |
• MySQL Help:
- simplified code for getting mySQLversion (this eliminates complier warning too)
- change HTML/CSS output slightly for keyword header
- changed back/forward tooltip to be consistent
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 10 | ||||
-rw-r--r-- | Source/CustomQuery.m | 26 |
2 files changed, 14 insertions, 22 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 4af1525d..6566796f 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="5428"/> + <integer value="5429"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6481,7 +6481,7 @@ <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSLeftFacingTriangleTemplate</string> </object> - <string key="NSSegmentItemTooltip">Go Back</string> + <string key="NSSegmentItemTooltip">Show the previous page</string> <int key="NSSegmentItemImageScaling">0</int> </object> <object class="NSSegmentItem"> @@ -6502,7 +6502,7 @@ <string key="NSResourceName">NSRightFacingTriangleTemplate</string> </object> <string key="NSSegmentItemLabel"/> - <string key="NSSegmentItemTooltip">Go Forward</string> + <string key="NSSegmentItemTooltip">Show the next page</string> <int key="NSSegmentItemImageScaling">0</int> </object> </object> @@ -21498,8 +21498,8 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{792, 192}, {351, 309}}</string> - <string>{{792, 192}, {351, 309}}</string> + <string>{{704, 285}, {351, 309}}</string> + <string>{{704, 285}, {351, 309}}</string> <boolean value="NO"/> <boolean value="YES"/> <string>{351, 120}</string> diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index b3602941..419085fd 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -27,6 +27,7 @@ #import "SPGrowlController.h" #import "SPStringAdditions.h" #import "SPTextViewAdditions.h" +#import "TableDocument.h" #define MYSQL_DEV_SEARCH_URL @"http://search.mysql.com/search?q=%@&site=refman-%@" @@ -1372,20 +1373,11 @@ traps enter key and // Order out the Help window if not visible if(![helpWebViewWindow isVisible]) { - - // Get the major MySQL server version in the form of x.x, which is basically the first 3 characters of the returned version string - //get mysql version - CMMCPResult *theResult = nil; - theResult = [mySQLConnection queryString:@"SHOW VARIABLES LIKE 'version'"]; - NSString *version = [[theResult fetchRowAsArray] objectAtIndex:1]; - if ( [version isKindOfClass:[NSData class]] ) { - // starting with MySQL 4.1.14 the mysql variables are returned as nsdata - mySQLversion = [[NSString alloc] initWithData:version encoding:[mySQLConnection encoding]]; - } else { - mySQLversion = [[NSString stringWithString:version] retain]; - } - // init Help view - [helpWebViewWindow setTitle:[NSString stringWithFormat:@"%@ (%@ %@)", NSLocalizedString(@"MySQL Help", @"mysql help"), NSLocalizedString(@"version", @"version"), [mySQLversion substringToIndex:3]]]; + mySQLversion = [[[(TableDocument *)[[textView window] delegate] mySQLVersion] substringToIndex:3] retain]; + [helpWebViewWindow setTitle:[NSString stringWithFormat:@"%@ (%@ %@)", + NSLocalizedString(@"MySQL Help", @"mysql help"), + NSLocalizedString(@"version", @"version"), + mySQLversion]]; [helpWebView setMaintainsBackForwardList:YES]; [[helpWebView backForwardList] setCapacity:20]; if([[helpWebView backForwardList] backListCount] < 1) @@ -1437,7 +1429,7 @@ traps enter key and [[NSString stringWithFormat: MYSQL_DEV_SEARCH_URL, searchTerm, - [[mySQLversion substringToIndex:3] stringByReplacingOccurrencesOfString:@"." withString:@""]] + [mySQLversion stringByReplacingOccurrencesOfString:@"." withString:@""]] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]; // [[helpWebView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString: // [[NSString stringWithFormat: @@ -1586,7 +1578,7 @@ traps enter key and @" .searchstring {" @" }" @" .header {" - @" padding:2mm;" + @" padding-bottom:5px;" @" }" @" </style>" @"</head>" @@ -1601,7 +1593,7 @@ traps enter key and if ([tableDetails objectForKey:@"description"]) { // one single help topic found if ([tableDetails objectForKey:@"name"]) { - [theHelp appendString:@"<h2 class='header'> "]; + [theHelp appendString:@"<h2 class='header'>"]; [theHelp appendString:[[[tableDetails objectForKey:@"name"] copy] autorelease]]; [theHelp appendString:@"</h2>"]; |