AppChooserDialog

#GtkAppChooserDialog shows a #GtkAppChooserWidget inside a #GtkDialog.

Note that #GtkAppChooserDialog does not have any interesting methods of its own. Instead, you should get the embedded #GtkAppChooserWidget using gtk.app_chooser_dialog.AppChooserDialog.getWidget and call its methods if the generic #GtkAppChooser interface is not sufficient for your needs.

To set the heading that is shown above the #GtkAppChooserWidget, use gtk.app_chooser_dialog.AppChooserDialog.setHeading.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(gtk.window.Window parent, gtk.types.DialogFlags flags, gio.file.File file)

Creates a new #GtkAppChooserDialog for the provided #GFile, to allow the user to select an application for it.

Members

Functions

getHeading
string getHeading()

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

getWidget
gtk.widget.Widget getWidget()

Returns the #GtkAppChooserWidget of this dialog.

self
AppChooserDialog self()

Returns this, for use in with statements.

setHeading
void setHeading(string heading)

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

Properties

_gType
GType _gType [@property getter]
gfile
gio.file.File gfile [@property getter]

Get gfile property.

heading
string heading [@property getter]

Get heading property.

heading
string heading [@property setter]

Set heading property.

Static functions

_getGType
GType _getGType()
builder
AppChooserDialogGidBuilder builder()

Get builder for gtk.app_chooser_dialog.AppChooserDialog

newForContentType
gtk.app_chooser_dialog.AppChooserDialog newForContentType(gtk.window.Window parent, gtk.types.DialogFlags flags, string contentType)

Creates a new #GtkAppChooserDialog for the provided content type, to allow the user to select an application for it.

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 Dialog

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

Returns this, for use in with statements.

builder
DialogGidBuilder builder()

Get builder for gtk.dialog.Dialog

useHeaderBar
int useHeaderBar [@property getter]

Get useHeaderBar property.

addActionWidget
void addActionWidget(gtk.widget.Widget child, int responseId)

Adds an activatable widget to the action area of a #GtkDialog, connecting a signal handler that will emit the #GtkDialog::response signal on the dialog when the widget is activated. The widget is appended to the end of the dialog’s action area. If you want to add a non-activatable widget, simply pack it into the action_area field of the #GtkDialog struct.

addButton
gtk.widget.Widget addButton(string buttonText, int responseId)

Adds a button with the given text and sets things up so that clicking the button will emit the #GtkDialog::response signal with the given response_id. The button is appended to the end of the dialog’s action area. The button widget is returned, but usually you don’t need it.

getActionArea
gtk.box.Box getActionArea()

Returns the action area of dialog.

getContentArea
gtk.box.Box getContentArea()

Returns the content area of dialog.

getHeaderBar
gtk.header_bar.HeaderBar getHeaderBar()

Returns the header bar of dialog. Note that the headerbar is only used by the dialog if the #GtkDialog:use-header-bar property is true.

getResponseForWidget
int getResponseForWidget(gtk.widget.Widget widget)

Gets the response id of a widget in the action area of a dialog.

getWidgetForResponse
gtk.widget.Widget getWidgetForResponse(int responseId)

Gets the widget button that uses the given response ID in the action area of a dialog.

response
void response(int responseId)

Emits the #GtkDialog::response signal with the given response ID. Used to indicate that the user has responded to the dialog in some way; typically either you or gtk.dialog.Dialog.run will be monitoring the ::response signal and take appropriate action.

run
int run()

Blocks in a recursive main loop until the dialog either emits the #GtkDialog::response signal, or is destroyed. If the dialog is destroyed during the call to gtk.dialog.Dialog.run, gtk.dialog.Dialog.run returns #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the ::response signal emission.

setAlternativeButtonOrderFromArray
void setAlternativeButtonOrderFromArray(int[] newOrder)

Sets an alternative button order. If the #GtkSettings:gtk-alternative-button-order setting is set to true, the dialog buttons are reordered according to the order of the response ids in new_order.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the last widget in the dialog’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

Calls gtk_widget_set_sensitive (widget, setting) for each widget in the dialog’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.

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

Connect to Close signal.

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

Connect to Response signal.

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.