Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (58 sloc) 1.642 kb
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
1 //
2 // SUAutomaticUpdateAlert.m
3 // Sparkle
4 //
5 // Created by Andy Matuschak on 3/18/06.
6 // Copyright 2006 Andy Matuschak. All rights reserved.
7 //
8
9 #import "SUAutomaticUpdateAlert.h"
10
f815eec @andymatuschak Fixes 243884
andymatuschak authored
11 #import "SUHost.h"
12
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
13 @implementation SUAutomaticUpdateAlert
14
c42e3a3 @andymatuschak Fixed 251010
andymatuschak authored
15 - (id)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:del;
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
16 {
c42e3a3 @andymatuschak Fixed 251010
andymatuschak authored
17 self = [super initWithHost:aHost windowNibName:@"SUAutomaticUpdateAlert"];
ef89e42 Fixed a potential buffer overrun, made sure to assign to self in -init m...
andym authored
18 if (self)
19 {
20 updateItem = [item retain];
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
21 delegate = del;
c42e3a3 @andymatuschak Fixed 251010
andymatuschak authored
22 host = [aHost retain];
ef89e42 Fixed a potential buffer overrun, made sure to assign to self in -init m...
andym authored
23 [self setShouldCascadeWindows:NO];
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
24 [[self window] center];
ef89e42 Fixed a potential buffer overrun, made sure to assign to self in -init m...
andym authored
25 }
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
26 return self;
27 }
28
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
29 - (void)dealloc
5e05339 #76 Support for Plug-ins
catlan authored
30 {
98832c4 @andymatuschak Beginnings of insane SUHost-based refactoring to get rid of NSBundle+Spa...
andymatuschak authored
31 [host release];
5e05339 #76 Support for Plug-ins
catlan authored
32 [updateItem release];
33 [super dealloc];
34 }
35
43a0a7d @uliwitness Merge of changes from SVN repository:
uliwitness authored
36 - (NSString *)description { return [NSString stringWithFormat:@"%@ <%@, %@>", [self class], [host bundlePath], [host installationPath]]; }
5e05339 #76 Support for Plug-ins
catlan authored
37
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
38 - (IBAction)installNow:sender
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
39 {
40 [self close];
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
41 [delegate automaticUpdateAlert:self finishedWithChoice:SUInstallNowChoice];
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
42 }
43
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
44 - (IBAction)installLater:sender
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
45 {
46 [self close];
bc3be9a Touched practically every line of code in a super-monster-awesome refact...
andym authored
47 [delegate automaticUpdateAlert:self finishedWithChoice:SUInstallLaterChoice];
48 }
49
50 - (IBAction)doNotInstall:sender
51 {
52 [self close];
53 [delegate automaticUpdateAlert:self finishedWithChoice:SUDoNotInstallChoice];
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
54 }
55
56 - (NSImage *)applicationIcon
57 {
98832c4 @andymatuschak Beginnings of insane SUHost-based refactoring to get rid of NSBundle+Spa...
andymatuschak authored
58 return [host icon];
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
59 }
60
61 - (NSString *)titleText
62 {
98832c4 @andymatuschak Beginnings of insane SUHost-based refactoring to get rid of NSBundle+Spa...
andymatuschak authored
63 return [NSString stringWithFormat:SULocalizedString(@"A new version of %@ is ready to install!", nil), [host name]];
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
64 }
65
66 - (NSString *)descriptionText
67 {
1dd1b09 @andymatuschak Fixing #341643: "wrong version number in automatic update alert"
andymatuschak authored
68 return [NSString stringWithFormat:SULocalizedString(@"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?", nil), [host name], [updateItem displayVersionString]];
9fa3da5 Holy restructuring, batman! Watch out for falling folders.
andym authored
69 }
70
71 @end
Something went wrong with that request. Please try again.