Monotone-Parent: 03806ed8d8567d1f59013f435593e7994f0111e1

Monotone-Revision: c61109eb28c9671d365c0b308b3db5532b7b6d96

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-07-22T20:14:47
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-07-22 20:14:47 +00:00
parent 3c97145c7c
commit 7a99dbe7d8
3 changed files with 51 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2007-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage +initialize]):
scan the value of SOGoUIxDefaultModule. If not set, the default
module defaults to "Calendar".
([SOGoUserHomePage -defaultAction]): redirect the user to the
value of "SOGoUIxDefaultModule".
2007-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactsListView.m ([UIxContactsListView

5
NEWS
View File

@ -1,3 +1,8 @@
0.9.0-20070xxx
--------------
- added the ability to choose the default module from the
application settings: "Calendars", "Contacts" or "Mail";
0.9.0-20070713
--------------
- added the ability to specify a super user through the SOGoSuperUsername user

View File

@ -23,30 +23,64 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGExtensions/NSCalendarDate+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <Appointments/SOGoFreeBusyObject.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/NSCalendarDate+SOGo.h>
#import <SOGoUI/UIxComponent.h>
static NSString *defaultModule;
@interface SOGoUserHomePage : UIxComponent
@end
@implementation SOGoUserHomePage
+ (void) initialize
{
NSUserDefaults *ud;
ud = [NSUserDefaults standardUserDefaults];
defaultModule = [ud stringForKey: @"SOGoUIxDefaultModule"];
if (defaultModule)
{
if (defaultModule)
{
if (!([defaultModule isEqualToString: @"Calendar"]
|| [defaultModule isEqualToString: @"Contacts"]
|| [defaultModule isEqualToString: @"Mail"]))
{
[self logWithFormat: @"default module '%@' not accepted (must be"
@"'Calendar', 'Contacts' or Mail)", defaultModule];
defaultModule = @"Calendar";
}
}
else
defaultModule = @"Calendar";
[self logWithFormat: @"default module set to '%@'", defaultModule];
[defaultModule retain];
}
}
- (id <WOActionResults>) defaultAction
{
NSString *baseURL, *url;
SOGoUserFolder *co;
NSURL *moduleURL;
baseURL = [[context request] uri];
url = [baseURL stringByAppendingString:@"/../Calendar"];
co = [self clientObject];
moduleURL = [NSURL URLWithString: defaultModule
relativeToURL: [co soURL]];
return [self redirectToLocation: url];
return [self redirectToLocation: [moduleURL absoluteString]];
}
- (void) _fillFreeBusyItems: (NSMutableArray *) items