# HG changeset patch # User casties # Date 1181837241 -7200 # Node ID f3d2f240692ca0238213c9ec82941404ea6d20d6 # Parent 346e947709013bd0990fa0ac40600db564d51a9f fixed bug in calculation of group numbers diff -r 346e94770901 -r f3d2f240692c documentViewer.py --- a/documentViewer.py Fri Jun 08 20:12:29 2007 +0200 +++ b/documentViewer.py Thu Jun 14 18:07:21 2007 +0200 @@ -18,6 +18,7 @@ import cgi import urllib import logging +import math import urlparse @@ -440,7 +441,7 @@ dom=self.getPresentationInfoXML(url) docinfo['author']=getTextFromNode(dom.xpath("//author")[0]) docinfo['title']=getTextFromNode(dom.xpath("//title")[0]) - docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) + #docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) return docinfo def getDocinfoFromImagePath(self,path,docinfo=None): @@ -495,7 +496,8 @@ pageinfo['cols'] = cols grpsize = cols * rows pageinfo['groupsize'] = grpsize - start = getInt(start, default=(int(current / grpsize) * grpsize +1)) + start = getInt(start, default=(math.ceil(float(current)/float(grpsize))*grpsize-(grpsize-1))) + # int(current / grpsize) * grpsize +1)) pageinfo['start'] = start pageinfo['end'] = start + grpsize if docinfo is not None: diff -r 346e94770901 -r f3d2f240692c version.txt --- a/version.txt Fri Jun 08 20:12:29 2007 +0200 +++ b/version.txt Thu Jun 14 18:07:21 2007 +0200 @@ -1,1 +1,1 @@ -DocumentViewer 0.2.8 \ No newline at end of file +DocumentViewer 0.2.9 \ No newline at end of file