messageTray: Jiggle some code around

This is to put state management with state management

https://bugzilla.gnome.org/show_bug.cgi?id=694038
This commit is contained in:
Jasper St. Pierre 2013-02-17 14:30:04 -05:00
parent f3901eb668
commit 4a3a61bea1

View File

@ -1864,11 +1864,6 @@ const MessageTray = new Lang.Class({
return false; return false;
}, },
openTray: function() {
this._traySummoned = true;
this._updateState();
},
_onNotificationKeyRelease: function(actor, event) { _onNotificationKeyRelease: function(actor, event) {
if (event.get_key_symbol() == Clutter.KEY_Escape && event.get_state() == 0) { if (event.get_key_symbol() == Clutter.KEY_Escape && event.get_state() == 0) {
this._closeNotification(); this._closeNotification();
@ -2035,6 +2030,11 @@ const MessageTray = new Lang.Class({
this._updateState(); this._updateState();
}, },
openTray: function() {
this._traySummoned = true;
this._updateState();
},
toggle: function() { toggle: function() {
this._traySummoned = !this._traySummoned; this._traySummoned = !this._traySummoned;
this._updateState(); this._updateState();