context menu fix



Hi,

I've fixed the issue with the selection context menu changing after it
has been popped up.  Ok to commit?

Thanks,
James
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5683
diff -u -r1.5683 ChangeLog
--- ChangeLog	29 Jan 2003 10:20:47 -0000	1.5683
+++ ChangeLog	1 Feb 2003 01:41:59 -0000
@@ -1,3 +1,10 @@
+2003-01-31  James Willcox  <jwillcox gnome org>
+
+	* libnautilus-private/nautilus-icon-container.c:
+	(handle_icon_button_press):
+
+	Update the selection *before* we tell people to popup a context menu.
+
 2003-01-29  Alexander Larsson  <alexl redhat com>
 
 	* libnautilus-private/nautilus-directory-async.c (file_info_start):
Index: libnautilus-private/nautilus-icon-container.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-container.c,v
retrieving revision 1.316
diff -u -r1.316 nautilus-icon-container.c
--- libnautilus-private/nautilus-icon-container.c	20 Jan 2003 14:22:53 -0000	1.316
+++ libnautilus-private/nautilus-icon-container.c	1 Feb 2003 01:42:00 -0000
@@ -3674,11 +3674,6 @@
 			}
 		}
 	}
-	else if (event->button == CONTEXTUAL_MENU_BUTTON) {
-		g_signal_emit (container,
-			       signals[CONTEXT_CLICK_SELECTION], 0,
-			       event);
-	}
 
 	/* Modify the selection as appropriate. Selection is modified
 	 * the same way for contextual menu as it would be without. 
@@ -3692,6 +3687,12 @@
 		icon_set_selected (container, icon, TRUE);
 		g_signal_emit (container,
 			       signals[SELECTION_CHANGED], 0);
+	}
+
+	if (event->button == CONTEXTUAL_MENU_BUTTON) {
+		g_signal_emit (container,
+			       signals[CONTEXT_CLICK_SELECTION], 0,
+			       event);
 	}
 
 	if (event->type == GDK_2BUTTON_PRESS && event->button == DRAG_BUTTON) {


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