From 74c5b758e04259723d173834a34b605aded548c3 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 1 Dec 2012 18:10:23 +0000 Subject: - Swap around the Custom Query "Run All" and "Run Current/Previous/Selection" shortcuts and positions (Issue #1094) - Tweak the designated requirement to correctly sign the tunnel assistant (Issue #1503) - Add support for important release notes in the version upgrade routines to highlight important issues, and add notes for the button swap and signing change to alert users --- Interfaces/English.lproj/DBView.xib | 109 +++++++++++++++++++--------- Resources/English.lproj/DBView.strings | Bin 102602 -> 102602 bytes Resources/English.lproj/Localizable.strings | Bin 235592 -> 238344 bytes Resources/sprequirement.bin | Bin 216 -> 252 bytes Source/SPPreferencesUpgrade.h | 1 + Source/SPPreferencesUpgrade.m | 57 +++++++++++++++ 6 files changed, 134 insertions(+), 33 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 561c31ca..5273e15c 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -2,9 +2,9 @@ 1050 - 11E53 + 11G63b 851 - 1138.47 + 1138.51 569.00 YES @@ -21,11 +21,7 @@ YES - - - - - + YES @@ -3976,29 +3972,29 @@ YES - + - Run All Queries + YES + Run Current Query r 1048576 2147483647 _popUpItemAction: - 1 + 2 - + - YES - Run Current Query + Run All Queries r 1572864 2147483647 _popUpItemAction: - 2 + 1 @@ -4272,7 +4268,7 @@ YES - 18 + 1 YES 1 YES @@ -4282,7 +4278,7 @@ 265 - {{562, 216}, {124, 17}} + {{403.5, 216}, {124, 17}} YES @@ -4292,10 +4288,10 @@ -2034876161 - 36 + 402653220 - DQ + r 200 25 @@ -4303,7 +4299,7 @@ 265 - {{403, 216}, {151, 17}} + {{536, 216}, {151, 17}} YES @@ -4313,9 +4309,9 @@ -2038284033 - 402653348 + 164 - r + DQ 200 25 @@ -8245,6 +8241,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{1, 66}, {116, 14}} + YES 68288064 @@ -8261,6 +8258,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 266 {{125, 64}, {181, 19}} + YES -1804468671 @@ -8278,6 +8276,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{121, 35}, {187, 22}} + YES -2076049856 @@ -8332,6 +8331,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{121, 10}, {187, 22}} + YES -2076049856 @@ -8397,6 +8397,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{1, 40}, {116, 14}} + YES 68288064 @@ -8413,6 +8414,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{1, 15}, {116, 14}} + YES 68288064 @@ -8427,10 +8429,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{1, 1}, {324, 93}} + {{17, 219}, {326, 109}} + {0, 0} 67239424 @@ -8454,6 +8458,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 289 {{249, 13}, {96, 28}} + 1 YES @@ -8475,6 +8480,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 289 {{155, 13}, {96, 28}} + YES 67239424 @@ -8528,6 +8534,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {318, 14} + @@ -8591,6 +8598,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{1, 1}, {318, 168}} + @@ -8602,6 +8610,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{-100, -100}, {11, 133}} + 256 _doScroller: @@ -8612,6 +8621,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{-100, -100}, {87, 18}} + 1 _doScroller: @@ -8621,6 +8631,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{20, 45}, {320, 170}} + 133650 @@ -8630,6 +8641,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {360, 348} + {{0, 0}, {1680, 1028}} {360, 370} @@ -8784,7 +8796,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {1.7976931348623157e+308, 1.7976931348623157e+308} {213, 107} - + 256 YES @@ -8854,7 +8866,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{1, 1}, {381, 204}} - @@ -8884,7 +8895,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{-1, 35}, {383, 206}} - 133138 @@ -8915,7 +8925,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {381, 247} - {{0, 0}, {1440, 878}} {213, 129} @@ -9176,7 +9185,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {1.7976931348623157e+308, 1.7976931348623157e+308} {213, 107} - + 256 YES @@ -9262,7 +9271,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{1, 1}, {363, 178}} - @@ -9292,7 +9300,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{20, 45}, {365, 180}} - 133138 @@ -9342,7 +9349,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {405, 267} - {{0, 0}, {1440, 878}} {213, 129} @@ -9801,12 +9807,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 274 {752, 125} + YES 256 {752, 17} + @@ -9865,6 +9873,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{0, 17}, {752, 125}} + @@ -9875,6 +9884,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{224, 17}, {15, 102}} + _doScroller: 37 @@ -9885,6 +9895,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{1, 95.851600000000005}, {751.61300000000006, 15}} + 1 _doScroller: @@ -9899,6 +9910,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {752, 17} + @@ -9907,6 +9919,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {752, 142} + 133680 @@ -9918,6 +9931,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {752, 141} + NSView @@ -9930,6 +9944,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{17, 115}, {294, 14}} + YES 68288064 @@ -9956,6 +9971,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 2322 {510, 14} + @@ -10021,6 +10037,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{1, 1}, {510, 91}} + @@ -10032,6 +10049,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{464, 1}, {15, 91}} + _doScroller: 1 @@ -10042,6 +10060,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 -2147483392 {{0, 68.296899999999994}, {511.55500000000001, 15}} + 1 _doScroller: @@ -10051,6 +10070,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{20, 20}, {512, 93}} + 133682 @@ -10062,6 +10082,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{554, 19}, {181, 14}} + YES 68288064 @@ -10086,6 +10107,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{678, 35}, {55, 16}} + YES 67239424 @@ -10110,6 +10132,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{537, 37}, {137, 14}} + YES 68288064 @@ -10126,6 +10149,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{537, 57}, {197, 18}} + YES 67239424 @@ -10148,6 +10172,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{537, 77}, {197, 18}} + YES 67239424 @@ -10170,6 +10195,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 265 {{537, 97}, {197, 18}} + YES 67239424 @@ -10190,11 +10216,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{0, 142}, {752, 135}} + NSView {{0, 40}, {752, 277}} + 2 @@ -10202,6 +10230,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 289 {{595, 12}, {143, 32}} + YES 67239424 @@ -10223,6 +10252,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 292 {{14, 12}, {216, 32}} + YES 67239424 @@ -10244,6 +10274,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 289 {{452, 12}, {143, 32}} + YES 67239424 @@ -10263,6 +10294,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {752, 317} + {{0, 0}, {1440, 878}} {600, 339} @@ -20775,7 +20807,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - @@ -20786,6 +20817,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + @@ -24200,6 +24232,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 7219.IBPluginDependency 7220.IBAttributePlaceholdersKey 7220.IBPluginDependency + 7220.IBViewBoundsToFrameTransform 7220.ImportedFromIB2 7221.IBPluginDependency 7222.IBPluginDependency @@ -25977,7 +26010,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 ToolTip - Run the query that the text cursor is currently within, or the active selection (⌥⌘R) + Run the query that the text cursor is currently within, or the active selection (⌘R, Enter or fn-Return) com.apple.InterfaceBuilder.CocoaPlugin @@ -25986,10 +26019,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 ToolTip - Run all queries in the editor (⌘R, Enter or fn-Return) + Run all queries in the editor (⌥⌘R) com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABEDKAAw2cAAA + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -26010,7 +26046,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{463, 206}, {256, 374}} + {{207, 318}, {256, 374}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -30622,6 +30658,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 limitRowsStepper multipleLineEditingButton paginationButton + paginationGoButton paginationNextButton paginationPageField paginationPageStepper @@ -30669,6 +30706,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSButton NSButton NSButton + NSButton NSTextField NSStepper NSButton @@ -30717,6 +30755,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 limitRowsStepper multipleLineEditingButton paginationButton + paginationGoButton paginationNextButton paginationPageField paginationPageStepper @@ -30847,6 +30886,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 paginationButton NSButton + + paginationGoButton + NSButton + paginationNextButton NSButton diff --git a/Resources/English.lproj/DBView.strings b/Resources/English.lproj/DBView.strings index bbe4e19b..12d18b9b 100644 Binary files a/Resources/English.lproj/DBView.strings and b/Resources/English.lproj/DBView.strings differ diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings index 42c07f9d..a0a235f3 100644 Binary files a/Resources/English.lproj/Localizable.strings and b/Resources/English.lproj/Localizable.strings differ diff --git a/Resources/sprequirement.bin b/Resources/sprequirement.bin index 78205212..4b2049cc 100644 Binary files a/Resources/sprequirement.bin and b/Resources/sprequirement.bin differ diff --git a/Source/SPPreferencesUpgrade.h b/Source/SPPreferencesUpgrade.h index 1f50a2f9..71f6c956 100644 --- a/Source/SPPreferencesUpgrade.h +++ b/Source/SPPreferencesUpgrade.h @@ -42,5 +42,6 @@ void SPApplyRevisionChanges(void); void SPMigrateConnectionFavoritesData(void); void SPMigratePreferencesFromPreviousIdentifer(void); +void SPShowPostMigrationReleaseNotes(NSArray *releaseNotes); @end diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m index 208bbab4..63046ce6 100644 --- a/Source/SPPreferencesUpgrade.m +++ b/Source/SPPreferencesUpgrade.m @@ -46,6 +46,7 @@ void SPApplyRevisionChanges(void) { NSUInteger i; NSUInteger currentVersionNumber, recordedVersionNumber = 0; + NSMutableArray *importantUpdateNotes = [NSMutableArray new]; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; @@ -318,6 +319,16 @@ void SPApplyRevisionChanges(void) SPMigrateConnectionFavoritesData(); } + // For versions prior to 3922 (<1.0), show notes for swapping the custom query buttons and signing changes + if (recordedVersionNumber < 3922) { + [importantUpdateNotes addObject:NSLocalizedString(@"The Custom Query \"Run\" and \"Run All\" button positions and their shortcuts have been swapped.", @"Short important release note for swap of custom query buttons")]; + [importantUpdateNotes addObject:NSLocalizedString(@"We've changed Sequel Pro's digital signature for GateKeeper compatibility; you'll have to allow access to your passwords again.", @"Short important release note for why password prompts may occur")]; + } + + // Display any important release notes, if any + SPShowPostMigrationReleaseNotes(importantUpdateNotes); + [importantUpdateNotes release]; + // Update the prefs revision [prefs setObject:[NSNumber numberWithInteger:currentVersionNumber] forKey:SPLastUsedVersion]; } @@ -402,6 +413,10 @@ void SPMigratePreferencesFromPreviousIdentifer(void) CFStringRef oldIdentifier = CFSTR("com.google.code.sequel-pro"); CFArrayRef oldPrefKeys = CFPreferencesCopyKeyList(oldIdentifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + if (!oldPrefKeys) { + return; + } + NSDictionary *oldPrefs = (NSDictionary *)CFPreferencesCopyMultiple(oldPrefKeys, oldIdentifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); for (id eachKey in oldPrefs) { @@ -412,4 +427,46 @@ void SPMigratePreferencesFromPreviousIdentifer(void) CFRelease(oldPrefKeys); } +/** + * Displays important release notes for a new revision. + */ +void SPShowPostMigrationReleaseNotes(NSArray *releaseNotes) +{ + if (![releaseNotes count]) { + return; + } + + NSString *introText; + if ([releaseNotes count] == 1) { + introText = NSLocalizedString(@"We've made a few changes but we thought you should know about one particularly important one:", "Important release notes informational text, single change"); + } else { + introText = NSLocalizedString(@"We've made a few changes but we thought you should know about some particularly important ones:", "Important release notes informational text, multiple changes"); + } + + // Create a *modal* alert to show the release notes + NSAlert *noteAlert = [[NSAlert alloc] init]; + [noteAlert setAlertStyle:NSInformationalAlertStyle]; + [noteAlert setAccessoryView:[[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 450, 1)] autorelease]]; + [noteAlert setMessageText:NSLocalizedString(@"Thanks for updating Sequel Pro!", @"Release notes dialog title thanking user for upgrade")]; + [noteAlert addButtonWithTitle:NSLocalizedString(@"Continue", @"Continue button title")]; + [noteAlert addButtonWithTitle:NSLocalizedString(@"View full release notes", @"Release notes button title")]; + [noteAlert setInformativeText:[NSString stringWithFormat:@"%@\n\n • %@", introText, [releaseNotes componentsJoinedByString:@"\n\n • "]]]; + + // Show the dialog + NSInteger returnCode = [noteAlert runModal]; + [noteAlert release]; + + // Show releae notes if desired + if (returnCode == NSAlertSecondButtonReturn) { + + // Work out whether to link to the normal site or the nightly list + NSString *releaseNotesLink = @"http://www.sequelpro.com/release-notes"; + if ([[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] rangeOfString:@"nightly"].location != NSNotFound) { + releaseNotesLink = @"http://nightly.sequelpro.com/release-notes"; + } + + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:releaseNotesLink]]; + } +} + @end -- cgit v1.2.3