Monotone-Parent: a2a755bb974fa1ddef5662d996422c2b90023444
Monotone-Revision: 19b97126f927844e30fc782a413c4551aa3ac925 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-07-17T17:28:29 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
475c60ce7f
commit
228dd343c0
|
@ -1,5 +1,11 @@
|
|||
2006-07-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/WOContext+UIxMailer.m ([WOContext
|
||||
-mailDateFormatter]): retrieve the timezone from the user settings
|
||||
and pass it to the returned dateFormatter. Also, the dateFormatter
|
||||
is kept in a static variable to avoid useless
|
||||
creations/destructions.
|
||||
|
||||
* UI/MailerUI/UIxMailFormatter.m ([UIxMailDateFormatter
|
||||
-setTimeZone:newTimeZone]): new accessor to specify the timezone.
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "UIxMailFormatter.h"
|
||||
#include "common.h"
|
||||
|
||||
#include <SoObjects/SOGo/SOGoUser.h>
|
||||
|
||||
@implementation WOContext(UIxMailer)
|
||||
|
||||
// TODO: make configurable
|
||||
|
@ -32,8 +34,26 @@
|
|||
return [[[UIxSubjectFormatter alloc] init] autorelease];
|
||||
}
|
||||
|
||||
- (NSFormatter *)mailDateFormatter {
|
||||
return [[[UIxMailDateFormatter alloc] init] autorelease];
|
||||
- (NSFormatter *)mailDateFormatter
|
||||
{
|
||||
NSTimeZone *userTZ;
|
||||
NSString *userTZString;
|
||||
id userPrefs;
|
||||
static id dateFormatter = nil;
|
||||
|
||||
if (!dateFormatter)
|
||||
{
|
||||
dateFormatter = [UIxMailDateFormatter new];
|
||||
userPrefs = [[self activeUser] userDefaults];
|
||||
userTZString = [userPrefs stringForKey: @"timezonename"];
|
||||
if ([userTZString length] > 0)
|
||||
{
|
||||
userTZ = [NSTimeZone timeZoneWithName: userTZString];
|
||||
[dateFormatter setTimeZone: userTZ];
|
||||
}
|
||||
}
|
||||
|
||||
return dateFormatter;
|
||||
}
|
||||
|
||||
- (NSFormatter *)mailEnvelopeAddressFormatter {
|
||||
|
|
Loading…
Reference in New Issue