[gnome-shell] keyboard: Keep tray after clicking summary item
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Keep tray after clicking summary item
- Date: Tue, 25 Sep 2012 06:26:09 +0000 (UTC)
commit 2ed7ee8f71d54178bcd84f02a31377e647d578bd
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Sep 21 17:21:25 2012 +0200
keyboard: Keep tray after clicking summary item
Currently if a summary item signals that it has handled a click
itself, the tray hides itself. This behavior is wrong for the
On-Screen-Keyboard, which appears as a unit with the tray, so add
a property to opt-out of the default behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=683546
js/ui/keyboard.js | 1 +
js/ui/messageTray.js | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 09551dc..723f89a 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -565,6 +565,7 @@ const KeyboardSource = new Lang.Class({
_init: function(keyboard) {
this._keyboard = keyboard;
this.parent(_("Keyboard"), 'input-keyboard-symbolic');
+ this.keepTrayOnSummaryClick = true;
},
handleSummaryClick: function() {
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 7f76b95..55d8c37 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1052,6 +1052,7 @@ const Source = new Lang.Class({
this.isChat = false;
this.isMuted = false;
this.showInLockScreen = true;
+ this.keepTrayOnSummaryClick = false;
this.notifications = [];
},
@@ -1776,7 +1777,10 @@ const MessageTray = new Lang.Class({
_onSummaryItemClicked: function(summaryItem, button) {
if (summaryItem.source.handleSummaryClick()) {
- this._escapeTray();
+ if (summaryItem.source.keepTrayOnSummaryClick)
+ this._setClickedSummaryItem(null);
+ else
+ this._escapeTray();
} else {
if (!this._setClickedSummaryItem(summaryItem, button))
this._setClickedSummaryItem(null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]