Gtk.AppChooserWidget¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2), Gtk.AppChooser (3)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The default text appearing when there are no applications |
||
r/w/c/en |
Whether the widget should show all applications |
||
r/w/c/en |
Whether the widget should show the default application |
||
r/w/c/en |
Whether the widget should show fallback applications |
||
r/w/c/en |
Whether the widget should show other applications |
||
r/w/c/en |
Whether the widget should show recommended applications |
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
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. |
|
Emitted when a context menu is about to popup over an application item. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Gtk.AppChooserWidget(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.AppChooserWidget
is a widget for selecting applications. It is the main building block forGtk.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.Gtk.AppChooserWidget
offers detailed control over what applications are shown, using theGtk.AppChooserWidget
:show-default
,Gtk.AppChooserWidget
:show-recommended
,Gtk.AppChooserWidget
:show-fallback
,Gtk.AppChooserWidget
:show-other
andGtk.AppChooserWidget
:show-all
properties. See theGtk.AppChooser
documentation for more information about these groups of applications.To keep track of the selected application, use the
Gtk.AppChooserWidget
::application-selected
andGtk.AppChooserWidget
::application-activated
signals.- CSS nodes
Gtk.AppChooserWidget
has a single CSS node with name appchooser.- classmethod new(content_type)[source]¶
- Parameters:
content_type (
str
) – the content type to show applications for- Returns:
a newly created
Gtk.AppChooserWidget
- Return type:
Creates a new
Gtk.AppChooserWidget
for applications that can handle content of the given type.New in version 3.0.
- get_default_text()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:default-text
- Return type:
Returns the text that is shown if there are not applications that can handle the content type.
New in version 3.0.
- get_show_all()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:show-all
- Return type:
Returns the current value of the
Gtk.AppChooserWidget
:show-all
property.New in version 3.0.
- get_show_default()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:show-default
- Return type:
Returns the current value of the
Gtk.AppChooserWidget
:show-default
property.New in version 3.0.
- get_show_fallback()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:show-fallback
- Return type:
Returns the current value of the
Gtk.AppChooserWidget
:show-fallback
property.New in version 3.0.
- get_show_other()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:show-other
- Return type:
Returns the current value of the
Gtk.AppChooserWidget
:show-other
property.New in version 3.0.
- get_show_recommended()[source]¶
- Returns:
the value of
Gtk.AppChooserWidget
:show-recommended
- Return type:
Returns the current value of the
Gtk.AppChooserWidget
:show-recommended
property.New in version 3.0.
- set_default_text(text)[source]¶
- Parameters:
text (
str
) – the new value forGtk.AppChooserWidget
:default-text
Sets the text that is shown if there are not applications that can handle the content type.
- set_show_all(setting)[source]¶
- Parameters:
setting (
bool
) – the new value forGtk.AppChooserWidget
:show-all
Sets whether the app chooser should show all applications in a flat list.
New in version 3.0.
- set_show_default(setting)[source]¶
- Parameters:
setting (
bool
) – the new value forGtk.AppChooserWidget
:show-default
Sets whether the app chooser should show the default handler for the content type in a separate section.
New in version 3.0.
- set_show_fallback(setting)[source]¶
- Parameters:
setting (
bool
) – the new value forGtk.AppChooserWidget
:show-fallback
Sets whether the app chooser should show related applications for the content type in a separate section.
New in version 3.0.
- set_show_other(setting)[source]¶
- Parameters:
setting (
bool
) – the new value forGtk.AppChooserWidget
:show-other
Sets whether the app chooser should show applications which are unrelated to the content type.
New in version 3.0.
- set_show_recommended(setting)[source]¶
- Parameters:
setting (
bool
) – the new value forGtk.AppChooserWidget
:show-recommended
Sets whether the app chooser should show recommended applications for the content type in a separate section.
New in version 3.0.
- do_application_activated(app_info) virtual¶
- Parameters:
app_info (
Gio.AppInfo
) –
Signal emitted when an application item is activated from the widget’s list.
- do_application_selected(app_info) virtual¶
- Parameters:
app_info (
Gio.AppInfo
) –
Signal emitted when an application item is selected from the widget’s list.
- do_populate_popup(menu, app_info) virtual¶
- Parameters:
menu (
Gtk.Menu
) –app_info (
Gio.AppInfo
) –
Signal emitted when a context menu is about to popup over an application item.
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 activatedGio.AppInfo
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 selectedGio.AppInfo
Emitted when an application item is selected from the widget’s list.
- Gtk.AppChooserWidget.signals.populate_popup(app_chooser_widget, menu, application)¶
- Signal Name:
populate-popup
- Flags:
- Parameters:
app_chooser_widget (
Gtk.AppChooserWidget
) – The object which received the signalapplication (
Gio.AppInfo
) – the currentGio.AppInfo
Emitted when a context menu is about to popup over an application item. Clients can insert menu items into the provided
Gtk.Menu
object in the callback of this signal; the context menu will be shown over the item if at least one item has been added to the menu.
Property Details¶
- Gtk.AppChooserWidget.props.default_text¶
- Name:
default-text
- Type:
- Default Value:
- Flags:
The
Gtk.AppChooserWidget
:default-text
property determines the text that appears in the widget when there are no applications for the given content type. See alsoGtk.AppChooserWidget.set_default_text
().
- Gtk.AppChooserWidget.props.show_all¶
- Name:
show-all
- Type:
- Default Value:
- Flags:
If the
Gtk.AppChooserWidget
:show-all
property isTrue
, 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:
The
::show-default
property determines whether the app chooser should show the default handler for the content type in a separate section. IfFalse
, the default handler is listed among the recommended applications.
- Gtk.AppChooserWidget.props.show_fallback¶
- Name:
show-fallback
- Type:
- Default Value:
- Flags:
The
Gtk.AppChooserWidget
:show-fallback
property determines whether the app chooser should show a section for fallback applications. IfFalse
, the fallback applications are listed among the other applications.
- Gtk.AppChooserWidget.props.show_other¶
- Name:
show-other
- Type:
- Default Value:
- Flags:
The
Gtk.AppChooserWidget
:show-other
property determines whether the app chooser should show a section for other applications.
- Gtk.AppChooserWidget.props.show_recommended¶
- Name:
show-recommended
- Type:
- Default Value:
- Flags:
The
Gtk.AppChooserWidget
:show-recommended
property determines whether the app chooser should show a section for recommended applications. IfFalse
, the recommended applications are listed among the other applications.