Arrange so we can now open the parent of a document (e.g. chm file instead of temp copy of html page inside chm), even when the parent is itself embedded in an archive

This commit is contained in:
Jean-Francois Dockes
2012-10-12 16:54:52 +02:00
parent 382ae1f718
commit 5add2e2384
13 changed files with 222 additions and 59 deletions
+12 -1
View File
@@ -60,7 +60,7 @@ class IcalExtractor:
self.em.rclog("Openfile: open: %s" % str(e))
return False
self.currentindex = 0
self.currentindex = -1
if usemodule == 'internal':
self.contents = ICalSimpleSplitter().splitcalendar(calstr)
@@ -96,6 +96,17 @@ class IcalExtractor:
return self.extractone(index)
def getnext(self, params):
if self.currentindex == -1:
# Return "self" doc
self.currentindex = 0
self.em.setmimetype('text/plain')
if len(self.contents) == 0:
eof = rclexecm.RclExecM.eofnext
else:
eof = rclexecm.RclExecM.noteof
return (True, "", "", eof)
if self.currentindex >= len(self.contents):
self.em.rclog("getnext: EOF hit")
return (False, "", "", rclexecm.RclExecM.eofnow)