[gnome-boxes] collection: Enter selection mode on right-click
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] collection: Enter selection mode on right-click
- Date: Thu, 25 Oct 2012 13:16:38 +0000 (UTC)
commit 0fab3637066fe352922068665f94c4486de8ac7d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Oct 24 02:44:14 2012 +0300
collection: Enter selection mode on right-click
Lets handle right click the same way as Documents does: If there is a
box under the cursor, enter selection mode and select the box.
Note: Unlike Documents, we are not resetting selection when exiting
selection mode and this patch makes this bug even more annoying so that
should be the next thing to fix. Bug#686833 is about that.
https://bugzilla.gnome.org/show_bug.cgi?id=674674
src/collection-view.vala | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/collection-view.vala b/src/collection-view.vala
index abe943a..ef18b8d 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -395,19 +395,14 @@ private class Boxes.CollectionView: Boxes.UI {
private bool on_button_press_event (Gtk.Widget view, Gdk.EventButton event) {
Gtk.TreePath path = icon_view.get_path_at_pos ((int) event.x, (int) event.y);
- if (path != null)
- button_press_item_path = path.to_string ();
-
- if (!App.app.selection_mode || path == null)
+ if (path == null)
return false;
+ button_press_item_path = path.to_string ();
CollectionItem item = get_item_for_path (path);
bool found = item != null;
- /* if we did not find the item in the selection, block
- * drag and drop, while in selection mode
- */
- return !found;
+ return !found; // if we did not find the item, block drag and drop
}
private bool on_button_release_event (Gtk.Widget view, Gdk.EventButton event) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]