messageTray: Only hide the notification stack on clicking close
Rather than destroying the entire source, which is unintuitive, simply close the notification. Removing the entire source is still possible by right-clicking on the summary item and choosing "Remove". https://bugzilla.gnome.org/show_bug.cgi?id=682237
This commit is contained in:
parent
972267e215
commit
c16f9ba7c4
@ -1244,10 +1244,6 @@ const SummaryItem = new Lang.Class({
|
|||||||
this.notificationStackWidget.add_actor(this.notificationStackView);
|
this.notificationStackWidget.add_actor(this.notificationStackView);
|
||||||
|
|
||||||
this.closeButton = makeCloseButton();
|
this.closeButton = makeCloseButton();
|
||||||
this.closeButton.connect('clicked', Lang.bind(this, function() {
|
|
||||||
source.destroy();
|
|
||||||
source.emit('done-displaying-content');
|
|
||||||
}));
|
|
||||||
this.notificationStackWidget.add_actor(this.closeButton);
|
this.notificationStackWidget.add_actor(this.closeButton);
|
||||||
this._stackedNotifications = [];
|
this._stackedNotifications = [];
|
||||||
|
|
||||||
@ -2400,6 +2396,7 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
let closeButton = this._summaryBoxPointerItem.closeButton;
|
let closeButton = this._summaryBoxPointerItem.closeButton;
|
||||||
closeButton.show();
|
closeButton.show();
|
||||||
|
this._summaryBoxPointerCloseClickedId = closeButton.connect('clicked', Lang.bind(this, this._hideSummaryBoxPointer));
|
||||||
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
|
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
|
||||||
} else if (this._clickedSummaryItemMouseButton == 3) {
|
} else if (this._clickedSummaryItemMouseButton == 3) {
|
||||||
this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
|
this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
|
||||||
@ -2509,6 +2506,8 @@ const MessageTray = new Lang.Class({
|
|||||||
this._summaryBoxPointer.bin.child = null;
|
this._summaryBoxPointer.bin.child = null;
|
||||||
this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
|
this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
|
||||||
this._summaryBoxPointerContentUpdatedId = 0;
|
this._summaryBoxPointerContentUpdatedId = 0;
|
||||||
|
this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
|
||||||
|
this._summaryBoxPointerCloseClickedId = 0;
|
||||||
this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
|
this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
|
||||||
this._summaryBoxPointerDoneDisplayingId = 0;
|
this._summaryBoxPointerDoneDisplayingId = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user