Re: CTree + GdkEvent



From: "Jerome COUDERC" <couderj agf fr>
Hi,

I'm using a Ctree widget ant want to do an action1 when selecting 
a row, and do an action2 when double clicking over this same row.

When double-clicking, it sends the GDK_2BUTTON_PRESS event but also
generates before the GDK_BUTTON_PRESS event ...

How can I associate functions to signals to do only "action2" when
double-clicking, and not "action1" + "action2"?

    Hey hey. Computers are clever boys. you click once and they
    say, oh, damn, he clicked only once. When you double-click, 
    they say 'oh, damn, he clicked twice, so I will not say he
    clicked once'. Check out the FAQ, question 5.7. There is a
    quote from Owen at the end of the answer.

    More seriously, when you click on an item, it may not be a 
    good idea for the toolkit to wait another click before saying 
    you click twice instead of once. Imagine the maximum delay is 1 
    or 2 sec on some desktops (for different reasons. You're drunk 
    or you have simply some disabilities). Then simple click events 
    cannot be fired at the end of the timeout for evident reasons.

    It's much simpler to fire both click and double-click.

    I suggest you use only simple click with or without
    keyboard modifier.

    Yours,

    Emmanuel


Thanks in advance,
Jerome







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