[][src]Trait gtk::AppChooserButtonExt

pub trait AppChooserButtonExt: 'static {
    fn append_custom_item<P: IsA<Icon>>(
        &self,
        name: &str,
        label: &str,
        icon: &P
    );
fn append_separator(&self);
fn get_heading(&self) -> Option<GString>;
fn get_show_default_item(&self) -> bool;
fn get_show_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,
        f: F
    ) -> SignalHandlerId;
fn connect_property_heading_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_default_item_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_dialog_item_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all AppChooserButton methods.

Implementors

AppChooserButton

Required methods

fn append_custom_item<P: IsA<Icon>>(&self, name: &str, label: &str, icon: &P)

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 AppChooserButtonExt::append_separator.

name

the name of the custom item

label

the label for the custom item

icon

the icon for the custom item

fn append_separator(&self)

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

fn get_heading(&self) -> Option<GString>

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

fn get_show_default_item(&self) -> bool

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

Returns

the value of AppChooserButton:show-default-item

fn get_show_dialog_item(&self) -> bool

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

Returns

the value of AppChooserButton:show-dialog-item

fn set_active_custom_item(&self, name: &str)

Selects a custom item previously added with AppChooserButtonExt::append_custom_item.

Use AppChooser::refresh to bring the selection to its initial state.

name

the name of the custom item

fn set_heading(&self, heading: &str)

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

fn set_show_default_item(&self, setting: bool)

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 AppChooserButton:show-default-item

fn set_show_dialog_item(&self, setting: bool)

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

setting

the new value for AppChooserButton:show-dialog-item

fn connect_custom_item_activated<F: Fn(&Self, &str) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

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

item_name

the name of the activated item

fn connect_property_heading_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_show_default_item_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_show_dialog_item_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<AppChooserButton>> AppChooserButtonExt for O[src]

Loading content...