AppChooserWidget

#GtkAppChooserWidget is a widget for selecting applications. It is the main building block for #GtkAppChooserDialog. 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 #GtkAppChooserWidget:show-default, #GtkAppChooserWidget:show-recommended, #GtkAppChooserWidget:show-fallback, #GtkAppChooserWidget:show-other and #GtkAppChooserWidget:show-all properties. See the #GtkAppChooser documentation for more information about these groups of applications.

To keep track of the selected application, use the #GtkAppChooserWidget::application-selected and #GtkAppChooserWidget::application-activated signals.

CSS nodes

GtkAppChooserWidget has a single CSS node with name appchooser.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(string contentType)

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

Members

Functions

connectApplicationActivated
gulong connectApplicationActivated(T callback, Flag!"After" after)

Connect to ApplicationActivated signal.

connectApplicationSelected
gulong connectApplicationSelected(T callback, Flag!"After" after)

Connect to ApplicationSelected signal.

connectPopulatePopup
gulong connectPopulatePopup(T callback, Flag!"After" after)

Connect to PopulatePopup signal.

getDefaultText
string getDefaultText()

Returns the text that is shown if there are not applications that can handle the content type.

getShowAll
bool getShowAll()

Returns the current value of the #GtkAppChooserWidget:show-all property.

getShowDefault
bool getShowDefault()

Returns the current value of the #GtkAppChooserWidget:show-default property.

getShowFallback
bool getShowFallback()

Returns the current value of the #GtkAppChooserWidget:show-fallback property.

getShowOther
bool getShowOther()

Returns the current value of the #GtkAppChooserWidget:show-other property.

getShowRecommended
bool getShowRecommended()

Returns the current value of the #GtkAppChooserWidget:show-recommended property.

self
AppChooserWidget self()

Returns this, for use in with statements.

setDefaultText
void setDefaultText(string text)

Sets the text that is shown if there are not applications that can handle the content type.

setShowAll
void setShowAll(bool setting)

Sets whether the app chooser should show all applications in a flat list.

setShowDefault
void setShowDefault(bool setting)

Sets whether the app chooser should show the default handler for the content type in a separate section.

setShowFallback
void setShowFallback(bool setting)

Sets whether the app chooser should show related applications for the content type in a separate section.

setShowOther
void setShowOther(bool setting)

Sets whether the app chooser should show applications which are unrelated to the content type.

setShowRecommended
void setShowRecommended(bool setting)

Sets whether the app chooser should show recommended applications for the content type in a separate section.

Properties

_gType
GType _gType [@property getter]
defaultText
string defaultText [@property getter]

Get defaultText property.

defaultText
string defaultText [@property setter]

Set defaultText property.

showAll
bool showAll [@property getter]

Get showAll property.

showAll
bool showAll [@property setter]

Set showAll property.

showDefault
bool showDefault [@property getter]

Get showDefault property.

showDefault
bool showDefault [@property setter]

Set showDefault property.

showFallback
bool showFallback [@property getter]

Get showFallback property.

showFallback
bool showFallback [@property setter]

Set showFallback property.

showOther
bool showOther [@property getter]

Get showOther property.

showOther
bool showOther [@property setter]

Set showOther property.

showRecommended
bool showRecommended [@property getter]

Get showRecommended property.

showRecommended
bool showRecommended [@property setter]

Set showRecommended property.

Static functions

_getGType
GType _getGType()
builder
AppChooserWidgetGidBuilder builder()

Get builder for gtk.app_chooser_widget.AppChooserWidget

Mixed In Members

From mixin AppChooserT!()

contentType
string contentType [@property getter]

Get contentType property.

getAppInfo
gio.app_info.AppInfo getAppInfo()

Returns the currently selected application.

getContentType
string getContentType()

Returns the current value of the #GtkAppChooser:content-type property.

refresh
void refresh()

Reloads the list of applications.

Inherited Members

From Box

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Box self()

Returns this, for use in with statements.

builder
BoxGidBuilder builder()

Get builder for gtk.box.Box

baselinePosition
gtk.types.BaselinePosition baselinePosition [@property getter]
baselinePosition
gtk.types.BaselinePosition baselinePosition [@property setter]
homogeneous
bool homogeneous [@property getter]
homogeneous
bool homogeneous [@property setter]
spacing
int spacing [@property getter]
spacing
int spacing [@property setter]
getBaselinePosition
gtk.types.BaselinePosition getBaselinePosition()

Gets the value set by gtk.box.Box.setBaselinePosition.

getCenterWidget
gtk.widget.Widget getCenterWidget()

Retrieves the center widget of the box.

getHomogeneous
bool getHomogeneous()

Returns whether the box is homogeneous (all children are the same size). See gtk.box.Box.setHomogeneous.

getSpacing
int getSpacing()

Gets the value set by gtk.box.Box.setSpacing.

packEnd
void packEnd(gtk.widget.Widget child, bool expand, bool fill, uint padding)

Adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.

packStart
void packStart(gtk.widget.Widget child, bool expand, bool fill, uint padding)

Adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.

queryChildPacking
void queryChildPacking(gtk.widget.Widget child, bool expand, bool fill, uint padding, gtk.types.PackType packType)

Obtains information about how child is packed into box.

reorderChild
void reorderChild(gtk.widget.Widget child, int position)

Moves child to a new position in the list of box children. The list contains widgets packed #GTK_PACK_START as well as widgets packed #GTK_PACK_END, in the order that these widgets were added to box.

setBaselinePosition
void setBaselinePosition(gtk.types.BaselinePosition position)

Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available.

setCenterWidget
void setCenterWidget(gtk.widget.Widget widget)

Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space.

setChildPacking
void setChildPacking(gtk.widget.Widget child, bool expand, bool fill, uint padding, gtk.types.PackType packType)

Sets the way child is packed into box.

setHomogeneous
void setHomogeneous(bool homogeneous)

Sets the #GtkBox:homogeneous property of box, controlling whether or not all children of box are given equal space in the box.

setSpacing
void setSpacing(int spacing)

Sets the #GtkBox:spacing property of box, which is the number of pixels to place between children of box.

From AppChooser

_getGType
GType _getGType()
contentType
string contentType [@property getter]

Get contentType property.

getAppInfo
gio.app_info.AppInfo getAppInfo()

Returns the currently selected application.

getContentType
string getContentType()

Returns the current value of the #GtkAppChooser:content-type property.

refresh
void refresh()

Reloads the list of applications.