overview: Fix ShellInfo.setMessage()
Commit 22eea750
made info messages show up in the lock screen, but
as setShowWhenLocked() throws an exception when called on non-transient
notifications, the transient hint has to be set first.
https://bugzilla.gnome.org/show_bug.cgi?id=682268
This commit is contained in:
parent
973a6b21a2
commit
417941a1bf
@ -70,14 +70,13 @@ const ShellInfo = new Lang.Class({
|
|||||||
let notification = null;
|
let notification = null;
|
||||||
if (this._source.notifications.length == 0) {
|
if (this._source.notifications.length == 0) {
|
||||||
notification = new MessageTray.Notification(this._source, text, null);
|
notification = new MessageTray.Notification(this._source, text, null);
|
||||||
|
notification.setTransient(true);
|
||||||
notification.setShowWhenLocked(true);
|
notification.setShowWhenLocked(true);
|
||||||
} else {
|
} else {
|
||||||
notification = this._source.notifications[0];
|
notification = this._source.notifications[0];
|
||||||
notification.update(text, null, { clear: true });
|
notification.update(text, null, { clear: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
notification.setTransient(true);
|
|
||||||
|
|
||||||
this._undoCallback = undoCallback;
|
this._undoCallback = undoCallback;
|
||||||
if (undoCallback) {
|
if (undoCallback) {
|
||||||
notification.addButton('system-undo',
|
notification.addButton('system-undo',
|
||||||
|
Loading…
Reference in New Issue
Block a user