Gtk.LockButton

GtkLockButton is a widget that can be used in control panels or preference dialogs to allow users to obtain and revoke authorizations needed to operate the controls. The required authorization is represented by a GPermission object. Concrete implementations of GPermission may use PolicyKit or some other authorization framework. If the user lacks the authorization but authorization can be obtained through authentication, the widget looks like this <informalexample><inlinegraphic fileref="lockbutton-locked.png"></inlinegraphic></informalexample> and the user can click the button to obtain the authorization. Depending on the platform, this may pop up an authentication dialog or ask the user to authenticate in some other way. Once authorization is obtained, the widget changes to this <informalexample><inlinegraphic fileref="lockbutton-unlocked.png"></inlinegraphic></informalexample> and the authorization can be dropped by clicking the button. If the user is not able to obtain authorization at all, the widget looks like this <informalexample><inlinegraphic fileref="lockbutton-sorry.png"></inlinegraphic></informalexample> If the user is authorized and cannot drop the authorization, the button is hidden. The text (and tooltips) that are shown in the various cases can be adjusted with the GtkLockButton:text-lock, GtkLockButton:text-unlock, GtkLockButton:tooltip-lock, GtkLockButton:tooltip-unlock and GtkLockButton:tooltip-not-authorized properties.

Hierarchy