[meld] Inline _line_to_pixel_plus_height single usage
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Inline _line_to_pixel_plus_height single usage
- Date: Tue, 24 Aug 2010 09:51:22 +0000 (UTC)
commit 64d2a9a39a8a9873f2d6a4e434ac76ed7847066e
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Aug 9 17:08:01 2010 +1000
Inline _line_to_pixel_plus_height single usage
meld/filediff.py | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 60571ab..5cb96b4 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -962,11 +962,12 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
context.stroke()
if textview.is_focus() and self.cursor.line is not None:
- ypos, height = self._line_to_pixel_plus_height(pane, self.cursor.line)
- context.set_source_rgba(1,1,0,.25)
- context.rectangle(0,ypos-visible.y, width, height)
+ it = self.textbuffer[pane].get_iter_at_line(self.cursor.line)
+ ypos, line_height = self.textview[pane].get_line_yrange(it)
+ context.set_source_rgba(1, 1, 0, .25)
+ context.rectangle(0, ypos - visible.y, width, line_height)
context.fill()
-
+
def _get_filename_for_saving(self, title ):
dialog = gtk.FileChooserDialog(title,
parent=self.widget.get_toplevel(),
@@ -1236,10 +1237,6 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
return y + h - 1
return y
- def _line_to_pixel_plus_height(self, pane, line ):
- it = self.textbuffer[pane].get_iter_at_line(line)
- return self.textview[pane].get_line_yrange( it )
-
def _pixel_to_line(self, pane, pixel ):
return self.textview[pane].get_line_at_y( pixel )[0].get_line()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]