LockButton


Object Hierarchy:

Gtk.LockButton Gtk.LockButton Gtk.LockButton Gtk.Button Gtk.Button Gtk.Button->Gtk.LockButton Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Button Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.LockButton Atk.Implementor->Gtk.Button Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.LockButton Gtk.Buildable->Gtk.Button Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Actionable Gtk.Actionable Gtk.Actionable->Gtk.LockButton Gtk.Actionable->Gtk.Button Gtk.Activatable Gtk.Activatable Gtk.Activatable->Gtk.LockButton Gtk.Activatable->Gtk.Button

Description:

[ CCode ( type_id = "gtk_lock_button_get_type ()" ) ]
public class LockButton : Button, Implementor, Actionable, Activatable, Buildable

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 Permission object. Concrete implementations of Permission may use PolicyKit or some other authorization framework. To obtain a PolicyKit-based Permission, use polkit_permission_new.

If the user is not currently allowed to perform the action, but can obtain the permission, the widget looks like this:

![](lockbutton-locked.png)

and the user can click the button to request the permission. Depending on the platform, this may pop up an authentication dialog or ask the user to authenticate in some other way. Once the user has obtained the permission, the widget changes to this:

![](lockbutton-unlocked.png)

and the permission can be dropped again by clicking the button. If the user is not able to obtain the permission at all, the widget looks like this:

![](lockbutton-sorry.png)

If the user has the permission and cannot drop it, the button is hidden.

The text (and tooltips) that are shown in the various cases can be adjusted with the text_lock, text_unlock, tooltip_lock, tooltip_unlock and tooltip_not_authorized properties.

GtkLockButton


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor