Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-08-22 06:55:30 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-08-25 15:49:46 (GMT)
commit5ac64417e6df9bb130a0e068d3fe9eb658902123 (patch)
tree43ea52f81787dea328522ccd2414b63cb87cfb38 /src
parent2e8ed1c8e5819ea00dac3f0484b5f923529dba4b (diff)
Take into account last line while filling cells in SmoothTable
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/browse/smoothtable.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/journal/browse/smoothtable.py b/src/jarabe/journal/browse/smoothtable.py
index 8b3ca4e..437eb47 100644
--- a/src/jarabe/journal/browse/smoothtable.py
+++ b/src/jarabe/journal/browse/smoothtable.py
@@ -68,8 +68,9 @@ class SmoothTable(gtk.Container):
if self._adj is None or self._cell_height == 0:
return (0, 0)
top = int(self._adj.value / self._cell_height)
- bottom = int(math.ceil(self._adj.value + self._adj.page_size))
- return (top * self.columns, bottom / self._cell_height * self.columns)
+ bottom = int(math.ceil(self._adj.value + self._adj.page_size) / \
+ self._cell_height)
+ return (top * self.columns, bottom * self.columns + (self.columns - 1))
frame = property(get_frame)