AppChooserDialog

gtk.AppChooserDialog shows a gtk.AppChooserWidget inside a gtk.Dialog

Note that gtk.AppChooserDialog does not have any interesting methods of its own. Instead, you should get the embedded gtk.AppChooserWidget using 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 gtk.AppChooserWidget, use AppChooserDialog.setHeading.

Constructors

this
this(GtkAppChooserDialog* gtkAppChooserDialog, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Window parent, GtkDialogFlags flags, FileIF file)

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

this
this(Window parent, GtkDialogFlags flags, string contentType)

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

Members

Functions

getAppChooserDialogStruct
GtkAppChooserDialog* getAppChooserDialogStruct(bool transferOwnership)

Get the main Gtk struct

getHeading
string getHeading()

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

getStruct
void* getStruct()

the main Gtk struct as a void*

getWidget
Widget getWidget()

Returns the gtk.AppChooserWidget of this dialog.

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.

Static functions

getType
GType getType()

Variables

gtkAppChooserDialog
GtkAppChooserDialog* gtkAppChooserDialog;

the main Gtk struct

Inherited Members

From Dialog

gtkDialog
GtkDialog* gtkDialog;

the main Gtk struct

getDialogStruct
GtkDialog* getDialogStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

addButton
Button addButton(StockID stockID, int responseId)
addButtons
void addButtons(string[] buttonsText, ResponseType[] responses)
addButtons
void addButtons(StockID[] stockIDs, ResponseType[] responses)
getActionArea
HButtonBox getActionArea()

Returns the action area of dialog.

getContentArea
VBox getContentArea()

Returns the content area of dialog.

getType
GType getType()
addActionWidget
void addActionWidget(Widget child, int responseId)

Adds an activatable widget to the action area of a gtk.Dialog, connecting a signal handler that will emit the 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 gtk.Dialog struct.

addButton
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 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.

getHeaderBar
Widget getHeaderBar()

Returns the header bar of dialog. Note that the headerbar is only used by the dialog if the use-header-bar property is TRUE.

getResponseForWidget
int getResponseForWidget(Widget widget)

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

getWidgetForResponse
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 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 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 response signal, or is destroyed. If the dialog is destroyed during the call to Dialog.run, Dialog.run returns GTK_RESPONSE_NONE Otherwise, it returns the response ID from the ::response signal emission.

setAlternativeButtonOrder
void setAlternativeButtonOrder(int[] newOrder)

Sets an alternative button order. If the 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.

addOnClose
gulong addOnClose(void delegate(Dialog) dlg, ConnectFlags connectFlags)

The ::close signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user uses a keybinding to close the dialog.

addOnResponse
gulong addOnResponse(void delegate(int, Dialog) dlg, ConnectFlags connectFlags)

Emitted when an action widget is clicked, the dialog receives a delete event, or the application programmer calls Dialog.response. On a delete event, the response ID is GTK_RESPONSE_DELETE_EVENT Otherwise, it depends on which action widget was clicked.

alternativeDialogButtonOrder
bool alternativeDialogButtonOrder(Screen screen)

Returns TRUE if dialogs are expected to use an alternative button order on the screen screen. See Dialog.setAlternativeButtonOrder for more details about alternative button order.

From AppChooserIF

getAppChooserStruct
GtkAppChooser* getAppChooserStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getAppInfo
AppInfoIF getAppInfo()

Returns the currently selected application.

getContentType
string getContentType()

Returns the current value of the content-type property.

refresh
void refresh()

Reloads the list of applications.