endSessionDialog: don't process response until closed

Right now if a user logs out, they are thrown to the login screen
imediately, without even seeing the dialog close.

This commit fades the dialog out before processing the logout.

https://bugzilla.gnome.org/show_bug.cgi?id=694296
This commit is contained in:
Ray Strode 2013-02-20 13:30:26 -05:00
parent 677cdfd6c8
commit b4b13b0cb9

View File

@ -379,7 +379,12 @@ const EndSessionDialog = new Lang.Class({
let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label;
buttons.push({ action: Lang.bind(this, function() {
this.close(true);
let signalId = this.connect('closed',
Lang.bind(this, function() {
this.disconnect(signalId);
this._confirm(signal);
}));
}),
label: label });
}
@ -387,8 +392,10 @@ const EndSessionDialog = new Lang.Class({
this.setButtons(buttons);
},
close: function() {
close: function(skipSignal) {
this.parent();
if (!skipSignal)
this._dbusImpl.emit_signal('Closed', null);
},