ModalDialog: add 'default' pseudo-class to default button

Add 'default' parameter to setButtons, that controls the binding
of Return (unless overridden) and applies the 'default' pseudo-class.
Currently it has no effect, but it will start having after the
login dialog redesign.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
This commit is contained in:
Giovanni Campagna
2012-07-19 15:32:59 +02:00
parent ac6c808124
commit 8970e17911
7 changed files with 17 additions and 6 deletions

View File

@ -398,7 +398,8 @@ const ShellMountPasswordDialog = new Lang.Class({
key: Clutter.Escape
},
{ label: _("Unlock"),
action: Lang.bind(this, this._onUnlockButton)
action: Lang.bind(this, this._onUnlockButton),
default: true
}];
this.setButtons(buttons);