[nautilus] 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] list-view: don't treat clicks as on an empty area if the row is selected
- Date: Wed, 18 Apr 2012 21:28:36 +0000 (UTC)
commit e208850d2080cac48ed8add54684091e2a86df6c
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 ca24589..eb724a4 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]