Monotone-Parent: 94cd3c2d69b764a47aa3032dde40735f50a696c9
Monotone-Revision: e37818ac299ffd1845d90c7047747a1432c95bcf Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-01-06T19:43:23 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
62433faf35
commit
6c51e6e132
|
@ -1,5 +1,10 @@
|
||||||
2010-01-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
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
|
* UI/Scheduler/UIxDatePicker.m
|
||||||
(-takeValuesFromRequest:inContext:): we set the new date to the
|
(-takeValuesFromRequest:inContext:): we set the new date to the
|
||||||
user's timezone and recompute the proper offset compare to the
|
user's timezone and recompute the proper offset compare to the
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
NSNumber *yearMenuItem;
|
NSNumber *yearMenuItem;
|
||||||
SOGoUserSettings *us;
|
SOGoUserSettings *us;
|
||||||
NSMutableDictionary *moduleSettings;
|
NSMutableDictionary *moduleSettings;
|
||||||
|
BOOL contextIsSetup;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) monthMenuItems;
|
- (NSArray *) monthMenuItems;
|
||||||
|
|
|
@ -49,7 +49,10 @@
|
||||||
|
|
||||||
ud = [[context activeUser] userDefaults];
|
ud = [[context activeUser] userDefaults];
|
||||||
if ([ud rememberLastModule])
|
if ([ud rememberLastModule])
|
||||||
[ud setLoginModule: @"Calendar"];
|
{
|
||||||
|
[ud setLoginModule: @"Calendar"];
|
||||||
|
[ud synchronize];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _setupContext
|
- (void) _setupContext
|
||||||
|
@ -58,6 +61,7 @@
|
||||||
NSString *module;
|
NSString *module;
|
||||||
SOGoAppointmentFolders *clientObject;
|
SOGoAppointmentFolders *clientObject;
|
||||||
|
|
||||||
|
contextIsSetup = YES;
|
||||||
[self checkDefaultModulePreference];
|
[self checkDefaultModulePreference];
|
||||||
|
|
||||||
activeUser = [context activeUser];
|
activeUser = [context activeUser];
|
||||||
|
@ -135,7 +139,8 @@
|
||||||
{
|
{
|
||||||
NSString *vertical;
|
NSString *vertical;
|
||||||
|
|
||||||
[self _setupContext];
|
if (!contextIsSetup)
|
||||||
|
[self _setupContext];
|
||||||
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
|
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
|
||||||
|
|
||||||
return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil);
|
return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil);
|
||||||
|
@ -145,7 +150,8 @@
|
||||||
{
|
{
|
||||||
NSString *horizontal;
|
NSString *horizontal;
|
||||||
|
|
||||||
[self _setupContext];
|
if (!contextIsSetup)
|
||||||
|
[self _setupContext];
|
||||||
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
|
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
|
||||||
|
|
||||||
return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil);
|
return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil);
|
||||||
|
@ -155,7 +161,8 @@
|
||||||
{
|
{
|
||||||
NSString *height;
|
NSString *height;
|
||||||
|
|
||||||
[self _setupContext];
|
if (!contextIsSetup)
|
||||||
|
[self _setupContext];
|
||||||
height = [moduleSettings objectForKey: @"DragHandleVertical"];
|
height = [moduleSettings objectForKey: @"DragHandleVertical"];
|
||||||
|
|
||||||
return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
|
return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
|
||||||
|
@ -166,7 +173,8 @@
|
||||||
WORequest *request;
|
WORequest *request;
|
||||||
NSString *dragHandle;
|
NSString *dragHandle;
|
||||||
|
|
||||||
[self _setupContext];
|
if (!contextIsSetup)
|
||||||
|
[self _setupContext];
|
||||||
request = [context request];
|
request = [context request];
|
||||||
|
|
||||||
if ((dragHandle = [request formValueForKey: @"vertical"]) != nil)
|
if ((dragHandle = [request formValueForKey: @"vertical"]) != nil)
|
||||||
|
@ -205,7 +213,8 @@
|
||||||
{
|
{
|
||||||
NSString *view;
|
NSString *view;
|
||||||
|
|
||||||
[self _setupContext];
|
if (!contextIsSetup)
|
||||||
|
[self _setupContext];
|
||||||
view = [moduleSettings objectForKey: @"View"];
|
view = [moduleSettings objectForKey: @"View"];
|
||||||
|
|
||||||
return (view ? view : @"weekview");
|
return (view ? view : @"weekview");
|
||||||
|
|
Loading…
Reference in New Issue