St: add :disabled pseudo class when a button is not reactive

The :reactive property is used on StButton to like the :sensitive
property on GtkWidgets, that is, to indicate that the user is not
(yet) expected to click the button, and therefore should affect
styling too.
This allows to remove some code at the JS layer.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
This commit is contained in:
Giovanni Campagna
2012-07-18 13:59:26 +02:00
parent 2c073fb005
commit a29507e452
2 changed files with 12 additions and 4 deletions

View File

@ -166,10 +166,6 @@ const NetworkSecretDialog = new Lang.Class({
this._okButton.button.reactive = valid;
this._okButton.button.can_focus = valid;
if (valid)
this._okButton.button.remove_style_pseudo_class('disabled');
else
this._okButton.button.add_style_pseudo_class('disabled');
},
_onOk: function() {