--- src/file-manager/fm-list-view.c	2005-06-02 09:16:55.000000000 -0700
+++ src/file-manager/fm-list-view_new.c	2005-06-07 23:08:15.000000000 -0700
@@ -454,10 +454,11 @@
 	gboolean allow_drag;
 	GtkTreeSelection *selection;
 	GtkWidgetClass *tree_view_class;
-	gint64 current_time;
-	static gint64 last_click_time = 0;
+	guint32 current_time;
+	static guint32 last_click_time = 0;
 	static int click_count = 0;
-	int double_click_time;
+	guint32 double_click_time;
+	
 
 	view = FM_LIST_VIEW (callback_data);
 	tree_view = GTK_TREE_VIEW (widget);
@@ -476,18 +477,22 @@
 	g_object_get (G_OBJECT (gtk_widget_get_settings (widget)), 
 		      "gtk-double-click-time", &double_click_time,
 		      NULL);
-
+	
+	/* Convert to milliseconds */
+	double_click_time = double_click_time * 1000;
+	
+	current_time = eel_get_system_time();
 	/* Determine click count */
-	current_time = eel_get_system_time ();
-	if (current_time - last_click_time < double_click_time * 1000) {
-		click_count++;
-	} else {
-		click_count = 0;
+	if (event->type == GDK_BUTTON_PRESS) {
+		if (current_time - last_click_time < double_click_time) {
+			click_count++;
+		} else {
+			click_count = 1;
+		}
+		/* Stash time for next compare */
+		last_click_time = current_time;
 	}
 
-	/* Stash time for next compare */
-	last_click_time = current_time;
-
 	/* Ignore double click if we are in single click mode */
 	if (click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE && click_count >= 2) {
 		return TRUE;
@@ -544,12 +549,15 @@
 			} 
 			
 			if ((event->button == 1 || event->button == 2) &&
-			    ((event->state & GDK_CONTROL_MASK) != 0 ||
-			     (event->state & GDK_SHIFT_MASK) == 0)) {
+			    ((event->state & GDK_CONTROL_MASK) ||
+			     !(event->state & GDK_SHIFT_MASK))) {
 				view->details->row_selected_on_button_down = gtk_tree_selection_path_is_selected (selection, path);
 				if (view->details->row_selected_on_button_down) {
 					call_parent = FALSE;
-				} else if  ((event->state & GDK_CONTROL_MASK) != 0) {
+					if (event->state & GDK_CONTROL_MASK) {
+						gtk_tree_selection_unselect_path (selection, path);
+					}
+				} else if (event->state & GDK_CONTROL_MASK) {
 					call_parent = FALSE;
 					gtk_tree_selection_select_path (selection, path);
 				}
