Gtk.LockButton¶
Methods¶
| class | new(permission) | 
| get_permission() | |
| set_permission(permission) | 
Virtual Methods¶
| Inherited: | Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2) | 
|---|
Properties¶
| Inherited: | Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| permission | Gio.Permission | r/w | The Gio.Permissionobject controlling this button | 
| text-lock | str | r/w/c | The text to display when prompting the user to lock | 
| text-unlock | str | r/w/c | The text to display when prompting the user to unlock | 
| tooltip-lock | str | r/w/c | The tooltip to display when prompting the user to lock | 
| tooltip-not-authorized | str | r/w/c | The tooltip to display when prompting the user cannot obtain authorization | 
| tooltip-unlock | str | r/w/c | The tooltip to display when prompting the user to unlock | 
Style Properties¶
| Inherited: | Gtk.Button (7), Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
Fields¶
| Inherited: | Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.Button | r | 
Class Details¶
- 
class Gtk.LockButton(*args, **kwargs)¶
- Bases: - Gtk.Button- Abstract: - No - Structure: - Gtk.LockButtonClass- Gtk.LockButtonis 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- Gio.Permissionobject. Concrete implementations of- Gio.Permissionmay use PolicyKit or some other authorization framework. To obtain a PolicyKit-based- Gio.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: - 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: - 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: - 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 - Gtk.LockButton- :text-lock,- Gtk.LockButton- :text-unlock,- Gtk.LockButton- :tooltip-lock,- Gtk.LockButton- :tooltip-unlockand- Gtk.LockButton- :tooltip-not-authorizedproperties.- 
classmethod new(permission)[source]¶
- Parameters: - permission ( - Gio.Permissionor- None) – a- Gio.Permission- Returns: - a new - Gtk.LockButton- Return type: - Gtk.Widget- Creates a new lock button which reflects the permission. - New in version 3.2. 
 - 
get_permission()[source]¶
- Returns: - the - Gio.Permissionof self- Return type: - Gio.Permission- Obtains the - Gio.Permissionobject that controls self.- New in version 3.2. 
 - 
set_permission(permission)[source]¶
- Parameters: - permission ( - Gio.Permissionor- None) – a- Gio.Permissionobject, or- None- Sets the - Gio.Permissionobject that controls self.- New in version 3.2. 
 
- 
classmethod 
Property Details¶
- 
Gtk.LockButton.props.permission¶
- Name: - permission- Type: - Gio.Permission- Default Value: - None- Flags: - READABLE,- WRITABLE- The - Gio.Permissionobject controlling this button
- 
Gtk.LockButton.props.text_lock¶
- Name: - text-lock- Type: - str- Default Value: - 'Lock'- Flags: - READABLE,- WRITABLE,- CONSTRUCT- The text to display when prompting the user to lock 
- 
Gtk.LockButton.props.text_unlock¶
- Name: - text-unlock- Type: - str- Default Value: - 'Unlock'- Flags: - READABLE,- WRITABLE,- CONSTRUCT- The text to display when prompting the user to unlock 
- 
Gtk.LockButton.props.tooltip_lock¶
- Name: - tooltip-lock- Type: - str- Default Value: - 'Dialog is unlocked.\nClick to prevent further changes'- Flags: - READABLE,- WRITABLE,- CONSTRUCT- The tooltip to display when prompting the user to lock 
