diff --git a/macosx/Controller.m b/macosx/Controller.m index 0d20f28af..df4d03a49 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -31,6 +31,7 @@ #import "CreatorWindowController.h" #import "StatsWindowController.h" #import "AboutWindowController.h" +#import "QuittingWindowController.h" #import "ButtonToolbarItem.h" #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" @@ -524,6 +525,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi //clear badge [fBadger clearBadge]; + [[[QuittingWindowController alloc] init] showWindow: self]; + //remaining calls the same as dealloc [fInfoController release]; [fMessageController release]; diff --git a/macosx/QuittingWindow.xib b/macosx/QuittingWindow.xib new file mode 100644 index 000000000..e05681f70 --- /dev/null +++ b/macosx/QuittingWindow.xib @@ -0,0 +1,509 @@ + + + + 1050 + 9B18 + 629 + 949 + 343.00 + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + QuittingWindowController + + + FirstResponder + + + NSApplication + + + 1 + 2 + {{196, 429}, {323, 81}} + 536870912 + Closing + NSWindow + + + + 256 + + YES + + + 1295 + + {{18, 16}, {292, 20}} + + + 16394 + 2.000000e+01 + 1.000000e+02 + + + + 271 + {{17, 44}, {294, 17}} + + + YES + + 67239488 + 272630784 + message field + + LucidaGrande + 1.300000e+01 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + + controlTextColor + + 3 + MAA + + + + + + {323, 81} + + + + {{0, 0}, {1680, 1028}} + + + + + YES + + + fMessageField + + + + 6 + + + + window + + + + 7 + + + + fProgressBar + + + + 8 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + 2 + + + YES + + + + + + + 3 + + + + + 4 + + + YES + + + + + + 5 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 1.WindowOrigin + 1.editorWindowContentRectSynchronizationRect + 2.IBPluginDependency + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + + + YES + + + + + {{371, 645}, {323, 81}} + + {196, 240} + + + + + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 8 + + + + YES + + QuittingWindowController + NSWindowController + + YES + + YES + + + YES + + + + YES + + YES + fMessageField + fProgressBar + + + YES + NSTextField + NSProgressIndicator + + + + IBProjectSource + macosx/QuittingWindowController.h + + + + + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/NSApplicationAdditions.h + + + + NSObject + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/IPCController.h + + + + + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/UKKQueue/UKKQueue.h + + + + + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/UKKQueue/UKFileWatcher.h + + + + + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/UKKQueue/UKMainThreadProxy.h + + + + NSMenu + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + macosx/NSMenuAdditions.h + + + + + 0 + ../../Transmission.xcodeproj + 3 + + YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA +AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxBTAAsADAAxADUANgA8AD0A +QgBWAFcAWABZAAsAZgBrAHsAfQCAAIEAhgCRAJIAogCjAKsArACvALkAugC7AMAAwgDHAMgAywDPANMA +1wALANgA2gDbAN4A4gDoAPAA8QD1APoA+wEAAQEBCgENAQ4BEAEZASMBLQEuAS8BMAExATIBMwE0ATcB +OgFHAVQBVQFWAFMBVwC+ALYBWABUAVkBWgFdAWABY1UkbnVsbN8QEgANAA4ADwAQABEAEgATABQAF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I ++QkBCQMJBQkHCQkJFwkgCScJPglNCV4JYAliCWQJZglzCYQJhgmICYoJjAmTCZwJngmrCa0JrwmxCbMJ +tQm3CcAJwgnECdIJ2wngCekJ6wn4CfoJ/An+CgAKAgoECg0KDwoeCiAKIgokCiYKKAoqCiwKNQo3CkYK +SApKCkwKTgpQClIKVAphCm0KegqYCrgKywrtCvYK+Ar5CwILBAsFCw4LEAslCycLKQsrCy0LLwsxCzML +NQs3CzkLQgtEC1kLWwtdC18LYQtjC2ULZwtpC2sLbQtvC3ELegt8C34LgAuJC4sLjAuVC5cLmAuhC6ML +pAutC7IAAAAAAAACAgAAAAAAAAFmAAAAAAAAAAAAAAAAAAALwQ + + + diff --git a/macosx/QuittingWindowController.h b/macosx/QuittingWindowController.h new file mode 100644 index 000000000..85084b7d9 --- /dev/null +++ b/macosx/QuittingWindowController.h @@ -0,0 +1,34 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2007 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import + + +@interface QuittingWindowController : NSWindowController +{ + IBOutlet NSTextField * fMessageField; + IBOutlet NSProgressIndicator * fProgressBar; +} + +@end diff --git a/macosx/QuittingWindowController.m b/macosx/QuittingWindowController.m new file mode 100644 index 000000000..79c6e8fda --- /dev/null +++ b/macosx/QuittingWindowController.m @@ -0,0 +1,43 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2007 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import "QuittingWindowController.h" +#import "NSStringAdditions.h" + +@implementation QuittingWindowController + +- (id) init +{ + return [super initWithWindowNibName: @"QuittingWindow"]; +} + +- (void) awakeFromNib +{ + [fMessageField setStringValue: [NSLocalizedString(@"Shutting Down", "Quitting Window -> message") stringByAppendingEllipsis]]; + [fProgressBar startAnimation: nil]; + + [[self window] center]; +} + +@end