messageTray: Remove overlaid close button

The new notification banner already includes a close button, so remove
the one provided by the tray.
This commit is contained in:
Florian Müllner 2015-02-11 20:35:50 +01:00
parent 815eaa1d4d
commit ec66b32df6

View File

@ -1499,11 +1499,6 @@ const MessageTray = new Lang.Class({
this._banner = null; this._banner = null;
this._bannerClickedId = 0; this._bannerClickedId = 0;
this._closeButton = Util.makeCloseButton();
this._closeButton.hide();
this._closeButton.connect('clicked', Lang.bind(this, this._closeNotification));
this.actor.add_actor(this._closeButton);
this._userActiveWhileNotificationShown = false; this._userActiveWhileNotificationShown = false;
this.idleMonitor = Meta.IdleMonitor.get_core(); this.idleMonitor = Meta.IdleMonitor.get_core();
@ -1529,7 +1524,6 @@ const MessageTray = new Lang.Class({
Main.layoutManager.trayBox.add_actor(this.actor); Main.layoutManager.trayBox.add_actor(this.actor);
Main.layoutManager.trackChrome(this.actor, { affectsInputRegion: true }); Main.layoutManager.trackChrome(this.actor, { affectsInputRegion: true });
Main.layoutManager.trackChrome(this._closeButton);
global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState)); global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState));
@ -1566,14 +1560,6 @@ const MessageTray = new Lang.Class({
this._updateState(); this._updateState();
}, },
_closeNotification: function() {
if (this._notificationState == State.SHOWN) {
this._closeButton.hide();
this._notification.emit('done-displaying');
this._notification.destroy();
}
},
get queueCount() { get queueCount() {
return this._notificationQueue.length; return this._notificationQueue.length;
}, },
@ -2038,7 +2024,6 @@ const MessageTray = new Lang.Class({
if (notification.isTransient) if (notification.isTransient)
notification.destroy(NotificationDestroyedReason.EXPIRED); notification.destroy(NotificationDestroyedReason.EXPIRED);
this._closeButton.hide();
this._pointerInNotification = false; this._pointerInNotification = false;
this._notificationRemoved = false; this._notificationRemoved = false;