From 6b539e8e15938b4eccf5d33f43696a20517a6d9a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 14 Aug 2006 20:43:55 +0000 Subject: [PATCH] Monotone-Parent: 755524b00e9b962e6240a95f6bfdd559ca240f5a Monotone-Revision: b37f3f6ae0b2c8936fa170defaec8e6b7c107b85 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-14T20:43:55 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 +++ UI/Scheduler/French.lproj/Localizable.strings | 2 +- UI/Scheduler/GNUmakefile | 3 +- UI/Scheduler/UIxAppointmentEditor.m | 11 ++++---- UI/Scheduler/UIxCalDateLabel.m | 26 ++++++++--------- UI/Scheduler/UIxCalView.m | 11 ++++---- UI/Scheduler/iCalPerson+UIx.h | 3 ++ UI/Scheduler/iCalPerson+UIx.m | 28 ++++++++++++++++--- 8 files changed, 57 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index a297231a8..606903427 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-14 Wolfgang Sourdeau + * UI/Scheduler/iCalPerson+UIx.m ([iCalPerson +personWithUid:]): + new class method that returns an iCalPerson based on the UID given + as param. + * UI/Contacts/UIxContactsListViewContainerBase.m: UIxContactsListViewContainer renamed to serve as a base class for the contact lists in both the contact editor and the contact diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index b6bc1b643..ef9809e82 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -212,7 +212,7 @@ "NOT IN OFFICE" = "A l'exterieur"; "MEETING" = "Rêunion"; "HOLIDAY" = "Vacances"; -"PHONE CALL" = "Rendez-vous téléphonique"; +"PHONE CALL" = "Rendez-vous têlêphonique"; /* validation errors */ diff --git a/UI/Scheduler/GNUmakefile b/UI/Scheduler/GNUmakefile index 9e4784139..c8038c0e6 100644 --- a/UI/Scheduler/GNUmakefile +++ b/UI/Scheduler/GNUmakefile @@ -52,8 +52,7 @@ SchedulerUI_OBJC_FILES = \ SchedulerUI_RESOURCE_FILES += \ Version \ - product.plist \ - SchedulerUI.js + product.plist SchedulerUI_RESOURCE_FILES += \ images/next_week.gif \ diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 48f9771ae..80aec0da1 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -654,11 +654,12 @@ method = [[self userFolderPath] stringByAppendingPathComponent:method]; /* check if participants have already been provided */ - ps = [[[self context] request] formValueForKey:@"ps"]; - if (ps) { - [self setQueryParameter:ps forKey:@"ps"]; - } - else if ([[self clientObject] respondsToSelector:@selector(calendarUIDs)]) { + ps = [self queryParameterForKey:@"ps"]; +// if (ps) { +// [self setQueryParameter:ps forKey:@"ps"]; +// } + if (!ps + && [[self clientObject] respondsToSelector:@selector(calendarUIDs)]) { AgenorUserManager *um; NSArray *uids; NSMutableArray *emails; diff --git a/UI/Scheduler/UIxCalDateLabel.m b/UI/Scheduler/UIxCalDateLabel.m index 13646b213..5a53fde8a 100644 --- a/UI/Scheduler/UIxCalDateLabel.m +++ b/UI/Scheduler/UIxCalDateLabel.m @@ -91,20 +91,20 @@ } - (NSString *)weekLabel { - NSString *label; + NSString *label, *le; - label = [self localizedNameForMonthOfYear:[self->startDate monthOfYear]]; - label = [NSString stringWithFormat:@"%@ %d", - label, - [self->startDate yearOfCommonEra]]; - if ([self->startDate monthOfYear] != [self->endDate monthOfYear]) { - NSString *le; - - le = [self localizedNameForMonthOfYear:[self->endDate monthOfYear]]; - label = [NSString stringWithFormat:@"%@ / %@ %d", - label, le, - [self->endDate yearOfCommonEra]]; - } + if ([self->startDate monthOfYear] == [self->endDate monthOfYear]) + label = [NSString stringWithFormat:@"%@ %d", + [self localizedNameForMonthOfYear: [self->startDate monthOfYear]], + [self->startDate yearOfCommonEra]]; + else + { + le = [self localizedNameForMonthOfYear:[self->endDate monthOfYear]]; + label = [NSString stringWithFormat:@"%@ / %@ %d", + label, le, + [self->endDate yearOfCommonEra]]; + } + return label; } diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index c6d9a59c5..d9377e38e 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -370,7 +370,7 @@ static BOOL shouldDisplayWeekend = NO; - (BOOL)shouldDisplayRejectedAppointments { NSString *bv; - bv = [[[self context] request] formValueForKey:@"dr"]; + bv = [self queryParameterForKey: @"dr"]; if (!bv) return NO; return [bv boolValue]; } @@ -427,17 +427,15 @@ static BOOL shouldDisplayWeekend = NO; - (id)redirectForUIDsAction { NSMutableString *uri; NSString *uidsString, *loc, *prevMethod, *userFolderID; - WORequest *req; id r; BOOL useGroups; unsigned index; - req = [[self context] request]; - - uidsString = [req formValueForKey:@"userUIDString"]; + uidsString = [self queryParameterForKey:@"userUIDString"]; uidsString = [uidsString stringByTrimmingWhiteSpaces]; + [self setQueryParameter: nil forKey: @"userUIDString"]; - prevMethod = [req formValueForKey:@"previousMethod"]; + prevMethod = [self queryParameterForKey:@"previousMethod"]; if(prevMethod == nil) prevMethod = @""; @@ -460,6 +458,7 @@ static BOOL shouldDisplayWeekend = NO; [uri appendString:@"Groups/_custom_"]; [uri appendString:uidsString]; [uri appendString:@"/"]; + NSLog (@"Group URI = '%@'", uri); } else { /* check if lastPathComponent is the base that we want to have */ diff --git a/UI/Scheduler/iCalPerson+UIx.h b/UI/Scheduler/iCalPerson+UIx.h index 02658aaf7..f14bd25a5 100644 --- a/UI/Scheduler/iCalPerson+UIx.h +++ b/UI/Scheduler/iCalPerson+UIx.h @@ -28,6 +28,9 @@ @class NSString; @interface iCalPerson(Convenience) + ++ (iCalPerson *) personWithUid: (NSString *) uid; + - (NSString *)cnForDisplay; @end diff --git a/UI/Scheduler/iCalPerson+UIx.m b/UI/Scheduler/iCalPerson+UIx.m index b923475ee..e6cec5f22 100644 --- a/UI/Scheduler/iCalPerson+UIx.m +++ b/UI/Scheduler/iCalPerson+UIx.m @@ -20,12 +20,32 @@ */ // $Id: UIxAppointmentEditor.m 181 2004-08-11 15:13:25Z helge $ -#include "iCalPerson+UIx.h" -#include "common.h" +#import +#import "iCalPerson+UIx.h" +#import "common.h" -@implementation iCalPerson(Convenience) +@implementation iCalPerson (Convenience) -- (NSString *)cnForDisplay { ++ (iCalPerson *) personWithUid: (NSString *) uid +{ + iCalPerson *person; + AgenorUserManager *um; + NSString *email, *cn; + + person = [self new]; + [person autorelease]; + + um = [AgenorUserManager sharedUserManager]; + email = [um getEmailForUID: uid]; + cn = [um getCNForUID: uid]; + [person setCn: cn]; + [person setEmail: email]; + + return person; +} + +- (NSString *) cnForDisplay +{ return [self cnWithoutQuotes]; }