From 57f1041de3256e5af6ce84549fa68d3c44922b9a Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 12 Aug 2004 14:19:43 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@189 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Scheduler/ChangeLog | 4 + SOGo/UI/Scheduler/GNUmakefile | 49 +++++------ SOGo/UI/Scheduler/GNUmakefile.preamble | 4 +- SOGo/UI/Scheduler/UIxAppointmentEditor.m | 86 +++++++++----------- SOGo/UI/Scheduler/UIxAppointmentProposal.m | 21 +++++ SOGo/UI/Scheduler/UIxAppointmentProposal.wox | 11 +++ SOGo/UI/Scheduler/UIxCalDayOverview.h | 9 +- SOGo/UI/Scheduler/UIxCalWeekOverview.wox | 12 ++- SOGo/UI/Scheduler/Version | 2 +- SOGo/UI/Scheduler/iCalPerson+UIx.h | 34 ++++++++ SOGo/UI/Scheduler/iCalPerson+UIx.m | 41 ++++++++++ SOGoLogic/ChangeLog | 4 + SOGoLogic/SOGoAppointment.h | 3 + SOGoLogic/Version | 2 +- 14 files changed, 197 insertions(+), 85 deletions(-) create mode 100644 SOGo/UI/Scheduler/UIxAppointmentProposal.m create mode 100644 SOGo/UI/Scheduler/UIxAppointmentProposal.wox create mode 100644 SOGo/UI/Scheduler/iCalPerson+UIx.h create mode 100644 SOGo/UI/Scheduler/iCalPerson+UIx.m diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 7868b60d..281e4e91 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,7 @@ +2004-08-12 Helge Hess + + * some code reorganizations, fixed some compile warnings (v0.9.20) + 2004-08-11 Marcus Mueller * v0.9.19 diff --git a/SOGo/UI/Scheduler/GNUmakefile b/SOGo/UI/Scheduler/GNUmakefile index 6e260753..3c70f375 100644 --- a/SOGo/UI/Scheduler/GNUmakefile +++ b/SOGo/UI/Scheduler/GNUmakefile @@ -13,15 +13,16 @@ SchedulerUI_LANGUAGES = English French SchedulerUI_OBJC_FILES = \ SchedulerUIProduct.m \ UIxAppointmentFormatter.m \ - UIxCalView.m \ - UIxCalDayView.m \ - UIxCalWeekView.m \ - UIxCalMonthView.m \ - UIxAptTableView.m \ - \ - UIxCalDayOverview.m \ + iCalPerson+UIx.m \ + UIxCalView.m \ + UIxCalDayView.m \ + UIxCalWeekView.m \ + UIxCalMonthView.m \ + UIxAptTableView.m \ + \ + UIxCalDayOverview.m \ UIxCalDayChartview.m \ - UIxCalDayListview.m \ + UIxCalDayListview.m \ UIxCalDayPrintview.m \ UIxCalWeekOverview.m \ UIxCalWeekChartview.m \ @@ -34,15 +35,15 @@ SchedulerUI_OBJC_FILES = \ UIxCalInlineMonthOverview.m \ UIxAppointmentView.m \ UIxAppointmentEditor.m \ - UIxCalSelectTab.m \ - UIxCalDateLabel.m \ + UIxCalSelectTab.m \ + UIxCalDateLabel.m \ UIxCalBackForthNavView.m \ -SchedulerUI_RESOURCE_FILES += \ - Version \ - product.plist \ - \ - UIxAptTableView.wox \ +SchedulerUI_RESOURCE_FILES += \ + Version \ + product.plist \ + \ + UIxAptTableView.wox \ UIxCalDayOverview.wox \ UIxCalDayChartview.wox \ UIxCalDayListview.wox \ @@ -55,22 +56,22 @@ SchedulerUI_RESOURCE_FILES += \ UIxCalMonthOverview.wox \ UIxCalMonthPrintview.wox \ UIxCalYearOverview.wox \ - UIxCalInlineMonthOverview.wox \ + UIxCalInlineMonthOverview.wox \ UIxAppointmentView.wox \ UIxAppointmentEditor.wox \ - UIxCalSelectTab.wox \ - UIxCalDateLabel.wox \ + UIxCalSelectTab.wox \ + UIxCalDateLabel.wox \ UIxCalBackForthNavView.wox \ images/next_week.gif \ images/previous_week.gif \ - images/icon_view_overview.gif \ - images/icon_view_overview_inactive.gif \ + images/icon_view_overview.gif \ + images/icon_view_overview_inactive.gif \ images/icon_view_chart.gif \ - images/icon_view_chart_inactive.gif \ + images/icon_view_chart_inactive.gif \ images/icon_view_list.gif \ - images/icon_view_list_inactive.gif \ - images/icon_view_columns.gif \ - images/icon_view_columns_inactive.gif \ + images/icon_view_list_inactive.gif \ + images/icon_view_columns.gif \ + images/icon_view_columns_inactive.gif \ SchedulerUI_LOCALIZED_RESOURCE_FILES += \ default.strings diff --git a/SOGo/UI/Scheduler/GNUmakefile.preamble b/SOGo/UI/Scheduler/GNUmakefile.preamble index 838c1b58..c240c8e8 100644 --- a/SOGo/UI/Scheduler/GNUmakefile.preamble +++ b/SOGo/UI/Scheduler/GNUmakefile.preamble @@ -1,7 +1,9 @@ # $Id$ ADDITIONAL_INCLUDE_DIRS += \ - -I.. \ + -I.. \ + -I../.. \ + -I../../.. \ -I../../SoObjects ifneq ($(GNUSTEP_BUILD_DIR),) diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index 6b2f1f9b..c62b8831 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -20,16 +20,33 @@ */ // $Id$ - -#include "common.h" #include + +/* TODO: CLEAN UP */ + +@class NSString; +@class SOGoAppointment; + +@interface UIxAppointmentEditor : UIxComponent +{ + id appointment; + id participants; +} + +- (SOGoAppointment *)appointment; +- (NSString *)iCalStringTemplate; +- (NSString *)iCalString; + +@end + #include #include +#include +#include +#include "iCalPerson+UIx.h" +#include "common.h" #include - -/* TODO: CLEAN THIS MESS UP */ - @interface NSDate(UsedPrivates) - (NSString *)icalString; // TODO: this is in NGiCal @end @@ -44,57 +61,28 @@ } @end -@interface iCalPerson (Convenience) -- (NSString *)rfc822Email; -@end - -@implementation iCalPerson (Convenience) -- (NSString *)rfc822Email { - NSString *_email = [self email]; - NSRange colon = [_email rangeOfString:@":"]; - if(colon.location != NSNotFound) { - return [_email substringFromIndex:colon.location + 1]; - } - return _email; -} -@end - -@interface UIxAppointmentEditor : UIxComponent -{ - id appointment; - id participants; -} - -- (SOGoAppointment *)appointment; -- (NSString *)iCalStringTemplate; -- (NSString *)iCalString; - -@end - @implementation UIxAppointmentEditor - (void)dealloc { - [self->appointment release]; - [self->participants release]; - [super dealloc]; + [self->appointment release]; + [self->participants release]; + [super dealloc]; } - /* accessors */ - - (NSString *)formattedAptStartTime { - NSCalendarDate *date; - SOGoDateFormatter *fmt; - NSString *s; - - date = [[[[self appointment] startDate] copy] autorelease]; - [date setTimeZone:[self viewTimeZone]]; - fmt = [[SOGoDateFormatter alloc] initWithLocale:[self locale]]; - [fmt setFullWeekdayNameAndDetails]; - s = [fmt stringForObjectValue:date]; - [fmt release]; - return s; + NSCalendarDate *date; + SOGoDateFormatter *fmt; + NSString *s; + + date = [[[[self appointment] startDate] copy] autorelease]; + [date setTimeZone:[self viewTimeZone]]; + fmt = [[SOGoDateFormatter alloc] initWithLocale:[self locale]]; + [fmt setFullWeekdayNameAndDetails]; + s = [fmt stringForObjectValue:date]; + [fmt release]; + return s; } - (BOOL)isNewAppointment { @@ -105,7 +93,7 @@ - (NSString *)iCalString { // TODO: improve check for new appointment NSString *ical; - + ical = [[self clientObject] valueForKey:@"iCalString"]; if ([ical length] == 0) /* a new appointment */ ical = [self iCalStringTemplate]; diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.m b/SOGo/UI/Scheduler/UIxAppointmentProposal.m new file mode 100644 index 00000000..462c00d8 --- /dev/null +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.m @@ -0,0 +1,21 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ +// $Id: UIxAppointmentEditor.m 181 2004-08-11 15:13:25Z helge $ diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox new file mode 100644 index 00000000..17419a87 --- /dev/null +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox @@ -0,0 +1,11 @@ + + + proposal + diff --git a/SOGo/UI/Scheduler/UIxCalDayOverview.h b/SOGo/UI/Scheduler/UIxCalDayOverview.h index bc998aa1..3c2e2c65 100644 --- a/SOGo/UI/Scheduler/UIxCalDayOverview.h +++ b/SOGo/UI/Scheduler/UIxCalDayOverview.h @@ -20,13 +20,16 @@ */ // $Id$ +#ifndef __UIxCalDayOverview_H__ +#define __UIxCalDayOverview_H__ #include "UIxCalDayView.h" -#include "common.h" + +@className= NSArray; @interface UIxCalDayOverview : UIxCalDayView { - NSArray *currentApts; + NSArray *currentApts; } - (void)setCurrentApts:(NSArray *)_apts; @@ -35,3 +38,5 @@ - (int)minRequiredRowSpan; @end + +#endif /* __UIxCalDayOverview_H__ */ diff --git a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox index 38bcbfad..2b60bf99 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox +++ b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox @@ -7,9 +7,8 @@ xmlns:uix="OGo:uix" className="UIxPageFrame" title="name"> - - - +
- + -
@@ -21,7 +20,7 @@ const:selection="week" />
- +
@@ -178,14 +177,14 @@
+
@@ -206,5 +205,4 @@ --> - diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 93c8cd1d..7cb001ac 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=19 +SUBMINOR_VERSION:=20 diff --git a/SOGo/UI/Scheduler/iCalPerson+UIx.h b/SOGo/UI/Scheduler/iCalPerson+UIx.h new file mode 100644 index 00000000..eaa1989c --- /dev/null +++ b/SOGo/UI/Scheduler/iCalPerson+UIx.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ +// $Id: UIxAppointmentEditor.m 181 2004-08-11 15:13:25Z helge $ + +#ifndef __iCalPerson_UIx_H__ +#define __iCalPerson_UIx_H__ + +#include + +@class NSString; + +@interface iCalPerson(Convenience) +- (NSString *)rfc822Email; +@end + +#endif /* __iCalPerson_UIx_H__ */ diff --git a/SOGo/UI/Scheduler/iCalPerson+UIx.m b/SOGo/UI/Scheduler/iCalPerson+UIx.m new file mode 100644 index 00000000..94473e33 --- /dev/null +++ b/SOGo/UI/Scheduler/iCalPerson+UIx.m @@ -0,0 +1,41 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ +// $Id: UIxAppointmentEditor.m 181 2004-08-11 15:13:25Z helge $ + +#include "iCalPerson+UIx.h" +#include "common.h" + +@implementation iCalPerson(Convenience) + +- (NSString *)rfc822Email { + NSString *_email; + NSRange colon; + + _email = [self email]; + colon = [_email rangeOfString:@":"]; + + if (colon.length > 0) + return [_email substringFromIndex:(colon.location + colon.length)]; + + return _email; +} + +@end /* iCalPerson(Convenience) */ diff --git a/SOGoLogic/ChangeLog b/SOGoLogic/ChangeLog index d7958e21..c865704c 100644 --- a/SOGoLogic/ChangeLog +++ b/SOGoLogic/ChangeLog @@ -1,3 +1,7 @@ +2004-08-12 Helge Hess + + * SOGoAppointment.h: added -iCalString prototype (v0.9.2) + 2004-06-30 Marcus Mueller * SOGoAppointment.[hm]: new cover methods. also added hackish diff --git a/SOGoLogic/SOGoAppointment.h b/SOGoLogic/SOGoAppointment.h index ab12abcd..1b17ed4c 100644 --- a/SOGoLogic/SOGoAppointment.h +++ b/SOGoLogic/SOGoAppointment.h @@ -69,6 +69,9 @@ - (void)addToAttendees:(iCalPerson *)_person; - (NSArray *)attendees; +/* generating iCal */ + +- (NSString *)iCalString; /* do we really need these? */ diff --git a/SOGoLogic/Version b/SOGoLogic/Version index 237a5904..1bf86739 100644 --- a/SOGoLogic/Version +++ b/SOGoLogic/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=1 +SUBMINOR_VERSION:=2 -- 2.39.2