nautilus r14363 - in trunk: . libnautilus-private



Author: cneumair
Date: Tue Jul 15 18:13:17 2008
New Revision: 14363
URL: http://svn.gnome.org/viewvc/nautilus?rev=14363&view=rev

Log:
2008-07-15  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-icon-container.c
	(button_press_event), (nautilus_icon_container_did_not_drag),
	(handle_icon_double_click), (handle_icon_button_press):
	Only use double click for left mouse button. The middle mouse button
	opens a new tab or window on one click. Fixes #543136.


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	Tue Jul 15 18:13:17 2008
@@ -3687,7 +3687,7 @@
 		return TRUE;
 	}
 
-	if ((event->button == DRAG_BUTTON || event->button == MIDDLE_BUTTON) &&
+	if (event->button == DRAG_BUTTON &&
 	    event->type == GDK_BUTTON_PRESS) {
 		/* Clear the last click icon for double click */
 		container->details->double_click_icon[1] = container->details->double_click_icon[0];
@@ -3775,7 +3775,8 @@
 	} 
 	
 	if (details->drag_icon != NULL &&
-	    details->single_click_mode) {		
+	    (details->single_click_mode ||
+	     event->button == MIDDLE_BUTTON)) {
 		/* Determine click count */
 		g_object_get (G_OBJECT (gtk_widget_get_settings (GTK_WIDGET (container))), 
 			      "gtk-double-click-time", &double_click_time,
@@ -5560,6 +5561,10 @@
 {
 	NautilusIconContainerDetails *details;
 
+	if (event->button != DRAG_BUTTON) {
+		return FALSE;
+	}
+
 	details = container->details;
 
 	if (!details->single_click_mode &&
@@ -5567,15 +5572,9 @@
 	    details->double_click_icon[0] == details->double_click_icon[1] &&
 	    details->double_click_button[0] == details->double_click_button[1]) {
 		if (!button_event_modifies_selection (event)) {
-			if (event->button == MIDDLE_BUTTON) {
-				activate_selected_items_alternate (container, NULL);
-				return TRUE;
-			} else if (event->button == DRAG_BUTTON) {
-				activate_selected_items (container);
-				return TRUE;
-			}
-		} else if (event->button == DRAG_BUTTON &&
-	    		   (event->state & GDK_CONTROL_MASK) == 0 &&
+			activate_selected_items (container);
+			return TRUE;
+		} else if ((event->state & GDK_CONTROL_MASK) == 0 &&
 			   (event->state & GDK_SHIFT_MASK) != 0) {
 			activate_selected_items_alternate (container, icon);
 			return TRUE;
@@ -5615,7 +5614,7 @@
 		return TRUE;
 	}
 
-	if ((event->button == DRAG_BUTTON || event->button == MIDDLE_BUTTON) &&
+	if ((event->button == DRAG_BUTTON) &&
 	    event->type == GDK_BUTTON_PRESS) {
 		/* The next double click has to be on this icon */
 		details->double_click_icon[1] = details->double_click_icon[0];



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