Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.254
diff -u -p -r1.254 fm-list-view.c
--- src/file-manager/fm-list-view.c	14 Jul 2005 08:22:30 -0000	1.254
+++ src/file-manager/fm-list-view.c	19 Jul 2005 10:56:10 -0000
@@ -416,8 +608,10 @@ motion_notify_callback (GtkWidget *widge
 	GdkCursor *cursor;
 	GList *ref_list;
 	GdkPixbuf *pixbuf;	
+	GtkTreeViewColumn *column;
 	GtkTreePath *last_hover_path;
 	GtkTreeIter iter;
+	int sort_column_id;
 	
 	view = FM_LIST_VIEW (callback_data);
 	
@@ -425,18 +619,26 @@ motion_notify_callback (GtkWidget *widge
 		return FALSE;
 	}
 
+	fm_list_view_update_rubberband (view);
+
 	if (click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE) {
 		last_hover_path = view->details->hover_path;
 
 		gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
 					       event->x, event->y,
 					       &view->details->hover_path,
-					       NULL, NULL, NULL);
+					       &column, NULL, NULL);
 
+		cursor = NULL;
 		if (view->details->hover_path != NULL) {
-			cursor = gdk_cursor_new (GDK_HAND2);
-		} else {
-			cursor = NULL;
+			gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (view->details->model), &sort_column_id, NULL);
+
+			if (gtk_tree_view_column_get_sort_column_id (column) == sort_column_id) {
+				cursor = gdk_cursor_new (GDK_HAND2);
+			} else {
+				gtk_tree_path_free (view->details->hover_path);
+				view->details->hover_path = NULL;
+			}
 		}
 
 		gdk_window_set_cursor (widget->window, cursor);
@@ -544,6 +746,7 @@ button_press_callback (GtkWidget *widget
 {
 	FMListView *view;
 	GtkTreeView *tree_view;
+	GtkTreeViewColumn *column;
 	GtkTreePath *path;
 	gboolean call_parent;
 	gboolean allow_drag;
@@ -554,6 +757,7 @@ button_press_callback (GtkWidget *widget
 	static int click_count = 0;
 	int double_click_time;
 	int expander_size, horizontal_separator;
+	int sort_column_id;
 	gboolean on_expander;
 
 	view = FM_LIST_VIEW (callback_data);
@@ -594,8 +798,10 @@ button_press_callback (GtkWidget *widget
 
 	call_parent = TRUE;
 	allow_drag = FALSE;
+	gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (view->details->model), &sort_column_id, NULL);
 	if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
-					   &path, NULL, NULL, NULL)) {
+					   &path, &column, NULL, NULL) &&
+	    gtk_tree_view_column_get_sort_column_id (column) == sort_column_id) {
 		/* Keep track of path of last click so double clicks only happen
 		 * on the same item */
 		if ((event->button == 1 || event->button == 2)  && 
