From ab1de24fa1ffe774ab1d133181eee0e9b01d27e8 Mon Sep 17 00:00:00 2001 From: helge Date: Sun, 20 Mar 2005 20:17:56 +0000 Subject: [PATCH] minro code cleanups git-svn-id: http://svn.opengroupware.org/SOGo/trunk@630 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Scheduler/ChangeLog | 8 ++++++ SOGo/UI/Scheduler/UIxCalDayListview.m | 36 +++++++++++++++++---------- SOGo/UI/Scheduler/UIxCalView.m | 14 +---------- SOGo/UI/Scheduler/Version | 2 +- 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index b29b3fbe..5864de58 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,11 @@ +2005-03-20 Helge Hess + + * v0.9.121 + + * UIxCalView.m: removed -calCSSPath (ZideStore specific) + + * UIxCalDayListview.m: minor code cleanups + 2005-03-03 Marcus Mueller * UIxCalWeekListview.m: fixed compile warnings (v0.9.120) diff --git a/SOGo/UI/Scheduler/UIxCalDayListview.m b/SOGo/UI/Scheduler/UIxCalDayListview.m index 691cc3e6..437154c8 100644 --- a/SOGo/UI/Scheduler/UIxCalDayListview.m +++ b/SOGo/UI/Scheduler/UIxCalDayListview.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 SKYRIX Software AG + Copyright (C) 2004-2005 SKYRIX Software AG This file is part of OpenGroupware.org. @@ -18,11 +18,17 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ - #include "UIxCalDayView.h" +/* + UIxCalDayListview + + TODO: describe +*/ + +@class NSArray; + @interface UIxCalDayListview : UIxCalDayView { NSArray *uids; @@ -33,6 +39,7 @@ #include "common.h" #include +#include @implementation UIxCalDayListview @@ -42,16 +49,19 @@ [super dealloc]; } +/* accessors */ + - (NSArray *)uids { - if(!self->uids) { - self->uids = [[[[self clientObject] calendarUIDs] + if (self->uids == nil) { + // TODO: use -copy? + self->uids = [[[(SOGoAppointmentFolder *)[self clientObject] calendarUIDs] sortedArrayUsingSelector:@selector(compareAscending:)] retain]; } return self->uids; } -- (void)setCurrentUid:(id)_currentUid { +- (void)setCurrentUid:(id)_currentUid { // TODO: NSString? ASSIGN(self->currentUid, _currentUid); } - (id)currentUid { @@ -65,6 +75,7 @@ - (NSString *)shortTextForApt { if (![self canAccessApt]) return @""; + return [[self appointment] valueForKey:@"title"]; } @@ -72,13 +83,12 @@ AgenorUserManager *um; NSString *mailChunk; NSString *currentMail; - - um = [AgenorUserManager sharedUserManager]; + + um = [AgenorUserManager sharedUserManager]; currentMail = [um getEmailForUID:self->currentUid]; - mailChunk = [self->appointment valueForKey:@"partmails"]; - if([mailChunk rangeOfString:currentMail].length > 0) - return YES; - return NO; + mailChunk = [self->appointment valueForKey:@"partmails"]; + + return ([mailChunk rangeOfString:currentMail].length > 0) ? YES : NO; } -@end +@end /* UIxCalDayListview */ diff --git a/SOGo/UI/Scheduler/UIxCalView.m b/SOGo/UI/Scheduler/UIxCalView.m index 4999c67b..ebf63146 100644 --- a/SOGo/UI/Scheduler/UIxCalView.m +++ b/SOGo/UI/Scheduler/UIxCalView.m @@ -2,7 +2,7 @@ #include "UIxCalView.h" #include "common.h" -#include +//#include #include "SoObjects/Appointments/SOGoAppointmentFolder.h" #include #include @@ -294,18 +294,6 @@ static BOOL shouldDisplayWeekend = NO; return [[self resourcePath] stringByAppendingPathComponent:@"favicon.ico"]; } -- (NSString *)calCSSPath { - NSString *path; - - // TODO: there should be reusable functionality for that! -#warning ZideStore specific? - path = @"ControlPanel/Products/ZideStoreUI/Resources/calendar.css"; - return [[self context] urlWithRequestHandlerKey:@"so" - path:path - queryString:nil]; -} - - /* fetching */ - (NSCalendarDate *)startDate { diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 6de1c872..cb2c3f5e 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=120 +SUBMINOR_VERSION:=121 # v0.9.115 requires NGiCal v4.5.44 # v0.9.113 requires libSOGo v0.9.30 -- 2.39.5