mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 08:34:30 +00:00
Monotone-Parent: 88aa0604fa28680daef426d3364f7f10665edb11
Monotone-Revision: 917c16cbc72247a3b9d3bc68547572f93349255c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-12-13T21:07:09 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -36,6 +36,28 @@
|
||||
|
||||
@implementation UIxMailMainFrame
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
NSString *login, *module;
|
||||
SOGoMailAccounts *clientObject;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
login = [activeUser login];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
module = [clientObject nameInContainer];
|
||||
|
||||
ud = [activeUser userSettings];
|
||||
moduleSettings = [ud objectForKey: module];
|
||||
if (!moduleSettings)
|
||||
{
|
||||
moduleSettings = [NSMutableDictionary new];
|
||||
[moduleSettings autorelease];
|
||||
}
|
||||
[ud setObject: moduleSettings forKey: module];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
- (NSString *) mailAccounts
|
||||
{
|
||||
@@ -111,4 +133,31 @@
|
||||
return [self redirectToLocation: newLocation];
|
||||
}
|
||||
|
||||
- (WOResponse *) getFoldersStateAction
|
||||
{
|
||||
NSString *expandedFolders;
|
||||
|
||||
[self _setupContext];
|
||||
expandedFolders = [moduleSettings objectForKey: @"ExpandedFolders"];
|
||||
|
||||
return [self responseWithStatus: 200 andString: expandedFolders];
|
||||
}
|
||||
|
||||
- (WOResponse *) saveFoldersStateAction
|
||||
{
|
||||
WORequest *request;
|
||||
NSString *expandedFolders;
|
||||
|
||||
[self _setupContext];
|
||||
request = [context request];
|
||||
expandedFolders = [request formValueForKey: @"expandedFolders"];
|
||||
|
||||
[moduleSettings setObject: expandedFolders
|
||||
forKey: @"ExpandedFolders"];
|
||||
|
||||
[ud synchronize];
|
||||
|
||||
return [self responseWithStatus: 204];
|
||||
}
|
||||
|
||||
@end /* UIxMailMainFrame */
|
||||
|
||||
Reference in New Issue
Block a user