diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-07 16:39:32 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-07 16:39:32 +0000 |
commit | fb4e3024ae282b557eef755b974c3e081dac0f3e (patch) | |
tree | d9dd0292385e3827ac0fa8469dda83dcf55e35f7 | |
parent | e63a68f557f7916bc69caf0105e407ae21249e23 (diff) | |
download | sequelpro-fb4e3024ae282b557eef755b974c3e081dac0f3e.tar.gz sequelpro-fb4e3024ae282b557eef755b974c3e081dac0f3e.tar.bz2 sequelpro-fb4e3024ae282b557eef755b974c3e081dac0f3e.zip |
Add a hidden preference to display or hide the MySQL server version in the window title.
-rw-r--r-- | Resources/PreferenceDefaults.plist | 2 | ||||
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 | ||||
-rw-r--r-- | Source/TableDocument.m | 4 |
4 files changed, 6 insertions, 2 deletions
diff --git a/Resources/PreferenceDefaults.plist b/Resources/PreferenceDefaults.plist index 52abb689..dd4a8a59 100644 --- a/Resources/PreferenceDefaults.plist +++ b/Resources/PreferenceDefaults.plist @@ -143,5 +143,7 @@ <false/> <key>CSVFieldImportMappingAlignment</key> <integer>2</integer> + <key>DisplayServerVersionInWindowTitle</key> + <true/> </dict> </plist> diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 07132538..12f2a38f 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -84,6 +84,7 @@ extern NSString *SPDefaultEncoding; extern NSString *SPUseMonospacedFonts; extern NSString *SPDisplayTableViewVerticalGridlines; extern NSString *SPCustomQueryMaxHistoryItems; +extern NSString *SPDisplayServerVersionInWindowTitle; // Tables Prefpane extern NSString *SPReloadAfterAddingRow; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index c3d45b0a..bea60f8b 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -52,6 +52,7 @@ NSString *SPDefaultEncoding = @"DefaultEncoding"; NSString *SPUseMonospacedFonts = @"UseMonospacedFonts"; NSString *SPDisplayTableViewVerticalGridlines = @"DisplayTableViewVerticalGridlines"; NSString *SPCustomQueryMaxHistoryItems = @"CustomQueryMaxHistoryItems"; +NSString *SPDisplayServerVersionInWindowTitle = @"DisplayServerVersionInWindowTitle"; // Tables Prefpane NSString *SPReloadAfterAddingRow = @"ReloadAfterAddingRow"; diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 689ee253..c74264c4 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -3753,9 +3753,9 @@ } - return [NSString stringWithFormat:@"%@(MySQL %@) %@%@%@", + return [NSString stringWithFormat:@"%@%@ %@%@%@", ([[[self fileURL] path] length] && ![self isUntitled]) ? [NSString stringWithFormat:@"%@ — ",[self displayName]] : @"", - mySQLVersion, + ([prefs boolForKey:SPDisplayServerVersionInWindowTitle]) ? [NSString stringWithFormat:@"(MySQL %@)", mySQLVersion] : @"", [self name], ([self database]?[NSString stringWithFormat:@"/%@",[self database]]:@""), ([[self table] length]?[NSString stringWithFormat:@"/%@",[self table]]:@"")]; |