mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 11:55:24 +00:00
Monotone-Parent: d7e6aefd1b9108964b5b73aaa4990bf5dc4c6066
Monotone-Revision: a3b4583a95b88223d1e19194a62af3dee02ca608 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-22T17:07:15 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2006-12-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame
|
||||
-composeAction]): method imported from removed container modules.
|
||||
([UIxMailMainFrame -mailFolderName]): method imported from removed
|
||||
container modules.
|
||||
|
||||
* UI/MailerUI/UIxMailPopupView.m: a new special popup component
|
||||
for wrapping UIxMailView with the "popupview" action.
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
#import "UIxMailMainFrame.h"
|
||||
|
||||
@@ -183,4 +184,55 @@ static NSString *treeRootClassName = nil;
|
||||
@"</script>", errorText];
|
||||
}
|
||||
|
||||
/* FIXME: migrated methods which might not work yet... */
|
||||
#warning check this
|
||||
- (NSString *) mailFolderName
|
||||
{
|
||||
NSMutableArray *mailboxes;
|
||||
SOGoMailObject *currentObject;
|
||||
|
||||
mailboxes = [NSMutableArray new];
|
||||
[mailboxes autorelease];
|
||||
|
||||
currentObject = [self clientObject];
|
||||
while (![currentObject isKindOfClass: [SOGoMailAccounts class]])
|
||||
{
|
||||
[mailboxes insertObject: [currentObject nameInContainer] atIndex: 0];
|
||||
currentObject = [currentObject container];
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat: @"/%@",
|
||||
[mailboxes componentsJoinedByString: @"/"]];
|
||||
}
|
||||
|
||||
- (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 /* UIxMailMainFrame */
|
||||
|
||||
Reference in New Issue
Block a user