From 956bb607e5b74391129ab214eff9f5c83884538d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 14 Dec 2010 15:19:37 +0000 Subject: =?UTF-8?q?=E2=80=A2=C2=A0Bundle=20support=20-=20fixed=20updating?= =?UTF-8?q?=20of=20a=20Bundle=20with=20the=20same=20UUID=20-=20fixed=20iss?= =?UTF-8?q?ue=20of=20Output=20action=20"Replace=20Selection"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Source/SPAppController.m') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 043ea9bf..2dbf60bd 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -544,16 +544,16 @@ defaultButton:NSLocalizedString(@"Update", @"Update button") alternateButton:NSLocalizedString(@"Cancel", @"Cancel button") otherButton:nil - informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"A bundle ‘%@’ is already installed. Do you want to update it?", @"a bundle ‘%@’ is already installed. do you want to update it?"), [installedBundleUUIDs objectForKey:[cmdData objectForKey:SPBundleFileUUIDKey]]]]; + informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"A bundle ‘%@’ is already installed. Do you want to update it?", @"a bundle ‘%@’ is already installed. do you want to update it?"), [[installedBundleUUIDs objectForKey:[cmdData objectForKey:SPBundleFileUUIDKey]] objectForKey:@"name"]]]; [alert setAlertStyle:NSCriticalAlertStyle]; NSInteger answer = [alert runModal]; if(answer == NSAlertDefaultReturn) { NSError *error = nil; - NSString *moveToTrashCommand = [NSString stringWithFormat:@"osascript -e 'tell application \"Finder\" to move (POSIX file \"%@\") to the trash'", newPath]; + NSString *moveToTrashCommand = [NSString stringWithFormat:@"osascript -e 'tell application \"Finder\" to move (POSIX file \"%@\") to the trash'", infoPath]; [moveToTrashCommand runBashCommandWithEnvironment:nil atCurrentDirectoryPath:nil error:&error]; if(error != nil) { - NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while moving “%@” to Trash.", @"error while moving “%@” to trash"), newPath] + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while moving “%@” to Trash.", @"error while moving “%@” to trash"), [[installedBundleUUIDs objectForKey:[cmdData objectForKey:SPBundleFileUUIDKey]] objectForKey:@"path"]] defaultButton:NSLocalizedString(@"OK", @"OK button") alternateButton:nil otherButton:nil @@ -1421,7 +1421,9 @@ } if([cmdData objectForKey:SPBundleFileUUIDKey] && [[cmdData objectForKey:SPBundleFileUUIDKey] length]) - [installedBundleUUIDs setObject:[NSString stringWithFormat:@"%@ (%@)", bundle, [cmdData objectForKey:SPBundleFileNameKey]] forKey:[cmdData objectForKey:SPBundleFileUUIDKey]]; + [installedBundleUUIDs setObject:[NSDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithFormat:@"%@ (%@)", bundle, [cmdData objectForKey:SPBundleFileNameKey]], @"name", + infoPath, @"path", nil] forKey:[cmdData objectForKey:SPBundleFileUUIDKey]]; if([cmdData objectForKey:SPBundleFileTooltipKey] && [[cmdData objectForKey:SPBundleFileTooltipKey] length]) [aDict setObject:[cmdData objectForKey:SPBundleFileTooltipKey] forKey:SPBundleFileTooltipKey]; -- cgit v1.2.3 From 263c981e4905595ebcb3e5d57609ddf75bdf40a2 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 14 Dec 2010 20:33:08 +0000 Subject: =?UTF-8?q?=E2=80=A2=20URL=20scheme=20commands:=20-=20display=20so?= =?UTF-8?q?me=20error=20tooltips=20and=20improved=20the=20cancellation=20v?= =?UTF-8?q?ia=20=E2=8C=98.=20of=20the=20sequelpro://SP=5FPROCESS=5FID@pass?= =?UTF-8?q?ToDoc/ExecuteQuery=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'Source/SPAppController.m') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 2dbf60bd..175df14c 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -661,28 +661,28 @@ BOOL userTerminated = NO; - while(1) { - NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:[NSDate distantPast] - inMode:NSDefaultRunLoopMode - dequeue:YES]; - - if ([event type] == NSKeyDown) { - unichar key = [[event characters] length] == 1 ? [[event characters] characterAtIndex:0] : 0; - if (([event modifierFlags] & NSCommandKeyMask) && key == '.') { - userTerminated = YES; - break; - } - } - [NSApp sendEvent:event]; - if(![processDocument isWorking]) break; - usleep(1000); - } - - if(userTerminated) { - NSBeep(); - return; - } + // while(1) { + // NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask + // untilDate:[NSDate distantPast] + // inMode:NSDefaultRunLoopMode + // dequeue:YES]; + // + // if ([event type] == NSKeyDown) { + // unichar key = [[event characters] length] == 1 ? [[event characters] characterAtIndex:0] : 0; + // if (([event modifierFlags] & NSCommandKeyMask) && key == '.') { + // userTerminated = YES; + // break; + // } + // } + // [NSApp sendEvent:event]; + // if(![processDocument isWorking]) break; + // usleep(1000); + // } + // + // if(userTerminated) { + // NSBeep(); + // return; + // } if(processDocument && command) { if([command isEqualToString:@"passToDoc"]) { -- cgit v1.2.3