[gnome-shell] polkitAgent: Don't use setButtons



commit 4231c879efe97aa2bd780cbb7aadf46ada4fceaf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Dec 21 11:16:52 2012 -0500

    polkitAgent: Don't use setButtons
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690594

 js/ui/components/polkitAgent.js |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
index db32976..65bc6ae 100644
--- a/js/ui/components/polkitAgent.js
+++ b/js/ui/components/polkitAgent.js
@@ -159,14 +159,13 @@ const AuthenticationDialog = new Lang.Class({
         messageBox.add(this._nullMessageLabel);
         this._nullMessageLabel.show();
 
-        this.setButtons([{ label: _("Cancel"),
-                           action: Lang.bind(this, this.cancel),
-                           key:    Clutter.Escape
-                         },
-                         { label:  _("Authenticate"),
-                           action: Lang.bind(this, this._onAuthenticateButtonPressed),
-                           default: true
-                         }]);
+        this._cancelButton = this.addButton({ label: _("Cancel"),
+                                              action: Lang.bind(this, this.cancel),
+                                              key: Clutter.Escape });
+        this._okButton = this.addButton({ label:  _("Authenticate"),
+                                          action: Lang.bind(this, this._onAuthenticateButtonPressed),
+                                          default: true },
+                                        { expand: true, x_fill: false, x_align: St.Align.END });
 
         this._doneEmitted = false;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]