]> err.no Git - scalable-opengroupware.org/commitdiff
some code cleanup
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 19 Jul 2005 07:42:02 +0000 (07:42 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 19 Jul 2005 07:42:02 +0000 (07:42 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@813 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/GNUmakefile
SOGo/UI/Scheduler/UIxAppointmentEditor.m
SOGo/UI/Scheduler/Version
SOGo/UI/Scheduler/iCalRecurrenceRule+SOGo.m [new file with mode: 0644]

index d75e98ae6f13d355d2cade240ad841a520835e20..b1adf6a178e4deeebc0a3e65a28adf45b08025a0 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-19  Helge Hess  <helge.hess@opengroupware.org>
+
+       * UIxAppointmentEditor.m: moved iCalRecurrenceRule to separate file
+         (v0.9.137)
+
 2005-07-18  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * UIxCalView.m: provide label "empty title" as -titlePlaceholder for
index e3f140685ee5339b1a5b39e31ce8d9a5fec34ea1..850993487190c4e5a531d730d1b8647dc9184e9d 100644 (file)
@@ -48,45 +48,13 @@ SchedulerUI_OBJC_FILES =            \
        UIxCalInlineAptView.m           \
        UIxCalScheduleOverview.m        \
        UIxCalParticipationStatusView.m \
+       \
+       iCalRecurrenceRule+SOGo.m       \
 
 SchedulerUI_RESOURCE_FILES += \
        Version         \
        product.plist
 
-ifeq ($(bundlewox),yes)
-
-SchedulerUI_RESOURCE_FILES +=                  \
-       UIxAptTableView.wox                     \
-       UIxCalDayOverview.wox                   \
-       UIxCalDayChartview.wox                  \
-       UIxCalDayListview.wox                   \
-       UIxCalDayPrintview.wox                  \
-       UIxCalWeekOverview.wox                  \
-       UIxCalWeekChartview.wox                 \
-       UIxCalWeekListview.wox                  \
-       UIxCalWeekColumnsview.wox               \
-       UIxCalWeekPrintview.wox                 \
-       UIxCalMonthOverview.wox                 \
-       UIxCalMonthPrintview.wox                \
-       UIxCalYearOverview.wox                  \
-       UIxCalInlineMonthOverview.wox           \
-       UIxAppointmentView.wox                  \
-       UIxAppointmentPrintview.wox             \
-       UIxAppointmentEditor.wox                \
-       UIxCalSelectTab.wox                     \
-       UIxCalDateLabel.wox                     \
-       UIxCalBackForthNavView.wox              \
-       UIxAppointmentProposal.wox              \
-       UIxDatePicker.wox                       \
-       UIxDatePickerScript.wox                 \
-       UIxTimeSelector.wox                     \
-       UIxTimeDateControl.wox                  \
-       UIxCalInlineAptView.wox                 \
-       UIxCalScheduleOverview.wox              \
-       UIxCalParticipationStatusView.wox       \
-
-endif
-
 SchedulerUI_RESOURCE_FILES += \
        images/next_week.gif                    \
        images/previous_week.gif                \
index 5acb46fa0d27438a7e8c3543452e89022137e979..b2b99090660fba21f796a2841b31da2d8bc7097a 100644 (file)
   [_appointment setTransparency:[self transparency]];
 
 #if 0
-  /* bad, bad, bad!
-   * Organizer is no form value, thus we MUST NOT change it
-   */
+  /*
+    Note: bad, bad, bad!
+    Organizer is no form value, thus we MUST NOT change it
+  */
   [_appointment setOrganizer:self->organizer];
 #endif
   attendees  = [self participants];
 /* access */
 
 - (BOOL)isMyApt {
-  if (!self->organizer) return YES; // assume this is safe to do, right?
+  if (self->organizer == nil)
+    return YES; // assume this is safe to do, right?
+  
+  // TODO: this should check a set of emails against the SoUser
   return [[self->organizer rfc822Email] isEqualToString:[self emailForUser]];
 }
 
                         reason:@"unable to parse appointment"];
   }
   
-  p = [apt findParticipantWithEmail:[self emailForUser]];
-  if (!p) {
+  if ((p = [apt findParticipantWithEmail:[self emailForUser]]) == nil) {
     /* 404 == Not found */
     return [NSException exceptionWithHTTPStatus:404
                         reason:@"user does not participate in this "
                                @"appointment"];
   }
-  if(_accept)
+
+  // TODO: add tentative
+  if (_accept)
     [p setParticipationStatus:iCalPersonPartStatAccepted];
   else
     [p setParticipationStatus:iCalPersonPartStatDeclined];
 }
 
 @end /* UIxAppointmentEditor */
-
-
-/* HACK ALERT
-   This is a pretty ugly (unfortunately necessary) hack to map our limited
-   set of recurrence rules back to the popup list
-*/
-@interface iCalRecurrenceRule (UsedPrivates)
-- (NSString *)freq;
-- (NSString *)byDayList;
-@end /* iCalRecurrenceRule (UsedPrivates) */
-
-@implementation iCalRecurrenceRule (SOGoExtensions)
-
-- (NSString *)cycleRepresentationForSOGo {
-  NSMutableString *s;
-  
-  s = [NSMutableString stringWithCapacity:20];
-  [s appendString:@"FREQ="];
-  [s appendString:[self freq]];
-  if ([self repeatInterval] != 1) {
-    [s appendFormat:@";INTERVAL=%d", [self repeatInterval]];
-  }
-  if (self->byDay.mask != 0) {
-    [s appendString:@";BYDAY="];
-    [s appendString:[self byDayList]];
-  }
-  return s;
-}
-
-@end /* iCalRecurrenceRule (SOGoExtensions) */
index 3a0c1d4f84daad5670ff81672b4d1fcc2967b3e0..7e185334e149c25ac28ba3fb5945aaa1e21f468f 100644 (file)
@@ -1,6 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=136
+SUBMINOR_VERSION:=137
 
 # v0.9.136 requires SOGoUI       v0.9.30
 # v0.9.123 requires Appointments v0.9.35
diff --git a/SOGo/UI/Scheduler/iCalRecurrenceRule+SOGo.m b/SOGo/UI/Scheduler/iCalRecurrenceRule+SOGo.m
new file mode 100644 (file)
index 0000000..6d42ca8
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+  Copyright (C) 2004-2005 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.
+*/
+
+#include <NGiCal/NGiCal.h>
+#include "common.h"
+
+/* HACK ALERT
+   This is a pretty ugly (unfortunately necessary) hack to map our limited
+   set of recurrence rules back to the popup list
+*/
+@interface iCalRecurrenceRule (UsedPrivates)
+- (NSString *)freq;
+- (NSString *)byDayList;
+@end /* iCalRecurrenceRule (UsedPrivates) */
+
+@implementation iCalRecurrenceRule (SOGoExtensions)
+
+- (NSString *)cycleRepresentationForSOGo {
+  NSMutableString *s;
+  
+  s = [NSMutableString stringWithCapacity:20];
+  [s appendString:@"FREQ="];
+  [s appendString:[self freq]];
+  if ([self repeatInterval] != 1) {
+    [s appendFormat:@";INTERVAL=%d", [self repeatInterval]];
+  }
+  if (self->byDay.mask != 0) {
+    [s appendString:@";BYDAY="];
+    [s appendString:[self byDayList]];
+  }
+  return s;
+}
+
+@end /* iCalRecurrenceRule (SOGoExtensions) */