Skip to content

Commit d1dc63a

Browse files
committed
More tweaks to the way SSYAlert comes and goes.
1 parent 858edc8 commit d1dc63a

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

SSYAlert.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -770,13 +770,12 @@ - (IBAction)clickedButton:(id)sender {
770770
if ([self clickTarget]) {
771771
[[self clickTarget] recklessPerformSelector:[self clickSelector]
772772
object:self] ;
773-
[self setIsDoingModalDialog:NO] ;
774-
}
775-
776-
if ([self checkboxState] == NSOnState) {
777-
[[self checkboxInvocation] invoke] ;
778773
}
779774

775+
if ([self checkboxState] == NSOnState) {
776+
[[self checkboxInvocation] invoke] ;
777+
}
778+
780779
if (!m_dontGoAwayUponButtonClicked) {
781780
[self goAway] ;
782781
}
@@ -1262,7 +1261,8 @@ - (void)setCheckboxTitle:(NSString*)title {
12621261
}
12631262
}
12641263

1265-
- (void)addOtherSubview:(NSView*)subview atIndex:(NSInteger)index {
1264+
- (void)addOtherSubview:(NSView*)subview
1265+
atIndex:(NSInteger)index {
12661266
if (index > [[self otherSubviews] count]) {
12671267
index = [[self otherSubviews] count] ;
12681268
}

SSYListPicker.m

+1-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ - (void)userPickFromList:(NSArray*)displayNames
9494
[alert setIconStyle:SSYAlertIconInformational] ;
9595
[alert setClickTarget:self] ;
9696
[alert setClickSelector:@selector(handleClickInAlert:)] ;
97-
[alert setDontGoAwayUponButtonClicked:YES] ;
9897
// I think this was added in BookMacster 1.7.3 or, more likely, 1.8. I forgot why, except that it was definitely needed…
9998
[NSApp activateIgnoringOtherApps:YES] ;
10099
NSMutableDictionary* didEndInfo = [NSMutableDictionary dictionary] ;
@@ -146,9 +145,7 @@ - (void)handleClickInAlert:(SSYAlert*)alert {
146145
NSDictionary* clickDic = [alert clickObject] ;
147146

148147
if (done) {
149-
[alert goAway] ;
150-
151-
// Needed to break retain cycle:
148+
// Needed to break retain cycle, or possibly no longer necessary?
152149
[self setAlert:nil] ;
153150
}
154151

0 commit comments

Comments
 (0)