[gnome-shell/wip/fmuellner/notification-redux: 56/88] 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: 56/88] panel: Add closeCalendar() function
- Date: Sun, 15 Feb 2015 17:35:29 +0000 (UTC)
commit 70fa557d7d50512c0a99e2f9d2ad2066057e96c1
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]