pub trait AppChooserButtonExt:
IsA<AppChooserButton>
+ Sealed
+ 'static {
Show 13 methods
// Provided 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
Provided Methods§
Sourcefn append_custom_item(&self, name: &str, label: &str, icon: &impl IsA<Icon>)
fn append_custom_item(&self, name: &str, label: &str, icon: &impl IsA<Icon>)
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
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
Sourcefn append_separator(&self)
fn append_separator(&self)
Appends a separator to the list of applications that is shown in the popup.
Sourcefn shows_default_item(&self) -> bool
fn shows_default_item(&self) -> bool
Returns the current value of the show-default-item
property.
§Returns
the value of show-default-item
Sourcefn shows_dialog_item(&self) -> bool
fn shows_dialog_item(&self) -> bool
Sourcefn set_active_custom_item(&self, name: &str)
fn set_active_custom_item(&self, name: &str)
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
Sourcefn set_heading(&self, heading: &str)
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
Sourcefn set_show_default_item(&self, setting: bool)
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 show-default-item
Sourcefn set_show_dialog_item(&self, setting: bool)
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 show-dialog-item
Sourcefn connect_custom_item_activated<F: Fn(&Self, &str) + 'static>(
&self,
detail: Option<&str>,
f: F,
) -> SignalHandlerId
fn connect_custom_item_activated<F: Fn(&Self, &str) + 'static>( &self, detail: Option<&str>, f: F, ) -> SignalHandlerId
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
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".