Monotone-Parent: 21cd67b802d7be6973e4f0cf16a68dfb3497f3a5

Monotone-Revision: 4f7d023c13f9dc0dfc9d9334f0a8ce9e345493ee

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-08-21T14:49:48
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-08-21 14:49:48 +00:00
parent e7a99ed0eb
commit 7b14c4f19c
3 changed files with 27 additions and 2 deletions
+20
View File
@@ -26,6 +26,7 @@
#import <SoObjects/Mailer/SOGoMailObject.h>
#import <SoObjects/Mailer/SOGoMailAccounts.h>
#import <SoObjects/SOGo/NSDictionary+URL.h>
#import <SoObjects/SOGo/NSArray+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SOGoUI/UIxComponent.h>
@@ -90,4 +91,23 @@
return [u hasSuffix:@"/"] ? @"view" : @"#";
}
- (id <WOActionResults>) composeAction
{
NSArray *accounts;
NSString *firstAccount, *newLocation;
SOGoMailAccounts *co;
NSDictionary *formValues;
co = [self clientObject];
accounts = [[context activeUser] mailAccounts];
firstAccount = [[accounts objectsForKey: @"name"] objectAtIndex: 0];
formValues = [[context request] formValues];
newLocation = [NSString stringWithFormat: @"%@/%@/compose%@",
[co baseURLInContext: context],
firstAccount,
[formValues asURLParameters]];
return [self redirectToLocation: newLocation];
}
@end /* UIxMailMainFrame */