MalcontentUi.RestrictApplicationsSelector

g 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.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable 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.Box Gtk.Box MalcontentUi.RestrictApplicationsSelector MalcontentUi.RestrictApplicationsSelector Gtk.Box->MalcontentUi.RestrictApplicationsSelector Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Box

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Orientable (2)

Structs:

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

class

new (app_filter)

build_app_filter (builder)

get_app_filter ()

get_search ()

set_app_filter (app_filter)

set_search (search)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

Gtk.Box (4), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Orientable (1)

Name

Type

Flags

Short Description

app-filter

Malcontent.AppFilter

r/w/en

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

search

str

r/w/en

Search terms to filter the displayed list of apps by.

Signals

Inherited:

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

Name

Short Description

changed

Emitted whenever an application in the list is blocked or unblocked.

Fields

Inherited:

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

Class Details

class MalcontentUi.RestrictApplicationsSelector(**kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

MalcontentUi.RestrictApplicationsSelectorClass

The ‘Restrict Applications’ selector is a list box 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 selector takes an MalcontentUi.RestrictApplicationsSelector :app-filter as input to set up the UI, and returns its output as set of modifications to a given Malcontent.AppFilterBuilder using MalcontentUi.RestrictApplicationsSelector.build_app_filter().

Search terms may be applied using MalcontentUi.RestrictApplicationsSelector :search. These will filter the list of displayed apps so that only ones matching the search terms (by name, using UTF-8 normalisation and casefolding) will be displayed.

New in version 0.5.0.

classmethod new(app_filter)
Parameters:

app_filter (Malcontent.AppFilter) – app filter to configure the selector from initially

Returns:

a new restricted applications selector

Return type:

MalcontentUi.RestrictApplicationsSelector

Create a new MalcontentUi.RestrictApplicationsSelector 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 selector, by modifying the given builder.

New in version 0.5.0.

get_app_filter()
Returns:

the initial app filter used to populate the selector

Return type:

Malcontent.AppFilter

Get the value of MalcontentUi.RestrictApplicationsSelector :app-filter. If the property was originally set to None, this will be the empty app filter.

New in version 0.5.0.

Returns:

current search terms, or None if no search filtering is active

Return type:

str

Get the value of MalcontentUi.RestrictApplicationsSelector :search.

New in version 0.12.0.

set_app_filter(app_filter)
Parameters:

app_filter (Malcontent.AppFilter or None) – the app filter to configure the selector from, or None to use an empty app filter

Set the value of MalcontentUi.RestrictApplicationsSelector :app-filter.

This will overwrite any user changes to the selector, so they should be saved first using MalcontentUi.RestrictApplicationsSelector.build_app_filter() if desired.

New in version 0.5.0.

Parameters:

search (str or None) – search terms, or None to not filter the app list

Set the value of MalcontentUi.RestrictApplicationsSelector :search, or clear it to None.

New in version 0.12.0.

Signal Details

MalcontentUi.RestrictApplicationsSelector.signals.changed(restrict_applications_selector)
Signal Name:

changed

Flags:

RUN_LAST

Parameters:

restrict_applications_selector (MalcontentUi.RestrictApplicationsSelector) – The object which received the signal

Emitted whenever an application in the list is blocked or unblocked.

New in version 0.5.0.

Property Details

MalcontentUi.RestrictApplicationsSelector.props.app_filter
Name:

app-filter

Type:

Malcontent.AppFilter

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The user’s current app filter, used to set up the selector. As app filters are immutable, it is not updated as the selector is changed. Use MalcontentUi.RestrictApplicationsSelector.build_app_filter() to build the new app filter.

New in version 0.5.0.

MalcontentUi.RestrictApplicationsSelector.props.search
Name:

search

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Search terms to filter the displayed list of apps by, or None to not filter the search.

New in version 0.12.0.