MalcontentUi.RestrictApplicationsDialog¶
- Subclasses:
None
Methods¶
- Inherited:
Adw.PreferencesWindow (16), Adw.Window (7), Gtk.Window (62), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3)
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Adw.PreferencesWindow (4), Adw.Window (4), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co/en |
The user’s current app filter, used to set up the dialog. |
||
r/w/en |
The display name for the currently selected user account, or |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class MalcontentUi.RestrictApplicationsDialog(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The ‘Restrict Applications’ dialog is a dialog which shows the available applications on the system alongside a column of toggle switches, which allows the given user to be prevented from running each application.
The dialog contains a single
MalcontentUi.RestrictApplicationsSelector
. It takes aMalcontentUi.RestrictApplicationsDialog
:user
andMalcontentUi.RestrictApplicationsDialog
:app-filter
as input to set up the UI, and returns its output as set of modifications to a givenMalcontent.AppFilterBuilder
usingMalcontentUi.RestrictApplicationsDialog.build_app_filter
().New in version 0.5.0.
- classmethod new(app_filter, user_display_name)¶
- Parameters:
app_filter (
Malcontent.AppFilter
) – the initial app filter configuration to showuser_display_name (
str
orNone
) – the display name of the user to show the app filter for, orNone
if no user is selected
- Returns:
a new restricted applications editing dialog
- Return type:
Create a new
MalcontentUi.RestrictApplicationsDialog
widget.New in version 0.5.0.
- build_app_filter(builder)¶
- Parameters:
builder (
Malcontent.AppFilterBuilder
) – an existingMalcontent.AppFilterBuilder
to modify
Get the app filter settings currently configured in the dialog, by modifying the given builder.
Typically this will be called in the handler for
Gtk.Dialog
::response
.New in version 0.5.0.
- get_app_filter()¶
- Returns:
the initial app filter used to populate the dialog
- Return type:
Get the value of
MalcontentUi.RestrictApplicationsDialog
:app-filter
. If the property was originally set toNone
, this will be the empty app filter.New in version 0.5.0.
- get_user_display_name()¶
- Returns:
the display name of the user the dialog is configured for, or
None
if unknown- Return type:
Get the value of
MalcontentUi.RestrictApplicationsDialog
:user-display-name
.New in version 0.5.0.
- set_app_filter(app_filter)¶
- Parameters:
app_filter (
Malcontent.AppFilter
orNone
) – the app filter to configure the dialog from, orNone
to use an empty app filter
Set the value of
MalcontentUi.RestrictApplicationsDialog
:app-filter
.New in version 0.5.0.
- set_user_display_name(user_display_name)¶
- Parameters:
user_display_name (
str
orNone
) – the display name of the user to configure the dialog for, orNone
if unknown
Set the value of
MalcontentUi.RestrictApplicationsDialog
:user-display-name
.New in version 0.5.0.
Property Details¶
- MalcontentUi.RestrictApplicationsDialog.props.app_filter¶
- Name:
app-filter
- Type:
- Default Value:
- Flags:
The user’s current app filter, used to set up the dialog. As app filters are immutable, it is not updated as the dialog is changed. Use
MalcontentUi.RestrictApplicationsDialog.build_app_filter
() to build the new app filter.New in version 0.5.0.
- MalcontentUi.RestrictApplicationsDialog.props.user_display_name¶
- Name:
user-display-name
- Type:
- Default Value:
- Flags:
The display name for the currently selected user account, or
None
if no user is selected. This will typically be the user’s full name (if known) or their username.If set, it must be valid UTF-8 and non-empty.
New in version 0.5.0.