mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 09:48:51 +00:00
Monotone-Parent: 276ecacf0cdba5ef4462aa2c4c44bfdcbb4a5d9e
Monotone-Revision: c85409f639b55299e3ece362140e6725f6c43cbb Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-17T02:30:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2007-08-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailAccountActions.m ([UIxMailAccountActions
|
||||
-composeAction]): new method replacing the one previously in
|
||||
UIxMailMainFrame.
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject
|
||||
-imap4URLString]): removed overriden method (see below).
|
||||
|
||||
|
||||
@@ -25,10 +25,16 @@
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGImap4/NGImap4Connection.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#import <SoObjects/Mailer/SOGoDraftObject.h>
|
||||
#import <SoObjects/Mailer/SOGoDraftsFolder.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
|
||||
#import "../Common/WODirectAction+SOGo.h"
|
||||
|
||||
#import "UIxMailAccountActions.h"
|
||||
|
||||
@@ -111,4 +117,32 @@
|
||||
return response;
|
||||
}
|
||||
|
||||
/* compose */
|
||||
|
||||
- (WOResponse *) composeAction
|
||||
{
|
||||
SOGoDraftsFolder *drafts;
|
||||
SOGoDraftObject *newDraftMessage;
|
||||
NSString *urlBase, *url;
|
||||
NSString *mailTo;
|
||||
|
||||
drafts = [[self clientObject] draftsFolderInContext: context];
|
||||
newDraftMessage = [drafts newDraft];
|
||||
|
||||
mailTo = [[self request] formValueForKey: @"mailto"];
|
||||
if ([mailTo length] > 0)
|
||||
{
|
||||
[newDraftMessage setHeaders: [NSDictionary dictionaryWithObject: mailTo
|
||||
forKey: @"to"]];
|
||||
[newDraftMessage storeInfo];
|
||||
}
|
||||
|
||||
urlBase = [newDraftMessage baseURLInContext: context];
|
||||
url = [urlBase composeURLWithAction: @"edit"
|
||||
parameters: nil
|
||||
andHash: NO];
|
||||
|
||||
return [self redirectToLocation: url];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user