Gtk.AppChooserWidget¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.AppChooser (3)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when an application item is activated from the widget’s list. |
|
Emitted when an application item is selected from the widget’s list. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.AppChooserWidget(**kwargs)¶
- Bases:
- Abstract:
No
GtkAppChooserWidget
is a widget for selecting applications.It is the main building block for [class`Gtk`.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 [property`Gtk`.AppChooserWidget:show-default], [property`Gtk`.AppChooserWidget:show-recommended], [property`Gtk`.AppChooserWidget:show-fallback], [property`Gtk`.AppChooserWidget:show-other] and [property`Gtk`.AppChooserWidget:show-all] properties. See the [iface`Gtk`.AppChooser] documentation for more information about these groups of applications.To keep track of the selected application, use the [signal`Gtk`.AppChooserWidget::application-selected] and [signal`Gtk`.AppChooserWidget::application-activated] signals.
- CSS nodes
GtkAppChooserWidget
has a single CSS node with name 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(content_type)[source]¶
- Parameters:
content_type (
str
) – the content type to show applications for- Returns:
a newly created
GtkAppChooserWidget
- Return type:
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
- get_default_text()[source]¶
-
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()[source]¶
- Returns:
the value of [property`Gtk`.AppChooserWidget:show-all]
- Return type:
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()[source]¶
- Returns:
the value of [property`Gtk`.AppChooserWidget:show-default]
- Return type:
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()[source]¶
- Returns:
the value of [property`Gtk`.AppChooserWidget:show-fallback]
- Return type:
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()[source]¶
- Returns:
the value of [property`Gtk`.AppChooserWidget:show-other]
- Return type:
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
- get_show_recommended()[source]¶
- Returns:
the value of [property`Gtk`.AppChooserWidget:show-recommended]
- Return type:
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)[source]¶
- Parameters:
text (
str
) – the new value for [property`Gtk`.AppChooserWidget:default-text]
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
- set_show_all(setting)[source]¶
- Parameters:
setting (
bool
) – the new value for [property`Gtk`.AppChooserWidget:show-all]
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
- set_show_default(setting)[source]¶
- Parameters:
setting (
bool
) – the new value for [property`Gtk`.AppChooserWidget:show-default]
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
- set_show_fallback(setting)[source]¶
- Parameters:
setting (
bool
) – the new value for [property`Gtk`.AppChooserWidget:show-fallback]
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
- set_show_other(setting)[source]¶
- Parameters:
setting (
bool
) – the new value for [property`Gtk`.AppChooserWidget:show-other]
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
- set_show_recommended(setting)[source]¶
- Parameters:
setting (
bool
) – the new value for [property`Gtk`.AppChooserWidget:show-recommended]
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
Signal Details¶
- Gtk.AppChooserWidget.signals.application_activated(app_chooser_widget, application)¶
- Signal Name:
application-activated
- Flags:
- Parameters:
app_chooser_widget (
Gtk.AppChooserWidget
) – The object which received the signalapplication (
Gio.AppInfo
) – the activatedGAppInfo
Emitted when an application item is activated from the widget’s list.
This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.
- Gtk.AppChooserWidget.signals.application_selected(app_chooser_widget, application)¶
- Signal Name:
application-selected
- Flags:
- Parameters:
app_chooser_widget (
Gtk.AppChooserWidget
) – The object which received the signalapplication (
Gio.AppInfo
) – the selectedGAppInfo
Emitted when an application item is selected from the widget’s list.
Property Details¶
- Gtk.AppChooserWidget.props.default_text¶
- Name:
default-text
- Type:
- Default Value:
- Flags:
The text that appears in the widget when there are no applications for the given content type.
- Gtk.AppChooserWidget.props.show_all¶
- Name:
show-all
- Type:
- Default Value:
- Flags:
If
True
, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications.
- Gtk.AppChooserWidget.props.show_default¶
- Name:
show-default
- Type:
- Default Value:
- Flags:
Determines whether the app chooser should show the default handler for the content type in a separate section.
If
False
, the default handler is listed among the recommended applications.
- Gtk.AppChooserWidget.props.show_fallback¶
- Name:
show-fallback
- Type:
- Default Value:
- Flags:
Determines whether the app chooser should show a section for fallback applications.
If
False
, the fallback applications are listed among the other applications.
- Gtk.AppChooserWidget.props.show_other¶
- Name:
show-other
- Type:
- Default Value:
- Flags:
Determines whether the app chooser should show a section for other applications.