[gnome-shell/wip/fmuellner/notification-redux: 57/82] panel: Add closeCalendar() function
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 57/82] panel: Add closeCalendar() function
- Date: Sat, 14 Feb 2015 10:11:09 +0000 (UTC)
commit 63ce38397e89ea90a459c741592ca4a820afbd5a
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Feb 13 10:44:13 2015 +0100
panel: Add closeCalendar() function
To be used from the calendar/messageList when activating actions,
and possibly from the messageTray when receiving an urgent notification;
however the latter doesn't sound like a good idea to me, so I'd rather
leave that out and see how it goes ...
js/ui/panel.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 87930aa..163ffce 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1061,6 +1061,18 @@ const Panel = new Lang.Class({
menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
},
+ closeCalendar: function() {
+ let indicator = this.statusArea.dateMenu;
+ if (!indicator) // calendar not supported by current session mode
+ return;
+
+ let menu = indicator.menu;
+ if (!indicator.actor.reactive)
+ return;
+
+ menu.close();
+ },
+
set boxOpacity(value) {
let isReactive = value > 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]