Gtk.AppChooserWidget¶
| Subclasses: | None | 
|---|
Methods¶
| class | new(content_type) | 
| get_default_text() | |
| get_show_all() | |
| get_show_default() | |
| get_show_fallback() | |
| get_show_other() | |
| get_show_recommended() | |
| set_default_text(text) | |
| set_show_all(setting) | |
| set_show_default(setting) | |
| set_show_fallback(setting) | |
| set_show_other(setting) | |
| set_show_recommended(setting) | 
Virtual Methods¶
| Inherited: | Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) | 
|---|
| do_application_activated(app_info) | |
| do_application_selected(app_info) | |
| do_populate_popup(menu, app_info) | 
Properties¶
| Inherited: | Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1), Gtk.AppChooser (1) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| default-text | str | r/w/en | The default text appearing when there are no applications | 
| show-all | bool | r/w/c/en | Whether the widget should show all applications | 
| show-default | bool | r/w/c/en | Whether the widget should show the default application | 
| show-fallback | bool | r/w/c/en | Whether the widget should show fallback applications | 
| show-other | bool | r/w/c/en | Whether the widget should show other applications | 
| show-recommended | bool | r/w/c/en | Whether the widget should show recommended applications | 
Child Properties¶
| Inherited: | Gtk.Box (5) | 
|---|
Style Properties¶
| Inherited: | Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| application-activated | Emitted when an application item is activated from the widget’s list. | 
| application-selected | Emitted when an application item is selected from the widget’s list. | 
| populate-popup | Emitted when a context menu is about to popup over an application item. | 
Fields¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.Box | r | 
Class Details¶
- 
class Gtk.AppChooserWidget(*args, **kwargs)¶
- Bases: - Gtk.Box,- Gtk.AppChooser- Abstract: - No - Structure: - Gtk.AppChooserWidgetClass- Gtk.AppChooserWidgetis a widget for selecting applications. It is the main building block for- 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.- Gtk.AppChooserWidgetoffers detailed control over what applications are shown, using the- Gtk.AppChooserWidget- :show-default,- Gtk.AppChooserWidget- :show-recommended,- Gtk.AppChooserWidget- :show-fallback,- Gtk.AppChooserWidget- :show-otherand- Gtk.AppChooserWidget- :show-allproperties. See the- Gtk.AppChooserdocumentation for more information about these groups of applications.- To keep track of the selected application, use the - Gtk.AppChooserWidget- ::application-selectedand- Gtk.AppChooserWidget- ::application-activatedsignals.- CSS nodes
 - Gtk.AppChooserWidgethas 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: - Gtk.Widget- Creates a new - Gtk.AppChooserWidgetfor 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: - str- 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: - bool- Returns the current value of the - Gtk.AppChooserWidget- :show-allproperty.- New in version 3.0. 
 - 
get_show_default()[source]¶
- Returns: - the value of - Gtk.AppChooserWidget- :show-default- Return type: - bool- Returns the current value of the - Gtk.AppChooserWidget- :show-defaultproperty.- New in version 3.0. 
 - 
get_show_fallback()[source]¶
- Returns: - the value of - Gtk.AppChooserWidget- :show-fallback- Return type: - bool- Returns the current value of the - Gtk.AppChooserWidget- :show-fallbackproperty.- New in version 3.0. 
 - 
get_show_other()[source]¶
- Returns: - the value of - Gtk.AppChooserWidget- :show-other- Return type: - bool- Returns the current value of the - Gtk.AppChooserWidget- :show-otherproperty.- New in version 3.0. 
 - 
get_show_recommended()[source]¶
- Returns: - the value of - Gtk.AppChooserWidget- :show-recommended- Return type: - bool- Returns the current value of the - Gtk.AppChooserWidget- :show-recommendedproperty.- New in version 3.0. 
 - 
set_default_text(text)[source]¶
- Parameters: - text ( - str) – the new value for- Gtk.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 for- Gtk.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 for- Gtk.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 for- Gtk.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 for- Gtk.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 for- Gtk.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) –
 - 
do_application_selected(app_info) virtual¶
- Parameters: - app_info ( - Gio.AppInfo) –
 - 
do_populate_popup(menu, app_info) virtual¶
- Parameters: - menu (Gtk.Menu) –
- app_info (Gio.AppInfo) –
 
- menu (
 
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 signal
- application (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. 
- app_chooser_widget (
- 
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 signal
- application (Gio.AppInfo) – the selectedGio.AppInfo
 - Emitted when an application item is selected from the widget’s list. 
- app_chooser_widget (
- 
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 signal
- menu (Gtk.Menu) – theGtk.Menuto populate
- application (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.Menuobject 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.
- app_chooser_widget (
Property Details¶
- 
Gtk.AppChooserWidget.props.default_text¶
- Name: - default-text- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- The - Gtk.AppChooserWidget- :default-textproperty determines the text that appears in the widget when there are no applications for the given content type. See also- Gtk.AppChooserWidget.set_default_text().
- 
Gtk.AppChooserWidget.props.show_all¶
- Name: - show-all- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- CONSTRUCT,- EXPLICIT_NOTIFY- If the - Gtk.AppChooserWidget- :show-allproperty is- 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: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- CONSTRUCT,- EXPLICIT_NOTIFY- The - ::show-defaultproperty 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: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- CONSTRUCT,- EXPLICIT_NOTIFY- The - Gtk.AppChooserWidget- :show-fallbackproperty 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: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- CONSTRUCT,- EXPLICIT_NOTIFY- The - Gtk.AppChooserWidget- :show-otherproperty determines whether the app chooser should show a section for other applications.
- 
Gtk.AppChooserWidget.props.show_recommended¶
- Name: - show-recommended- Type: - bool- Default Value: - True- Flags: - READABLE,- WRITABLE,- CONSTRUCT,- EXPLICIT_NOTIFY- The - Gtk.AppChooserWidget- :show-recommendedproperty determines whether the app chooser should show a section for recommended applications. If- False, the recommended applications are listed among the other applications.