summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nautilus-list-view.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index c69f14394..30308aded 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -678,17 +678,26 @@ button_press_callback (GtkWidget *widget,
}
else
{
- /* We're going to filter out some situations where
- * we can't let the default code run because all
- * but one row would be would be deselected. We don't
- * want that; we want the right click menu or single
- * click to apply to everything that's currently selected.
- */
- if (event->button == GDK_BUTTON_SECONDARY && path_selected)
+ if (event->button == GDK_BUTTON_SECONDARY)
{
- call_parent = FALSE;
+ if (path_selected)
+ {
+ /* We're going to filter out some situations where
+ * we can't let the default code run because all
+ * but one row would be would be deselected. We don't
+ * want that; we want the right click menu or single
+ * click to apply to everything that's currently selected.
+ */
+ call_parent = FALSE;
+ }
+ else if (on_expander)
+ {
+ /* If the right click happened on an expander, we should
+ * fully change the selection on that row solely.
+ */
+ gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
+ }
}
-
if ((event->button == GDK_BUTTON_PRIMARY || event->button == GDK_BUTTON_MIDDLE) &&
((event->state & GDK_CONTROL_MASK) != 0 || (event->state & GDK_SHIFT_MASK) == 0))
{