summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2011-04-07 14:26:37 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2011-04-07 14:26:37 -0400
commita8539a688bf83e1ab79167e257df308d1424a103 (patch)
treea035e291b88309ae3aff082bb5685b4a8473116b
parentf200bfbe8332c0df74335f608f68350609e435d7 (diff)
downloadnautilus-a8539a688bf83e1ab79167e257df308d1424a103.tar.gz
icon-container: reset the double click counter after a double click
If we don't do this, we ignore any other double click event that happen during the next 'gtk-double-click-time' interval after the first double click. Thanks to Tanyel A. Nimeu for the initial patch. https://bugzilla.gnome.org/show_bug.cgi?id=647062
-rw-r--r--libnautilus-private/nautilus-icon-container.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 92fc51fc9..95dd52034 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4391,7 +4391,12 @@ clicked_within_double_click_interval (NautilusIconContainer *container)
last_click_time = current_time;
/* Only allow double click */
- return (click_count == 1);
+ if (click_count == 1) {
+ click_count = 0;
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
static void