MalcontentUi.RestrictApplicationsDialog

g Adw.PreferencesWindow Adw.PreferencesWindow MalcontentUi.RestrictApplicationsDialog MalcontentUi.RestrictApplicationsDialog Adw.PreferencesWindow->MalcontentUi.RestrictApplicationsDialog Adw.Window Adw.Window Adw.Window->Adw.PreferencesWindow GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Native Gtk.Native GObject.GInterface->Gtk.Native Gtk.Root Gtk.Root GObject.GInterface->Gtk.Root Gtk.ShortcutManager Gtk.ShortcutManager GObject.GInterface->Gtk.ShortcutManager GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Window Gtk.Window Gtk.Native->Gtk.Window Gtk.Root->Gtk.Window Gtk.ShortcutManager->Gtk.Window Gtk.Widget->Gtk.Window Gtk.Window->Adw.Window

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:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new (app_filter, user_display_name)

build_app_filter (builder)

get_app_filter ()

get_user_display_name ()

set_app_filter (app_filter)

set_user_display_name (user_display_name)

Virtual Methods

Inherited:

Gtk.Window (5), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.ShortcutManager (2)

Properties

Inherited:

Adw.PreferencesWindow (4), Adw.Window (4), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

app-filter

Malcontent.AppFilter

r/w/co/en

The user’s current app filter, used to set up the dialog.

user-display-name

str

r/w/en

The display name for the currently selected user account, or None if no user is selected.

Signals

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1)

Class Details

class MalcontentUi.RestrictApplicationsDialog(*args, **kwargs)
Bases:

Adw.PreferencesWindow

Abstract:

No

Structure:

MalcontentUi.RestrictApplicationsDialogClass

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 a MalcontentUi.RestrictApplicationsDialog :user and MalcontentUi.RestrictApplicationsDialog :app-filter as input to set up the UI, and returns its output as set of modifications to a given Malcontent.AppFilterBuilder using MalcontentUi.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 show

  • user_display_name (str or None) – the display name of the user to show the app filter for, or None if no user is selected

Returns:

a new restricted applications editing dialog

Return type:

MalcontentUi.RestrictApplicationsDialog

Create a new MalcontentUi.RestrictApplicationsDialog widget.

New in version 0.5.0.

build_app_filter(builder)
Parameters:

builder (Malcontent.AppFilterBuilder) – an existing Malcontent.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:

Malcontent.AppFilter

Get the value of MalcontentUi.RestrictApplicationsDialog :app-filter. If the property was originally set to None, 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:

str or None

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 or None) – the app filter to configure the dialog from, or None 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 or None) – the display name of the user to configure the dialog for, or None 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:

Malcontent.AppFilter

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

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:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.