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:
Wolfgang Sourdeau
2006-08-03 21:34:19 +00:00
parent 9e0cdaabe0
commit d7601f5d27
3 changed files with 47 additions and 0 deletions
+31
View File
@@ -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 */