[Commits] (jeffrey) - Changed exportProcess to ignore items it's
asked to export that aren't CalendarEvents or EventTasks
commits at osafoundation.org
commits at osafoundation.org
Wed Feb 9 12:36:55 PST 2005
Commit by: jeffrey
Modified files:
chandler/parcels/osaf/framework/sharing/ICalendar.py 1.11 1.12
Log message:
- Changed exportProcess to ignore items it's asked to export that aren't CalendarEvents or EventTasks
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/ICalendar.py.diff?r1=text&tr1=1.11&r2=text&tr2=1.12
Index: chandler/parcels/osaf/framework/sharing/ICalendar.py
diff -u chandler/parcels/osaf/framework/sharing/ICalendar.py:1.11 chandler/parcels/osaf/framework/sharing/ICalendar.py:1.12
--- chandler/parcels/osaf/framework/sharing/ICalendar.py:1.11 Tue Feb 8 13:55:54 2005
+++ chandler/parcels/osaf/framework/sharing/ICalendar.py Wed Feb 9 12:36:53 2005
@@ -59,17 +59,20 @@
about timezones.
"""
- taskKind = view.findPath("//parcels/osaf/contentmodel/EventTask")
+ taskKind = view.findPath(ICalendarFormat._taskPath)
+ eventKind = view.findPath(ICalendarFormat._calendarEventPath)
if cal is None:
cal = vobject.iCalendar()
for item in items:
if item.isItemOf(taskKind):
taskorevent='TASK'
comp = cal.add('vtodo')
- else:
+ elif item.isItemOf(eventKind):
taskorevent='EVENT'
comp = cal.add('vevent')
-
+ else:
+ continue
+
if item.getAttributeValue('uid', default=None) is None:
item.uid = unicode(item.itsUUID)
comp.add('uid').value = item.uid
@@ -104,9 +107,9 @@
myKindID = None
myKindPath = "//parcels/osaf/framework/sharing/ICalendarFormat"
- __calendarEventPath = "//parcels/osaf/contentmodel/calendar/CalendarEvent"
- __taskPath = "//parcels/osaf/contentmodel/EventTask"
- __lobPath = "//Schema/Core/Lob"
+ _calendarEventPath = "//parcels/osaf/contentmodel/calendar/CalendarEvent"
+ _taskPath = "//parcels/osaf/contentmodel/EventTask"
+ _lobPath = "//Schema/Core/Lob"
def fileStyle(self):
return self.STYLE_SINGLE
@@ -118,7 +121,7 @@
view = self.itsView
queryString='union(for i in "%s" where i.uid == $0, \
for i in "%s" where i.uid == $0)' % \
- (self.__calendarEventPath, self.__taskPath)
+ (self._calendarEventPath, self._taskPath)
p = view.findPath('//Queries')
k = view.findPath('//Schema/Core/Query')
q = Query.Query(None, p, k, queryString)
@@ -139,9 +142,9 @@
view = self.itsView
newItemParent = self.findPath("//userdata")
- eventKind = self.itsView.findPath(self.__calendarEventPath)
- taskKind = self.itsView.findPath(self.__taskPath)
- textKind = self.itsView.findPath(self.__lobPath)
+ eventKind = self.itsView.findPath(self._calendarEventPath)
+ taskKind = self.itsView.findPath(self._taskPath)
+ textKind = self.itsView.findPath(self._lobPath)
if item is None:
item = ItemCollection.ItemCollection(view=view)
More information about the Commits
mailing list