[jhbuild: 58/60] [gui] fix usage of TextBuffer.delete() API



commit 076a9a70ba395df62b4f2a9496440f9c21e8d09d
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat Jun 6 12:38:15 2009 +0200

    [gui] fix usage of TextBuffer.delete() API
---
 jhbuild/frontends/gtkui.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/jhbuild/frontends/gtkui.py b/jhbuild/frontends/gtkui.py
index a2494c0..1bc507c 100644
--- a/jhbuild/frontends/gtkui.py
+++ b/jhbuild/frontends/gtkui.py
@@ -512,8 +512,9 @@ class AppWindow(gtk.Window, buildscript.BuildScript):
                             textbuffer.get_end_iter(), chunk, 'stderr')
 
                 if textbuffer.get_line_count() > 200:
-                    textbuffer.delete(0,
-                            textbuffer.get_iter_at_line_offset(200, 0).get_offset())
+                    textbuffer.delete(textbuffer.get_start_iter(),
+                            textbuffer.get_iter_at_line_offset(
+                                textbuffer.get_line_count()-200, 0))
 
                 mark = textbuffer.get_mark('end')
                 if mark:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]