From 2a6198780392e14a3151ec86fc24eec13874330b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 2 Sep 2008 02:57:12 +0000 Subject: [PATCH] Monotone-Parent: 7b5f08442cc8a464b29abb66c14ba679da84d277 Monotone-Revision: 504efed918c1affc532bdcc00196349809e53460 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-02T02:57:12 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 26 ++++++++++++++++++++++++++ SoObjects/Mailer/SOGoMailBaseObject.m | 3 ++- SoObjects/Mailer/SOGoMailFolder.h | 1 - SoObjects/Mailer/SOGoMailFolder.m | 10 ---------- UI/MailerUI/UIxMailActions.m | 2 -- UI/MailerUI/UIxMailEditor.m | 1 + 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50baf93d2..8a101a8ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,31 @@ 2008-09-01 Wolfgang Sourdeau + * UI/MailerUI/UIxMailView.m ([UIxMailView + -appendToResponse:_responseinContext:_ctx]): no longer invoke + [NGImap4Client logout], since this is now handled by the + NGImap4Connection manager (or not). + + * UI/MailerUI/UIxMailActions.m ([UIxMailActions + -markMessageUnreadAction]): no longer make use of [SOGoMailFolder + unselect]. + ([UIxMailActions -markMessageReadAction]): idem. + + * SoObjects/Mailer/SOGoMailFolder.m ([-unselect]): removed method + since we no longer need it. + + * SoObjects/Mailer/SOGoMailBaseObject.m ([SOGoMailBaseObject + -dealloc]): release "imap4". If the IMAP4 connection pooling is + disabled, the object will otherwise never be released. + + * SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount + +initialize]): use the user default "SOGoFallbackIMAP4Server" to + override the value of "serverName" from the actual user settings. + Fallback to "localhost" if value is unset. + + * SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount + -imap4URLString]): use the value of SOGoFallbackIMAP4Server, as + mentionne above. + * UI/MailerUI/UIxMailEditor.m ([UIxMailEditor -from]): retain the initialized value of from, otherwise we create a future zombie. diff --git a/SoObjects/Mailer/SOGoMailBaseObject.m b/SoObjects/Mailer/SOGoMailBaseObject.m index 7c5ec4e78..909b67640 100644 --- a/SoObjects/Mailer/SOGoMailBaseObject.m +++ b/SoObjects/Mailer/SOGoMailBaseObject.m @@ -57,6 +57,7 @@ static BOOL debugOn = YES; - (void) dealloc { [imap4URL release]; + [imap4 release]; [super dealloc]; } @@ -121,7 +122,7 @@ static BOOL debugOn = YES; imap4 = [[self mailManager] connectionForURL: [self imap4URL] password: [self imap4Password]]; if (imap4) - [imap4 retain]; + [imap4 retain]; else [self errorWithFormat:@"Could not connect IMAP4."]; } diff --git a/SoObjects/Mailer/SOGoMailFolder.h b/SoObjects/Mailer/SOGoMailFolder.h index a269f8b44..49e1fe654 100644 --- a/SoObjects/Mailer/SOGoMailFolder.h +++ b/SoObjects/Mailer/SOGoMailFolder.h @@ -64,7 +64,6 @@ typedef enum { - (void) expungeLastMarkedFolder; - (NSException *) expunge; -- (NSException *) unselect; /* flags */ diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index fb3f4133f..43886de3e 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -283,16 +283,6 @@ static BOOL aclConformsToIMAPExt = NO; return [[self imap4Connection] expungeAtURL: [self imap4URL]]; } -- (NSException *) unselect -{ - NGImap4Client *client; - - client = [[self imap4Connection] client]; - [client unselect]; - - return nil; -} - - (void) markForExpunge { NSUserDefaults *ud; diff --git a/UI/MailerUI/UIxMailActions.m b/UI/MailerUI/UIxMailActions.m index d24b68a0b..c421815e9 100644 --- a/UI/MailerUI/UIxMailActions.m +++ b/UI/MailerUI/UIxMailActions.m @@ -151,7 +151,6 @@ if (!response) { mailFolder = [[self clientObject] container]; - [mailFolder unselect]; response = [self responseWith204]; } @@ -167,7 +166,6 @@ if (!response) { mailFolder = [[self clientObject] container]; - [mailFolder unselect]; response = [self responseWith204]; } diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 01b740043..dc9f2dedd 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -135,6 +135,7 @@ static NSArray *infoKeys = nil; { identity = [[context activeUser] primaryIdentity]; from = [identity keysWithFormat: @"%{fullName} <%{email}>"]; + [from retain]; } return from;