Bug#220547: marked as done (textview.get_iter_location() always
returns incorrect rect.y)
Debian Bug Tracking System
owner@bugs.debian.org
Mon, 18 Oct 2004 07:33:08 -0700
Your message dated Mon, 18 Oct 2004 16:20:57 +0200
with message-id <20041018142057.GA3868@via.ecp.fr>
and subject line textview.get_iter_location() always returns incorrect rect.y
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 13 Nov 2003 07:45:20 +0000
>From xanni@kira.glasswings.com.au Thu Nov 13 01:45:19 2003
Return-path: <xanni@kira.glasswings.com.au>
Received: from mail014.syd.optusnet.com.au [211.29.132.160]
by master.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1AKCAI-0007tI-00; Thu, 13 Nov 2003 01:45:18 -0600
Received: from kira.glasswings.com.au (c211-28-119-243.eburwd3.vic.optusnet.com.au [211.28.119.243])
by mail014.syd.optusnet.com.au (8.11.6p2/8.11.6) with ESMTP id hAD7jGx13141
for <submit@bugs.debian.org>; Thu, 13 Nov 2003 18:45:16 +1100
Received: (from xanni@localhost)
by kira.glasswings.com.au (8.9.3/8.9.3) id SAA24032
for submit@bugs.debian.org; Thu, 13 Nov 2003 18:53:46 +1100
Date: Thu, 13 Nov 2003 18:53:46 +1100
From: Andrew Pam <xanni@glasswings.com.au>
To: submit@bugs.debian.org
Subject: textview.get_iter_location() always returns incorrect rect.y
Message-ID: <20031113075346.GA23989@kira.glasswings.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-2.5 required=4.0
tests=BAYES_99,HAS_PACKAGE
version=2.53-bugs.debian.org_2003_11_9
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_9 (1.174.2.15-2003-03-30-exp)
Package: python2.3-gtk2
Version: 2.0.0-2
textview.get_iter_location() always returns rect.y == rect.height rather
than the correct value, as demonstrated by this test program:
----- cut here -----
#!/usr/bin/env python
# Test GTK2 get_iter_location()
# written 2003/11/13 by Andrew Pam <andrew@sericyb.com.au>
# demonstrates that textview.get_iter_location() always
# returns rect.y == rect.height rather than the correct value
import pygtk
pygtk.require('2.0')
import gtk
from gtk import TRUE, FALSE
# Define global variables
rect = None
def quit(button = None):
print "x = %d, y = %d" % (rect.x, rect.y)
print "w = %d, h = %d" % (rect.width, rect.height)
gtk.main_quit()
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
textbuffer = gtk.TextBuffer()
textview = gtk.TextView(buffer = textbuffer)
box = gtk.VBox(homogeneous = FALSE, spacing = 0)
box.add(textview)
button = gtk.Button("Quit")
button.connect("clicked", quit)
box.add(button)
window.add(box)
window.show_all()
textbuffer.set_text(
"""* The total area of the M-DB is about 1,000,000 square Km
or approximately one-seventh (14%) of Australia
* The M-DB is 1450Km long and 1000Km wide
* The M-DB consists largely of plains, but rises to the
Great Dividing Range on its eastern and southern rim
* One of the world's major river systems
""")
iter = textbuffer.get_end_iter()
# Move the cursor to the letter "s" in the last word "systems"
result = iter.backward_word_start()
rect = textview.get_iter_location(iter)
gtk.main()
----- cut here -----
I am using Debian GNU/Linux testing, kernel 2.4.22 and libc6 2.3.2-9.
Python is version 2.3.2-2 and libgtk2.0-0 is version 2.2.4-1.
Regards,
Andrew Pam
--
mailto:xanni@xanadu.net Andrew Pam
http://www.xanadu.com.au/ Chief Scientist, Xanadu
http://www.glasswings.com.au/ Technology Manager, Glass Wings
http://www.sericyb.com.au/ Manager, Serious Cybernetics
---------------------------------------
Received: (at 220547-done) by bugs.debian.org; 18 Oct 2004 14:21:01 +0000
>From lool@bee.dooz.org Mon Oct 18 07:21:01 2004
Return-path: <lool@bee.dooz.org>
Received: from postfix3-1.free.fr [213.228.0.44]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CJYNh-0000T5-00; Mon, 18 Oct 2004 07:21:01 -0700
Received: from bee.dooz.org (levallois.dooz.org [81.57.180.178])
by postfix3-1.free.fr (Postfix) with ESMTP id DAE7B173535;
Mon, 18 Oct 2004 16:20:59 +0200 (CEST)
Received: by bee.dooz.org (Postfix, from userid 1000)
id 5C5636AC74D1; Mon, 18 Oct 2004 16:20:57 +0200 (CEST)
Date: Mon, 18 Oct 2004 16:20:57 +0200
From: =?iso-8859-1?Q?Lo=EFc?= Minier <lool@dooz.org>
To: Andrew Pam <xanni@glasswings.com.au>,
220547-done@bugs.debian.org, 221596-done@bugs.debian.org
Subject: Re: textview.get_iter_location() always returns incorrect rect.y
Message-ID: <20041018142057.GA3868@via.ecp.fr>
References: <20031113075346.GA23989@kira.glasswings.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <20031113075346.GA23989@kira.glasswings.com.au>
Content-Transfer-Encoding: quoted-printable
Delivered-To: 220547-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
Hi,
Andrew Pam <xanni@glasswings.com.au> - Thu, Nov 13, 2003:
> textview.get_iter_location() always returns rect.y =3D=3D rect.height r=
ather
> than the correct value, as demonstrated by this test program:
Upstream considered this is not a bug, here's the response:
------- Additional Comment #2 From Matthias Clasen 2003-12-27 17:35
-------
This is probably the result of working on an unrealized text view,
though I can't explain exactly where the y =3D=3D 17 originates. Moving
the get_iter_location() call into the callback makes your testcase=20
report=20
x =3D 202, y =3D 136
w =3D 7, h =3D 17
I'm closing the two Debian bugs. Feel free to resubmit or better
reopen if you consider this is insufficient.
Regards,
--=20
Lo=EFc Minier <lool@dooz.org>