loginDialog,unlockDialog: Give user time to read messages

Right now, if multiple messages come in, they just sort of
clobber each other.

This commit sets up a message queue, and introduces pauses
long enough for the user to hopefully be able to read those
messages.

https://bugzilla.gnome.org/show_bug.cgi?id=694688
This commit is contained in:
Ray Strode 2013-03-18 00:59:56 -04:00
parent f72f501931
commit d097327bd8
3 changed files with 127 additions and 17 deletions

View file

@ -930,7 +930,7 @@ const LoginDialog = new Lang.Class({
return batch.run();
},
_onSessionOpened: function(client, serviceName) {
_startSession: function(serviceName) {
Tweener.addTween(this.dialogLayout,
{ opacity: 0,
time: _FADE_ANIMATION_TIME,
@ -953,6 +953,18 @@ const LoginDialog = new Lang.Class({
onCompleteScope: this });
},
_onSessionOpened: function(client, serviceName) {
if (!this._userVerifier.hasPendingMessages) {
this._startSession(serviceName);
} else {
let signalId = this._userVerifier.connect('no-more-messages',
Lang.bind(this, function() {
this._userVerifier.disconnect(signalId);
this._startSession(serviceName);
}));
}
},
_waitForItemForUser: function(userName) {
let item = this._userList.getItemFromUserName(userName);