From 99ee274bb6394c397ffd13ef8ab8174268d60444 Mon Sep 17 00:00:00 2001 From: znek Date: Mon, 13 Dec 2004 13:33:47 +0000 Subject: [PATCH] "private appointment" prefix for private appointments git-svn-id: http://svn.opengroupware.org/SOGo/trunk@471 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/SOGoUI/ChangeLog | 5 ++++ SOGo/UI/SOGoUI/SOGoAptFormatter.h | 4 +++ SOGo/UI/SOGoUI/SOGoAptFormatter.m | 30 ++++++++++++++----- SOGo/UI/SOGoUI/Version | 2 +- SOGo/UI/Scheduler/ChangeLog | 13 ++++++++ .../Scheduler/English.lproj/default.strings | 2 ++ .../UI/Scheduler/French.lproj/default.strings | 6 +++- SOGo/UI/Scheduler/UIxCalMonthPrintview.m | 4 +++ SOGo/UI/Scheduler/UIxCalView.m | 6 ++++ SOGo/UI/Scheduler/UIxCalWeekPrintview.m | 5 ++++ SOGo/UI/Scheduler/Version | 3 +- 11 files changed, 70 insertions(+), 10 deletions(-) diff --git a/SOGo/UI/SOGoUI/ChangeLog b/SOGo/UI/SOGoUI/ChangeLog index 5c4d9f4c..f0618c57 100644 --- a/SOGo/UI/SOGoUI/ChangeLog +++ b/SOGo/UI/SOGoUI/ChangeLog @@ -1,3 +1,8 @@ +2004-12-13 Marcus Mueller + + * SOGoAptFormatter.[hm]: added ability to set custom title for private + appointments. (v0.9.20) + 2004-12-10 Marcus Mueller * SOGoAptFormatter.[hm]: added formatting for private apts, additional diff --git a/SOGo/UI/SOGoUI/SOGoAptFormatter.h b/SOGo/UI/SOGoUI/SOGoAptFormatter.h index 151e60fc..2c815b8b 100644 --- a/SOGo/UI/SOGoUI/SOGoAptFormatter.h +++ b/SOGo/UI/SOGoUI/SOGoAptFormatter.h @@ -32,6 +32,7 @@ { NSTimeZone *tz; SEL formatAction; + NSString *privateTitle; } - (id)initWithDisplayTimeZone:(NSTimeZone *)_tz; @@ -44,6 +45,9 @@ - (void)setPrivateTooltip; - (void)setPrivateDetails; - (void)setPrivateSuppressAll; + +- (void)setPrivateTitle:(NSString *)_privateTitle; +- (NSString *)privateTitle; @end diff --git a/SOGo/UI/SOGoUI/SOGoAptFormatter.m b/SOGo/UI/SOGoUI/SOGoAptFormatter.m index 9168f4e4..9bcc4467 100644 --- a/SOGo/UI/SOGoUI/SOGoAptFormatter.m +++ b/SOGo/UI/SOGoUI/SOGoAptFormatter.m @@ -41,7 +41,8 @@ } - (void)dealloc { - [self->tz release]; + [self->tz release]; + [self->privateTitle release]; [super dealloc]; } @@ -75,6 +76,13 @@ self->formatAction = @selector(suppressApt:); } +- (void)setPrivateTitle:(NSString *)_privateTitle { + ASSIGN(self->privateTitle, _privateTitle); +} +- (NSString *)privateTitle { + return self->privateTitle; +} + - (NSString *)stringForObjectValue:(id)_obj { return [self performSelector:self->formatAction withObject:_obj]; } @@ -140,17 +148,20 @@ - (NSString *)detailsForPrivateApt:(id)_apt { NSMutableString *aptDescr; + NSString *s; - aptDescr = [NSMutableString stringWithCapacity:25]; + aptDescr = [NSMutableString stringWithCapacity:40]; [self appendTimeInfoFromApt:_apt toBuffer:aptDescr]; + if ((s = [self privateTitle]) != nil) + [aptDescr appendFormat:@"
%@", s]; return aptDescr; } - (NSString *)tooltipForApt:(id)_apt { - NSCalendarDate *startDate, *endDate; + NSCalendarDate *startDate, *endDate; NSMutableString *aptDescr; - NSString *s; - BOOL spansRange; + NSString *s; + BOOL spansRange; spansRange = NO; startDate = [_apt valueForKey:@"startDate"]; @@ -180,9 +191,10 @@ } - (NSString *)tooltipForPrivateApt:(id)_apt { - NSCalendarDate *startDate, *endDate; + NSCalendarDate *startDate, *endDate; NSMutableString *aptDescr; - BOOL spansRange; + NSString *s; + BOOL spansRange; spansRange = NO; startDate = [_apt valueForKey:@"startDate"]; @@ -202,6 +214,10 @@ [endDate hourOfDay], [endDate minuteOfHour]]; } + + if ((s = [self privateTitle]) != nil) + [aptDescr appendFormat:@"\n%@", s]; + return aptDescr; } diff --git a/SOGo/UI/SOGoUI/Version b/SOGo/UI/SOGoUI/Version index 4973dd21..b735e6e0 100644 --- a/SOGo/UI/SOGoUI/Version +++ b/SOGo/UI/SOGoUI/Version @@ -1,5 +1,5 @@ # $Id$ -SUBMINOR_VERSION:=19 +SUBMINOR_VERSION:=20 # v0.9.18 requires NGExtensions v4.5.136 diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 57b981f9..38a87aa9 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,16 @@ +2004-12-13 Marcus Mueller + + * v0.9.99 + + * {English,French}.lproj/default.strings: new label + "private appointment", requested by Laurent for agenor. + + * UIxCalWeekPrintview.m, UIxCalMonthPrintview.m: add label + "private appointment" if apt is not accessible. + + * UIxCalView.m: set label "private appointment" as privateTitle of + private formatters. + 2004-12-10 Marcus Mueller * v0.9.98 diff --git a/SOGo/UI/Scheduler/English.lproj/default.strings b/SOGo/UI/Scheduler/English.lproj/default.strings index 3800aa16..a70917af 100644 --- a/SOGo/UI/Scheduler/English.lproj/default.strings +++ b/SOGo/UI/Scheduler/English.lproj/default.strings @@ -120,6 +120,8 @@ /* classification */ "Public" = "Public"; "Private" = "Private"; +/* text used in overviews and tooltips */ +"private appointment" = "Private appointment"; /* Searching */ diff --git a/SOGo/UI/Scheduler/French.lproj/default.strings b/SOGo/UI/Scheduler/French.lproj/default.strings index bea90330..7b5297ea 100644 --- a/SOGo/UI/Scheduler/French.lproj/default.strings +++ b/SOGo/UI/Scheduler/French.lproj/default.strings @@ -89,4 +89,8 @@ "Comment" ="Notes" "Save" ="Sauvegarder" "Cancel" ="Annuler" -"Test" ="Test" \ No newline at end of file +"Test" ="Test" + + +/* text used in overviews and tooltips */ +"private appointment" = "Rendez-vous privé"; diff --git a/SOGo/UI/Scheduler/UIxCalMonthPrintview.m b/SOGo/UI/Scheduler/UIxCalMonthPrintview.m index 9563157a..ba2cb4c0 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthPrintview.m +++ b/SOGo/UI/Scheduler/UIxCalMonthPrintview.m @@ -78,6 +78,10 @@ [aptDescr appendFormat:@"
%@", s]; } } + else { + [aptDescr appendFormat:@"
%@", + [self labelForKey:@"private appointment"]]; + } if(!isMyApt) [aptDescr appendString:@""]; return [aptDescr autorelease]; diff --git a/SOGo/UI/Scheduler/UIxCalView.m b/SOGo/UI/Scheduler/UIxCalView.m index f6a8a267..899fd136 100644 --- a/SOGo/UI/Scheduler/UIxCalView.m +++ b/SOGo/UI/Scheduler/UIxCalView.m @@ -56,10 +56,16 @@ static BOOL shouldDisplayWeekend = NO; /* subclasses should override this */ - (void)configureFormatters { + NSString *title; + [self->aptFormatter setFullDetails]; [self->aptTooltipFormatter setTooltip]; [self->privateAptFormatter setPrivateDetails]; [self->privateAptTooltipFormatter setPrivateTooltip]; + + title = [self labelForKey:@"private appointment"]; + [self->privateAptFormatter setPrivateTitle:title]; + [self->privateAptTooltipFormatter setPrivateTitle:title]; } /* accessors */ diff --git a/SOGo/UI/Scheduler/UIxCalWeekPrintview.m b/SOGo/UI/Scheduler/UIxCalWeekPrintview.m index 6a165cf4..17d920cf 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekPrintview.m +++ b/SOGo/UI/Scheduler/UIxCalWeekPrintview.m @@ -76,6 +76,11 @@ [aptDescr appendFormat:@"
%@", s]; } } + else { + [aptDescr appendFormat:@"
%@", + [self labelForKey:@"private appointment"]]; + } + if(!isMyApt) [aptDescr appendString:@""]; return [aptDescr autorelease]; diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 91f73e22..e258872b 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,7 +1,8 @@ # $Id$ -SUBMINOR_VERSION:=98 +SUBMINOR_VERSION:=99 +# v0.9.99 requires SOGoUI v0.9.20 # v0.9.98 requires SOGoUI v0.9.19 # v0.9.96 requires SOGoLogic v0.9.27 # v0.9.94 requires NGExtensions v4.5.136 -- 2.39.5