pub trait AppChooserButtonExt: 'static {
Show 13 methods fn append_custom_item(&self, name: &str, label: &str, icon: &impl IsA<Icon>); fn append_separator(&self); fn heading(&self) -> Option<GString>; fn shows_default_item(&self) -> bool; fn shows_dialog_item(&self) -> bool; fn set_active_custom_item(&self, name: &str); fn set_heading(&self, heading: &str); fn set_show_default_item(&self, setting: bool); fn set_show_dialog_item(&self, setting: bool); fn connect_custom_item_activated<F: Fn(&Self, &str) + 'static>(
        &self,
        detail: Option<&str>,
        f: F
    ) -> SignalHandlerId; fn connect_heading_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_show_default_item_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_show_dialog_item_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all AppChooserButton methods.

Implementors

AppChooserButton

Required Methods

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 signal::AppChooserButton::custom-item-activated signal, to add a callback for the activation of a particular custom item in the list. See also append_separator().

name

the name of the custom item

label

the label for the custom item

icon

the icon for the custom item

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

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

Returns

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

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

Returns

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

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

Returns

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

Selects a custom item previously added with append_custom_item().

Use [AppChooserExtManual::refresh()][crate::prelude::AppChooserExtManual::refresh()] to bring the selection to its initial state.

name

the name of the custom item

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

heading

a string containing Pango markup

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

setting

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

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

setting

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

Emitted when a custom item, previously added with append_custom_item(), is activated from the dropdown menu.

item_name

the name of the activated item

Implementors