adium/adium

Fix the account deletion sheet under ARC.

2012-09-13, Thijs Alkemade
09688f5a5b9c
Parents 01dc7cd1cf26
Children fbf9c8679928
Fix the account deletion sheet under ARC.
--- a/Frameworks/Adium Framework/Source/AIAccount.h Wed Sep 12 18:30:00 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AIAccount.h Thu Sep 13 11:07:57 2012 +0200
@@ -198,6 +198,8 @@
BOOL mustPromptForPasswordOnNextConnect;
NSString *currentDisplayName;
+
+ id<AIAccountControllerRemoveConfirmationDialog> confirmationDialogForAccountDeletion;
}
- (void)initAccount;
--- a/Frameworks/Adium Framework/Source/AIAccount.m Wed Sep 12 18:30:00 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AIAccount.m Thu Sep 13 11:07:57 2012 +0200
@@ -259,8 +259,11 @@
- (id<AIAccountControllerRemoveConfirmationDialog>)confirmationDialogForAccountDeletion
{
- //Will be released in alertForAccountDeletion:didReturn:
- return [[AIAccountDeletionDialog alloc] initWithAccount:self alert:[self alertForAccountDeletion]];
+ if (!confirmationDialogForAccountDeletion) {
+ confirmationDialogForAccountDeletion = [[AIAccountDeletionDialog alloc] initWithAccount:self alert:[self alertForAccountDeletion]];
+ }
+
+ return confirmationDialogForAccountDeletion;
}
/*!
@@ -293,6 +296,8 @@
if(returnCode == NSAlertDefaultReturn) {
[self performDelete];
}
+
+ confirmationDialogForAccountDeletion = nil;
}
/*!
--- a/Plugins/Purple Service/CBPurpleAccount.m Wed Sep 12 18:30:00 2012 +0200
+++ b/Plugins/Purple Service/CBPurpleAccount.m Thu Sep 13 11:07:57 2012 +0200
@@ -3059,6 +3059,8 @@
break;
}
}
+
+ confirmationDialogForAccountDeletion = nil;
}
- (void)unregisteredAccount:(BOOL)success {