adium-1.4 3357:24c6107630e6: Double confirmation is now required...

commits at adium.im commits at adium.im
Thu Feb 17 20:59:52 UTC 2011


details:	http://hg.adium.im/adium-1.4/rev/24c6107630e6
revision:	3357:24c6107630e6
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Thu Feb 17 21:56:45 2011 +0100

Double confirmation is now required to delete and unregister an XMPP account. Based on a patch from xmppjingle.

Fixes #14357
(transplanted from ffae91fa6b5718cd853ca7bc4ac040a58a19c16f)

diffs (27 lines):

diff -r 0a06d6419874 -r 24c6107630e6 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Thu Feb 17 18:59:13 2011 +0100
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Thu Feb 17 21:56:45 2011 +0100
@@ -2979,13 +2979,17 @@
 		switch (returnCode) {
 			case NSAlertOtherReturn:
 				// delete & unregister
-				if (self.online)
-					[self unregister];
-				else {
-					unregisterAfterConnecting = YES;
-					[self setShouldBeOnline:YES];
+				if (NSRunAlertPanel(AILocalizedString(@"Delete Account from Server", nil),
+									AILocalizedString(@"WARNING! This will delete the account %@ from the Jabber server, and can not be undone.\nAre you sure you want to proceed?", nil),
+									AILocalizedString(@"Cancel", nil), AILocalizedString(@"Delete & Unregister", nil), nil, ([self.formattedUID length] ? self.formattedUID : NEW_ACCOUNT_DISPLAY_TEXT))
+					== NSAlertFirstButtonReturn) {	
+					if (self.online){									
+						[self unregister];													
+					}else {
+						unregisterAfterConnecting = YES;
+						[self setShouldBeOnline:YES];
+					}
 				}
-			
 				// further progress happens in -unregisteredAccount:
 				break;
 			case NSAlertDefaultReturn:




More information about the commits mailing list