loginDialog: Fix conflicting session notification
The internal notification API changed between the time the code was originally written and the time the change was merged. Belatedly adapt to those changes. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3236>
This commit is contained in:
parent
09bdad851a
commit
5d58e41cbc
@ -1074,19 +1074,20 @@ export const LoginDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_notifyConflictingSessionDialogClosed(userName) {
|
_notifyConflictingSessionDialogClosed(userName) {
|
||||||
const source = new MessageTray.SystemNotificationSource();
|
const source = new MessageTray.getSystemSource();
|
||||||
Main.messageTray.add(source);
|
|
||||||
|
|
||||||
this._conflictingSessionNotification = new MessageTray.Notification(source,
|
this._conflictingSessionNotification = new MessageTray.Notification({
|
||||||
_('Stop conflicting session dialog closed'),
|
source,
|
||||||
_('Try to login again to start a session for user %s.').format(userName));
|
title: _('Stop conflicting session dialog closed'),
|
||||||
this._conflictingSessionNotification.setUrgency(MessageTray.Urgency.CRITICAL);
|
body: _('Try to login again to start a session for user %s.').format(userName),
|
||||||
this._conflictingSessionNotification.setTransient(true);
|
urgency: MessageTray.Urgency.CRITICAL,
|
||||||
|
isTransient: true,
|
||||||
|
});
|
||||||
this._conflictingSessionNotification.connect('destroy', () => {
|
this._conflictingSessionNotification.connect('destroy', () => {
|
||||||
this._conflictingSessionNotification = null;
|
this._conflictingSessionNotification = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
source.showNotification(this._conflictingSessionNotification);
|
source.addNotification(this._conflictingSessionNotification);
|
||||||
}
|
}
|
||||||
|
|
||||||
_showConflictingSessionDialog(serviceName, conflictingSession) {
|
_showConflictingSessionDialog(serviceName, conflictingSession) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user