[the-board] [ui] Add ability to Ctrl+click things to toggle selection
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Add ability to Ctrl+click things to toggle selection
- Date: Tue, 18 Jan 2011 22:29:15 +0000 (UTC)
commit 3eebe9bd59da16ab0d70dadd9fb70d5b39fb3fda
Author: Lucas Rocha <lucasr gnome org>
Date: Sun Jan 16 23:32:14 2011 +0000
[ui] Add ability to Ctrl+click things to toggle selection
Update Clutter dependency to 1.5.13 as the API has been added since this
version.
https://bugzilla.gnome.org/show_bug.cgi?id=639905
configure.ac | 2 +-
src/js/ui/thing.js | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d009488..fddd19a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_PROG_LIBTOOL
## don't rerun to this point if we abort
AC_CACHE_SAVE
-CLUTTER_MIN_VERSION=1.5.8
+CLUTTER_MIN_VERSION=1.5.13
GLIB_MIN_VERSION=2.27.3
GTK_MIN_VERSION=2.91.7
GJS_MIN_VERSION=0.7.7
diff --git a/src/js/ui/thing.js b/src/js/ui/thing.js
index a918460..9288fc5 100644
--- a/src/js/ui/thing.js
+++ b/src/js/ui/thing.js
@@ -293,7 +293,15 @@ Thing.prototype = {
},
_onMainBoxClicked : function(action) {
- if (this._activateOnClick) {
+ if (!this._activateOnClick) {
+ return;
+ }
+
+ let modifierType = action.get_state();
+
+ if (modifierType & Clutter.ModifierType.CONTROL_MASK) {
+ this.selected = !this.selected;
+ } else {
this.emit("activate");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]