diff options
author | Christian Neumair <chris@gnome-de.org> | 2004-05-07 12:27:17 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2004-05-07 12:27:17 +0000 |
commit | aa44c9294aad7f727556912e4f24a8379a47a03f (patch) | |
tree | 8a98a0b09fd3d19fb47ccb1853e92656f11abd88 /libnautilus-private/nautilus-icon-container.c | |
parent | 4489fd2a08b11ac0d74e933f5656778017cd363c (diff) | |
download | nautilus-aa44c9294aad7f727556912e4f24a8379a47a03f.tar.gz |
Unselect currently selected items on middle or right click on background.
2004-05-07 Christian Neumair <chris@gnome-de.org>
* libnautilus-private/nautilus-icon-container.c (button_press_event):
Unselect currently selected items on middle or right click on
background. Fixes #130087.
Diffstat (limited to 'libnautilus-private/nautilus-icon-container.c')
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index a1f8a1a96..2ea67a29d 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -3206,6 +3206,10 @@ button_press_event (GtkWidget *widget, /* Button 2 may be passed to the window manager. */ if (event->button == MIDDLE_BUTTON) { + selection_changed = unselect_all (container); + if (selection_changed) { + g_signal_emit (container, signals[SELECTION_CHANGED], 0); + } g_signal_emit (widget, signals[MIDDLE_CLICK], 0, event); return TRUE; } @@ -3213,6 +3217,10 @@ button_press_event (GtkWidget *widget, /* Button 3 does a contextual menu. */ if (event->button == CONTEXTUAL_MENU_BUTTON) { end_renaming_mode (container, TRUE); + selection_changed = unselect_all (container); + if (selection_changed) { + g_signal_emit (container, signals[SELECTION_CHANGED], 0); + } g_signal_emit (widget, signals[CONTEXT_CLICK_BACKGROUND], 0, event); return TRUE; } |