[gnome-boxes] Selection mode should be single-click
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Selection mode should be single-click
- Date: Wed, 13 Jun 2012 14:08:23 +0000 (UTC)
commit 337eed2144579b2ec07d1377fe61a08a43c8549f
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Sat Jun 9 01:03:46 2012 +0200
Selection mode should be single-click
Pretend the MODIFY_SELECTION modifier is pressed
(fake a Ctrl-pressed for example) to allow single-click selection.
I wonder if this is really GNOME HIG compliant, but gnome-documents
seems to also do single-click selection in collection view,
although it seems to use a different selection mechanism..
https://bugzilla.gnome.org/show_bug.cgi?id=672152
src/collection-view.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/collection-view.vala b/src/collection-view.vala
index a2e9e1a..9fe442a 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -199,6 +199,12 @@ private class Boxes.CollectionView: Boxes.UI {
model.set_sort_column_id (Gtk.SortColumn.DEFAULT, Gtk.SortType.ASCENDING);
icon_view = new Gtk.IconView.with_model (model);
+ icon_view.button_press_event.connect ((event) => {
+ if (App.app.selection_mode)
+ event.state |= icon_view.get_modifier_mask (Gdk.ModifierIntent.MODIFY_SELECTION);
+
+ return false;
+ });
icon_view.item_width = 185;
icon_view.column_spacing = 20;
icon_view.margin = 16;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]