From 475c60ce7f03ab5f9e324d6febaa1438088c9c2e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 17 Jul 2006 17:26:15 +0000 Subject: [PATCH] Monotone-Parent: 94a876e445d85c07068605284844c8c23125a590 Monotone-Revision: a2a755bb974fa1ddef5662d996422c2b90023444 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-07-17T17:26:15 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/MailerUI/UIxMailFormatter.h | 2 ++ UI/MailerUI/UIxMailFormatter.m | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 979f0d986..b60a6708a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-07-17 Wolfgang Sourdeau + * UI/MailerUI/UIxMailFormatter.m ([UIxMailDateFormatter + -setTimeZone:newTimeZone]): new accessor to specify the timezone. + * UI/MailerUI/UIxMailFilterPanel.m ([UIxMailFilterPanel -setSearchCriteria:]) ([UIxMailFilterPanel -searchCriteria]): new methods, similar to s/Criteria/Text/ to handle the "criteria" form parameter. diff --git a/UI/MailerUI/UIxMailFormatter.h b/UI/MailerUI/UIxMailFormatter.h index 49dded896..2270e2870 100644 --- a/UI/MailerUI/UIxMailFormatter.h +++ b/UI/MailerUI/UIxMailFormatter.h @@ -56,6 +56,8 @@ /* configuration */ - (NSTimeZone *)timeZone; +- (void) setTimeZone: (NSTimeZone *) newTimeZone; + - (BOOL)showOnlyTimeForToday; - (BOOL)showLabelsForNearDays; diff --git a/UI/MailerUI/UIxMailFormatter.m b/UI/MailerUI/UIxMailFormatter.m index e15f27b21..0479e9539 100644 --- a/UI/MailerUI/UIxMailFormatter.m +++ b/UI/MailerUI/UIxMailFormatter.m @@ -71,10 +71,22 @@ static BOOL debugOn = YES; /* configuration */ -- (NSTimeZone *)timeZone { +- (NSTimeZone *)timeZone +{ return self->timeZone; } +- (void) setTimeZone: (NSTimeZone *) newTimeZone +{ + if (timeZone) + [timeZone release]; + + timeZone = newTimeZone; + + if (timeZone) + [timeZone retain]; +} + - (BOOL)showOnlyTimeForToday { return self->dfFlags.showOnlyTimeForToday ? YES : NO; } @@ -101,7 +113,7 @@ static BOOL debugOn = YES; [self->now setTimeZone:[self timeZone]]; } [_date setTimeZone:[self timeZone]]; - + if ([self showOnlyTimeForToday] && [_date isDateOnSameDay:self->now]) return [self stringForTime:_date prefix:NULL];