[nautilus/gnome-3-4] list-view: don't treat clicks as on an empty area if the row is selected
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-4] list-view: don't treat clicks as on an empty area if the row is selected
- Date: Wed, 18 Apr 2012 21:29:28 +0000 (UTC)
commit 8118406d63b317c18cf52313a55c0f4b17093af3
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Apr 18 17:26:26 2012 -0400
list-view: don't treat clicks as on an empty area if the row is selected
When the row is selected, and we right click on it, make sure we popup
its context menu and not its parent's, since the selection is a stronger
indication of intent.
https://bugzilla.gnome.org/show_bug.cgi?id=674245
src/nautilus-list-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 95faa2e..bdf5eaf 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -744,7 +744,9 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
* click to apply to everything that's currently selected. */
if (event->button == 3) {
- blank_click = gtk_tree_view_is_blank_at_pos (tree_view, event->x, event->y, NULL, NULL, NULL, NULL);
+ blank_click =
+ (!gtk_tree_selection_path_is_selected (selection, path) &&
+ gtk_tree_view_is_blank_at_pos (tree_view, event->x, event->y, NULL, NULL, NULL, NULL));
}
if (event->button == 3 &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]