mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 17:57:38 +00:00
Monotone-Parent: c4b57bd1cf368f4918027a1afcabf6f86bae1404
Monotone-Revision: 70ab4ae0cde514bb9351f75f64a1d92afee561ec Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-03T21:34:19 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
#include <SOGoUI/NSString+URL.h>
|
||||
|
||||
@interface UIxMailAccountsView : UIxComponent
|
||||
{
|
||||
@@ -54,4 +55,34 @@
|
||||
return actionResult;
|
||||
}
|
||||
|
||||
- (id) composeAction
|
||||
{
|
||||
NSArray *c;
|
||||
NSString *inbox, *url, *parameter;
|
||||
NSMutableDictionary *urlParams;
|
||||
id actionResult;
|
||||
|
||||
c = [[self clientObject] toManyRelationshipKeys];
|
||||
if ([c count] > 0)
|
||||
{
|
||||
urlParams = [NSMutableDictionary new];
|
||||
[urlParams autorelease];
|
||||
|
||||
parameter = [self queryParameterForKey: @"mailto"];
|
||||
if (parameter)
|
||||
[urlParams setObject: parameter
|
||||
forKey: @"mailto"];
|
||||
inbox = [NSString stringWithFormat: @"%@/INBOX",
|
||||
[c objectAtIndex: 0]];
|
||||
url = [inbox composeURLWithAction: @"compose"
|
||||
parameters: urlParams
|
||||
andHash: NO];
|
||||
actionResult = [self redirectToLocation: url];
|
||||
}
|
||||
else
|
||||
actionResult = self;
|
||||
|
||||
return actionResult;
|
||||
}
|
||||
|
||||
@end /* UIxMailAccountsView */
|
||||
|
||||
Reference in New Issue
Block a user