Debouncing widgets



Hi,

Some time ago I mailed about providing gtk_button_set_ignore_double_click():

http://mail.gnome.org/archives/gtk-devel-list/2004-September/msg00050.html

... and later filed this:

http://bugzilla.gnome.org/show_bug.cgi?id=159101


Alex Graveley has given some thought to this issue in general for the whole desktop:

http://live.gnome.org/ThreePointZero

(look near the bottom; grep for "Debouncing")

The problem is that people double-click in places where this leads to
confusing behavior:  launcher buttons launch two instances of the same
program, and menus selected from the menu bar disappear.

What if we had a widget flag GTK_IGNORE_MULTIPLE_CLICKS.  When it is
turned on, pressing a mouse button would cause the widget to save the
button/position/time and to install a timer with duration equal to the
display's double-click time.  If the widget gets another suitable button
press before the timer expires, then that press/release is ignored.
Same thing for triple clicks.

Does this make sense?  Then it would be trivial for GtkButton and
GtkMenuBar's children to turn on this flag and do the right thing for
users.

  Federico




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