AppChooserWidget#

Deprecated since version 4.10: The application selection widgets should be implemented according to the design of each platform and/or application requiring them.

class AppChooserWidget(**properties: Any)#

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, AppChooser, Buildable, ConstraintTarget

GtkAppChooserWidget is a widget for selecting applications.

It is the main building block for AppChooserDialog. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs.

GtkAppChooserWidget offers detailed control over what applications are shown, using the show_default, show_recommended, show_fallback, show_other and show_all properties. See the AppChooser documentation for more information about these groups of applications.

To keep track of the selected application, use the application_selected and application_activated signals.

CSS nodes#

GtkAppChooserWidget has a single CSS node with name appchooser.

Constructors#

class AppChooserWidget
classmethod new(content_type: str) Widget#

Creates a new GtkAppChooserWidget for applications that can handle content of the given type.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

content_type – the content type to show applications for

Methods#

class AppChooserWidget
get_default_text() str | None#

Returns the text that is shown if there are not applications that can handle the content type.

Deprecated since version 4.10: This widget will be removed in GTK 5

get_show_all() bool#

Gets whether the app chooser should show all applications in a flat list.

Deprecated since version 4.10: This widget will be removed in GTK 5

get_show_default() bool#

Gets whether the app chooser should show the default handler for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

get_show_fallback() bool#

Gets whether the app chooser should show related applications for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

get_show_other() bool#

Gets whether the app chooser should show applications which are unrelated to the content type.

Deprecated since version 4.10: This widget will be removed in GTK 5

Gets whether the app chooser should show recommended applications for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

set_default_text(text: str) None#

Sets the text that is shown if there are not applications that can handle the content type.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

text – the new value for default_text

set_show_all(setting: bool) None#

Sets whether the app chooser should show all applications in a flat list.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

setting – the new value for show_all

set_show_default(setting: bool) None#

Sets whether the app chooser should show the default handler for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

setting – the new value for show_default

set_show_fallback(setting: bool) None#

Sets whether the app chooser should show related applications for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

setting – the new value for show_fallback

set_show_other(setting: bool) None#

Sets whether the app chooser should show applications which are unrelated to the content type.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

setting – the new value for show_other

Sets whether the app chooser should show recommended applications for the content type in a separate section.

Deprecated since version 4.10: This widget will be removed in GTK 5

Parameters:

setting – the new value for show_recommended

Properties#

class AppChooserWidget
props.default_text: str#

The type of the None singleton.

props.show_all: bool#

The type of the None singleton.

props.show_default: bool#

The type of the None singleton.

props.show_fallback: bool#

The type of the None singleton.

props.show_other: bool#

The type of the None singleton.

The type of the None singleton.

Signals#

class AppChooserWidget.signals
application_activated(application: AppInfo) None#

The type of the None singleton.

Parameters:

application – the activated GAppInfo

application_selected(application: AppInfo) None#

The type of the None singleton.

Parameters:

application – the selected GAppInfo