Trait gtk::prelude::AppChooserButtonExt [−][src]
pub trait AppChooserButtonExt: 'static {}Show methods
fn append_custom_item<P: IsA<Icon>>(
&self,
name: &str,
label: &str,
icon: &P
); 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
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
fn append_separator(&self)
fn append_separator(&self)
Appends a separator to the list of applications that is shown in the popup.
fn shows_default_item(&self) -> bool
fn shows_default_item(&self) -> bool
Returns the current value of the property::AppChooserButton::show-default-item
property.
Returns
the value of property::AppChooserButton::show-default-item
fn shows_dialog_item(&self) -> bool
fn shows_dialog_item(&self) -> bool
Returns the current value of the property::AppChooserButton::show-dialog-item
property.
Returns
the value of property::AppChooserButton::show-dialog-item
fn 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
fn 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
fn 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 property::AppChooserButton::show-default-item
fn 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 property::AppChooserButton::show-dialog-item
fn 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