nautilus r14092 - in trunk: . libnautilus-private



Author: cneumair
Date: Sat Apr 26 22:34:37 2008
New Revision: 14092
URL: http://svn.gnome.org/viewvc/nautilus?rev=14092&view=rev

Log:
2008-04-27  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-icon-container.c
	(emit_atk_focus_tracker_notify), (set_keyboard_focus),
	(select_range), (select_one_unselect_others), (rubberband_select),
	(keyboard_move_to):
	Properly handle selection changes when using keyboard navigation. We
	did not emit a "selection-change" signal when keyboard rubberbanding
	was used, and all except one icon were deselected. Fixes #509432.
	Thanks to PaweÅ Paprota.


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-icon-container.c

Modified: trunk/libnautilus-private/nautilus-icon-container.c
==============================================================================
--- trunk/libnautilus-private/nautilus-icon-container.c	(original)
+++ trunk/libnautilus-private/nautilus-icon-container.c	Sat Apr 26 22:34:37 2008
@@ -733,6 +733,13 @@
 	container->details->keyboard_focus = NULL;
 }
 
+static void inline
+emit_atk_focus_tracker_notify (NautilusIcon *icon)
+{
+	AtkObject *atk_object = eel_accessibility_for_object (icon->item);
+	atk_focus_tracker_notify (atk_object);
+}
+
 /* Set @icon as the icon currently selected for keyboard operations. */
 static void
 set_keyboard_focus (NautilusIconContainer *container,
@@ -751,6 +758,8 @@
 	eel_canvas_item_set (EEL_CANVAS_ITEM (container->details->keyboard_focus->item),
 			       "highlighted_as_keyboard_focus", 1,
 			       NULL);
+
+	emit_atk_focus_tracker_notify (icon);
 }
 
 static void
@@ -2085,8 +2094,7 @@
 	}
 	
 	if (selection_changed && icon2 != NULL) {
-		AtkObject *atk_object = eel_accessibility_for_object (icon2->item);
-		atk_focus_tracker_notify (atk_object);
+		emit_atk_focus_tracker_notify (icon2);
 	}
 	return selection_changed;
 }
@@ -2110,8 +2118,7 @@
 	}
 	
 	if (selection_changed && icon_to_select != NULL) {
-		AtkObject *atk_object = eel_accessibility_for_object (icon_to_select->item);
-		atk_focus_tracker_notify (atk_object);
+		emit_atk_focus_tracker_notify (icon_to_select);
 		reveal_icon (container, icon_to_select);
 	}
 	return selection_changed;
@@ -2225,9 +2232,7 @@
 		}
 		
 		is_in = nautilus_icon_canvas_item_hit_test_rectangle (icon->item, canvas_rect);
-		
-		g_assert (icon->was_selected_before_rubberband == FALSE
-			  || icon->was_selected_before_rubberband == TRUE);
+
 		selection_changed |= icon_set_selected
 			(container, icon,
 			 is_in ^ icon->was_selected_before_rubberband);
@@ -2977,10 +2982,9 @@
 			set_keyboard_rubberband_start (container, from);
 		} 
 
-		select_one_unselect_others (container, icon);
 		set_keyboard_focus (container, icon);
 
-		if (icon && container->details->keyboard_rubberband_start && container->details->keyboard_rubberband_start != icon) {
+		if (icon && container->details->keyboard_rubberband_start) {
 			rect = get_rubberband (container->details->keyboard_rubberband_start,
 					       icon);
 			rubberband_select (container, NULL, &rect);



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