mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-03 17:39:45 +00:00
Monotone-Parent: 5a0923ee4a53f0897396508265abec375d015ac6
Monotone-Revision: ef958228c2d8c66a13e333a92731c39034ca0b02 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-25T19:40:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#import <SOGo/NSObject+Utilities.h>
|
||||
#import <SOGo/SOGoDateFormatter.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#import "SOGoAptMailNotification.h"
|
||||
|
||||
@@ -39,12 +38,11 @@
|
||||
@implementation SOGoAptMailUpdate
|
||||
|
||||
- (NSString *) valueForProperty: (NSString *) property
|
||||
withDateFormatter: (SOGoDateFormatter *) dateFormatter
|
||||
{
|
||||
static NSDictionary *valueTypes = nil;
|
||||
NSString *valueType;
|
||||
id value;
|
||||
SOGoUser *user;
|
||||
NSTimeZone *userTZ;
|
||||
|
||||
if (!valueTypes)
|
||||
{
|
||||
@@ -65,11 +63,8 @@
|
||||
value = [(iCalEvent *) apt propertyValue: property];
|
||||
if ([valueType isEqualToString: @"date"])
|
||||
{
|
||||
user = [context activeUser];
|
||||
userTZ = [[user userDefaults] timeZone];
|
||||
[value setTimeZone: userTZ];
|
||||
value = [[user dateFormatterInContext: context]
|
||||
formattedDateAndTime: value];
|
||||
[value setTimeZone: viewTZ];
|
||||
value = [dateFormatter formattedDateAndTime: value];
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -78,7 +73,7 @@
|
||||
return value;
|
||||
}
|
||||
|
||||
- (void) _setupBodyContent
|
||||
- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) dateFormatter
|
||||
{
|
||||
NSArray *updatedProperties;
|
||||
NSMutableString *bodyContent;
|
||||
@@ -93,7 +88,8 @@
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
property = [updatedProperties objectAtIndex: count];
|
||||
value = [self valueForProperty: property];
|
||||
value = [self valueForProperty: property
|
||||
withDateFormatter: dateFormatter];
|
||||
/* Unhandled properties will return nil */
|
||||
if (value)
|
||||
{
|
||||
@@ -107,7 +103,7 @@
|
||||
[bodyContent release];
|
||||
}
|
||||
|
||||
- (void) _setupBodyValues
|
||||
- (void) _setupBodyValuesWithFormatter: (SOGoDateFormatter *) dateFormatter
|
||||
{
|
||||
NSString *bodyText;
|
||||
|
||||
@@ -116,7 +112,7 @@
|
||||
inContext: context];
|
||||
[values setObject: [values keysWithFormat: bodyText]
|
||||
forKey: @"_bodyStart"];
|
||||
[self _setupBodyContent];
|
||||
[self _setupBodyContentWithFormatter: dateFormatter];
|
||||
[values setObject: [self labelForKey: @"Please accept"
|
||||
@" or decline those changes."
|
||||
inContext: context]
|
||||
@@ -144,7 +140,7 @@
|
||||
[values setObject: [dateFormatter formattedTime: date]
|
||||
forKey: @"StartTime"];
|
||||
|
||||
[self _setupBodyValues];
|
||||
[self _setupBodyValuesWithFormatter: dateFormatter];
|
||||
}
|
||||
|
||||
- (NSString *) getSubject
|
||||
|
||||
Reference in New Issue
Block a user