Monotone-Parent: 94cd3c2d69b764a47aa3032dde40735f50a696c9

Monotone-Revision: e37818ac299ffd1845d90c7047747a1432c95bcf

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-01-06T19:43:23
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-01-06 19:43:23 +00:00
parent 62433faf35
commit 6c51e6e132
3 changed files with 21 additions and 6 deletions

View File

@ -1,5 +1,10 @@
2010-01-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalMainView.m (-_setupContext): only invoked once
per instance.
(-checkDefaultModulePreference): synchronize the user defaults
after the login module was modified.
* UI/Scheduler/UIxDatePicker.m
(-takeValuesFromRequest:inContext:): we set the new date to the
user's timezone and recompute the proper offset compare to the

View File

@ -35,6 +35,7 @@
NSNumber *yearMenuItem;
SOGoUserSettings *us;
NSMutableDictionary *moduleSettings;
BOOL contextIsSetup;
}
- (NSArray *) monthMenuItems;

View File

@ -49,7 +49,10 @@
ud = [[context activeUser] userDefaults];
if ([ud rememberLastModule])
[ud setLoginModule: @"Calendar"];
{
[ud setLoginModule: @"Calendar"];
[ud synchronize];
}
}
- (void) _setupContext
@ -58,6 +61,7 @@
NSString *module;
SOGoAppointmentFolders *clientObject;
contextIsSetup = YES;
[self checkDefaultModulePreference];
activeUser = [context activeUser];
@ -135,7 +139,8 @@
{
NSString *vertical;
[self _setupContext];
if (!contextIsSetup)
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil);
@ -145,7 +150,8 @@
{
NSString *horizontal;
[self _setupContext];
if (!contextIsSetup)
[self _setupContext];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil);
@ -155,7 +161,8 @@
{
NSString *height;
[self _setupContext];
if (!contextIsSetup)
[self _setupContext];
height = [moduleSettings objectForKey: @"DragHandleVertical"];
return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
@ -166,7 +173,8 @@
WORequest *request;
NSString *dragHandle;
[self _setupContext];
if (!contextIsSetup)
[self _setupContext];
request = [context request];
if ((dragHandle = [request formValueForKey: @"vertical"]) != nil)
@ -205,7 +213,8 @@
{
NSString *view;
[self _setupContext];
if (!contextIsSetup)
[self _setupContext];
view = [moduleSettings objectForKey: @"View"];
return (view ? view : @"weekview");