[nautilus] icon-container: reset the double click counter after a double click



commit a8539a688bf83e1ab79167e257df308d1424a103
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Apr 7 14:26:37 2011 -0400

    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

 libnautilus-private/nautilus-icon-container.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 92fc51f..95dd520 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



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