This message bounced as a non member submission.  If anyone has multiple
email addresses they like to post from, send a message to
[EMAIL PROTECTED] with "subscribe [EMAIL PROTECTED]" in the
body.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


---------- Forwarded message ----------
Date: Wed, 16 Feb 2000 04:04:57 +0800 (WST)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: BOUNCE [EMAIL PROTECTED]:    Non-member submission from [Paul Clifford 
<[EMAIL PROTECTED]>]   

>From [EMAIL PROTECTED]  Wed Feb 16 04:04:49 2000
Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net 
[194.217.242.89])
        by quoll.daa.com.au (8.9.2/8.9.2) with ESMTP id EAA28490
        for <[EMAIL PROTECTED]>; Wed, 16 Feb 2000 04:04:25 +0800 (WST)
Received: from plasma.demon.co.uk ([158.152.109.168])
        by anchor-post-31.mail.demon.net with smtp (Exim 2.12 #1)
        id 12Kntr-0007pO-0V
        for [EMAIL PROTECTED]; Tue, 15 Feb 2000 19:44:44 +0000
Received: (qmail 27866 invoked from network); 15 Feb 2000 19:38:55 -0000
Received: from jenny.local (HELO plasma.demon.co.uk) ([EMAIL PROTECTED])
  by drusilla.local with SMTP; 15 Feb 2000 19:38:55 -0000
Sender: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Date: Tue, 15 Feb 2000 19:40:13 +0000
From: Paul Clifford <[EMAIL PROTECTED]>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.14 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: [EMAIL PROTECTED]
Subject: Re: [pygtk] GtkCList/CTree get_selection_info
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Martin Preishuber wrote:

> I've made a simple example which shows the unwanted behaviour mentioned
> earlier ... could someone test it and post his/her results ? For me
> when dragging something to the list it returns (0,0) for the label,
> (1,0) for "First" and None for "Last"

The problem appears to be that get_selection_info expects coordinates
relative to the top left of the window holding the rows, while the
coordinates passed to your dragreceivelist method are relative to the
top left of the widget.  In your example this causes the row results to
be one greater than expected, and the last row to be ignored
completely.  (Actually, since the title is slightly taller than a normal
row you get different results depending on whether you end the drag at
the top or bottom of a row.)  If you put the GtkCList object inside a
scrolled window and add a large number of rows this mismatch is even
more pronounced - anything occupying the topmost (row height + cell
spacing) pixels will always be reported as row 0, regardless of how far
down you scroll.

The solution is either to translate the coordinates into the the
required format or to obtain the pointer position by some other suitable
method once dragreceivelist is called.  A brief look through the GTK
reference pages didn't yield any obvious clues as to how to do either,
so perhaps someone else can help here?

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to