[gnome-shell] messageTray: Allow to open summary item with up arrow
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Allow to open summary item with up arrow
- Date: Tue, 18 Sep 2012 16:47:19 +0000 (UTC)
commit a5d60050a2ea5b4b4ecf3102095ce27495b5b16f
Author: Florian MÃllner <fmuellner gnome org>
Date: Sat Sep 15 01:03:19 2012 +0200
messageTray: Allow to open summary item with up arrow
When using keynav in the top bar, menus may be opened using the
down arrow; in a similar fashion, allow to open the summary
boxpointer with the up arrow.
https://bugzilla.gnome.org/show_bug.cgi?id=682243
js/ui/messageTray.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index f11aa5b..a977295 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1221,6 +1221,7 @@ const SummaryItem = new Lang.Class({
can_focus: true,
track_hover: true });
this.actor.label_actor = new St.Label({ text: source.title });
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
this._sourceBox = new St.BoxLayout({ style_class: 'summary-source' });
this._sourceIcon = source.getSummaryIcon();
@@ -1268,6 +1269,14 @@ const SummaryItem = new Lang.Class({
this._closeButton.visible = v;
},
+ _onKeyPress: function(actor, event) {
+ if (event.get_key_symbol() == Clutter.KEY_Up) {
+ actor.emit('clicked', 1);
+ return true;
+ }
+ return false;
+ },
+
prepareNotificationStackForShowing: function() {
if (this.notificationStack.get_n_children() > 0)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]