[meld] Minor refactor of linkmap visibility code
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Minor refactor of linkmap visibility code
- Date: Fri, 25 Jun 2010 07:52:14 +0000 (UTC)
commit b973aa8127b550101e5d9649f816f6e7069facf8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Mar 22 09:22:09 2010 +1000
Minor refactor of linkmap visibility code
meld/filediff.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 7b19aa7..f8a5816 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1296,13 +1296,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
context.set_line_width(1.0)
which = self.linkmap.index(widget)
- pix_start = [None] * self.num_panes
- pix_start[which ] = self.textview[which ].get_visible_rect().y
- pix_start[which+1] = self.textview[which+1].get_visible_rect().y
-
- rel_offset = [None] * self.num_panes
- rel_offset[which] = self.textview[which].allocation.y - yoffset
- rel_offset[which + 1] = self.textview[which + 1].allocation.y - yoffset
+ pix_start = [t.get_visible_rect().y for t in self.textview]
+ rel_offset = [t.allocation.y - yoffset for t in self.textview]
def bounds(idx):
return [self._pixel_to_line(idx, pix_start[idx]), self._pixel_to_line(idx, pix_start[idx]+htotal)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]