Gtk.AppChooserDialog

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.AppChooser Gtk.AppChooser GObject.GInterface->Gtk.AppChooser 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.AppChooserDialog Gtk.AppChooserDialog Gtk.AppChooser->Gtk.AppChooserDialog Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Dialog Gtk.Dialog Gtk.Dialog->Gtk.AppChooserDialog Gtk.Window Gtk.Window Gtk.Native->Gtk.Window Gtk.Root->Gtk.Window Gtk.ShortcutManager->Gtk.Window Gtk.Widget->Gtk.Window Gtk.Window->Gtk.Dialog

Example

../_images/AppChooserDialog.png
Subclasses:

None

Methods

Inherited:

Gtk.Dialog (11), Gtk.Window (62), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3), Gtk.AppChooser (3)

Structs:

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

class

new (parent, flags, file)

class

new_for_content_type (parent, flags, content_type)

get_heading ()

get_widget ()

set_heading (heading)

Virtual Methods

Inherited:

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

Properties

Inherited:

Gtk.Dialog (1), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1), Gtk.AppChooser (1)

Name

Type

Flags

Short Description

gfile

Gio.File

r/w/co

heading

str

r/w/en

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

class Gtk.AppChooserDialog(*args, **kwargs)
Bases:

Gtk.Dialog, Gtk.AppChooser

Abstract:

No

GtkAppChooserDialog shows a GtkAppChooserWidget inside a GtkDialog.

An example Gtk.AppChooserDialog

Note that GtkAppChooserDialog does not have any interesting methods of its own. Instead, you should get the embedded GtkAppChooserWidget using [method`Gtk`.AppChooserDialog.get_widget] and call its methods if the generic [iface`Gtk`.AppChooser] interface is not sufficient for your needs.

To set the heading that is shown above the GtkAppChooserWidget, use [method`Gtk`.AppChooserDialog.set_heading].

CSS nodes

GtkAppChooserDialog has a single CSS node with the name window and style class .appchooser.

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

classmethod new(parent, flags, file)[source]
Parameters:
Returns:

a newly created GtkAppChooserDialog

Return type:

Gtk.Widget

Creates a new GtkAppChooserDialog for the provided GFile.

The dialog will show applications that can open the file.

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

classmethod new_for_content_type(parent, flags, content_type)[source]
Parameters:
Returns:

a newly created GtkAppChooserDialog

Return type:

Gtk.Widget

Creates a new GtkAppChooserDialog for the provided content type.

The dialog will show applications that can open the content type.

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

get_heading()[source]
Returns:

the text to display at the top of the dialog, or None, in which case a default text is displayed

Return type:

str or None

Returns the text to display at the top of the dialog.

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

get_widget()[source]
Returns:

the GtkAppChooserWidget of self

Return type:

Gtk.Widget

Returns the GtkAppChooserWidget of this dialog.

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

set_heading(heading)[source]
Parameters:

heading (str) – a string containing Pango markup

Sets the text to display at the top of the dialog.

If the heading is not set, the dialog displays a default text.

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

Property Details

Gtk.AppChooserDialog.props.gfile
Name:

gfile

Type:

Gio.File

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gio.File used by the GtkAppChooserDialog.

The dialog’s GtkAppChooserWidget content type will be guessed from the file, if present.

Gtk.AppChooserDialog.props.heading
Name:

heading

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The text to show at the top of the dialog.

The string may contain Pango markup.