[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remaining psppsheet TODO [PATCH]
From: |
John Darrington |
Subject: |
Re: remaining psppsheet TODO [PATCH] |
Date: |
Mon, 8 Oct 2012 18:44:08 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Oct 08, 2012 at 11:26:21AM -0700, Ben Pfaff wrote:
John Darrington <address@hidden> writes:
> On Sun, Sep 02, 2012 at 09:22:55AM -0700, Ben Pfaff wrote:
> Here's what remains.
>
> Variable sheet
> --------------
>
> Double-clicking on variable names still processes a click after
> switching sheets.
>
>
> I think this patch fixes that problem. I haven't thoroughly tested it
> to see if it causes any other ill effects.
It works! But I don't understand why it works. Can you explain?
From
http://developer.gnome.org/gdk/2.24/gdk-Event-Structures.html#GdkEventButton
Double and triple-clicks result in a sequence of events being received. For
double-clicks the order of events will be:
1. GDK_BUTTON_PRESS
2. GDK_BUTTON_RELEASE
3. GDK_BUTTON_PRESS
4. GDK_2BUTTON_PRESS
5. GDK_BUTTON_RELEASE
So what was happening was this: When the var-name was double-clicked, the view
switched
from VarView to DataView as soon as event 4 (GDK_2BUTTON_PRESS) occured. Then
event 5
(GDK_BUTTON_RELEASE) occured.
Now the PsppSheetView object is written such that, it decides to edit a cell,
on button
release event. Hence, whichever cell the pointer happended to be in, when the
user lifts
his finger after double clicking, starts to be edited.
This change ignores button release events on the object unless a corresponding
button press
event was seen.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature