gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.AppChooserButton

Contents

Description

The AppChooserButton is a widget that lets the user select an application. It implements the AppChooser interface.

Initially, a AppChooserButton selects the first application in its list, which will either be the most-recently used application or, if AppChooserButton:show-default-item is True, the default application.

The list of applications shown in a AppChooserButton includes the recommended applications for the given content type. When AppChooserButton:show-default-item is set, the default application is also included. To let the user chooser other applications, you can set the AppChooserButton:show-dialog-item property, which allows to open a full AppChooserDialog.

It is possible to add custom items to the list, using appChooserButtonAppendCustomItem. These items cause the AppChooserButton::custom-item-activated signal to be emitted when they are selected.

To track changes in the selected application, use the ComboBox::changed signal.

Synopsis

Exported types

Methods

appendCustomItem

appChooserButtonAppendCustomItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a, IsIcon b) 
=> a

self: a AppChooserButton

-> Text

name: the name of the custom item

-> Text

label: the label for the custom item

-> b

icon: the icon for the custom item

-> m () 

Appends a custom item to the list of applications that is shown in the popup; the item name must be unique per-widget. Clients can use the provided name as a detail for the AppChooserButton::custom-item-activated signal, to add a callback for the activation of a particular custom item in the list. See also appChooserButtonAppendSeparator.

Since: 3.0

appendSeparator

appChooserButtonAppendSeparator Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m () 

Appends a separator to the list of applications that is shown in the popup.

Since: 3.0

getHeading

appChooserButtonGetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m (Maybe Text)

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

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

getShowDefaultItem

appChooserButtonGetShowDefaultItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m Bool

Returns: the value of AppChooserButton:show-default-item

Returns the current value of the AppChooserButton:show-default-item property.

Since: 3.2

getShowDialogItem

appChooserButtonGetShowDialogItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m Bool

Returns: the value of AppChooserButton:show-dialog-item

Returns the current value of the AppChooserButton:show-dialog-item property.

Since: 3.0

new

appChooserButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

contentType: the content type to show applications for

-> m AppChooserButton

Returns: a newly created AppChooserButton

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

Since: 3.0

setActiveCustomItem

appChooserButtonSetActiveCustomItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Text

name: the name of the custom item

-> m () 

Selects a custom item previously added with appChooserButtonAppendCustomItem.

Use appChooserRefresh to bring the selection to its initial state.

Since: 3.0

setHeading

appChooserButtonSetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Text

heading: a string containing Pango markup

-> m () 

Sets the text to display at the top of the dialog. If the heading is not set, the dialog displays a default text.

setShowDefaultItem

appChooserButtonSetShowDefaultItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Bool

setting: the new value for AppChooserButton:show-default-item

-> m () 

Sets whether the dropdown menu of this button should show the default application for the given content type at top.

Since: 3.2

setShowDialogItem

appChooserButtonSetShowDialogItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Bool

setting: the new value for AppChooserButton:show-dialog-item

-> m () 

Sets whether the dropdown menu of this button should show an entry to trigger a AppChooserDialog.

Since: 3.0

Properties

heading

data AppChooserButtonHeadingPropertyInfo Source #

Instances

AttrInfo AppChooserButtonHeadingPropertyInfo Source # 
type AttrOrigin AppChooserButtonHeadingPropertyInfo Source # 
type AttrLabel AppChooserButtonHeadingPropertyInfo Source # 
type AttrGetType AppChooserButtonHeadingPropertyInfo Source # 
type AttrBaseTypeConstraint AppChooserButtonHeadingPropertyInfo Source # 
type AttrSetTypeConstraint AppChooserButtonHeadingPropertyInfo Source # 
type AttrAllowedOps AppChooserButtonHeadingPropertyInfo Source # 

showDefaultItem

data AppChooserButtonShowDefaultItemPropertyInfo Source #

Instances

AttrInfo AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrOrigin AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrLabel AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrGetType AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrBaseTypeConstraint AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrSetTypeConstraint AppChooserButtonShowDefaultItemPropertyInfo Source # 
type AttrAllowedOps AppChooserButtonShowDefaultItemPropertyInfo Source # 

showDialogItem

data AppChooserButtonShowDialogItemPropertyInfo Source #

Instances

AttrInfo AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrOrigin AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrLabel AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrGetType AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrBaseTypeConstraint AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrSetTypeConstraint AppChooserButtonShowDialogItemPropertyInfo Source # 
type AttrAllowedOps AppChooserButtonShowDialogItemPropertyInfo Source # 

Signals

customItemActivated