Class: Gtk::AppChooserButton

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#active_custom_item=(name) ⇒ nil

Selects a custom item previously added with gtk_app_chooser_button_append_custom_item().

Use gtk_app_chooser_refresh() to bring the selection to its initial state.

Parameters:

  • name (String)

    the name of the custom item

Returns:

  • (nil)

#append_custom_item(name, label, icon) ⇒ nil

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

Parameters:

  • name (String)

    the name of the custom item

  • label (String)

    the label for the custom item

  • icon (Gio::Icon)

    the icon for the custom item

Returns:

  • (nil)

#append_separatornil

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

Returns:

  • (nil)

#headingString

The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.

Returns:

  • (String)

    heading

#heading=(heading) ⇒ String

The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.

Parameters:

  • heading (String)

Returns:

  • (String)

    heading

  • (String)

    heading

#new(content_type) ⇒ Gtk::Widget

Creates a new Gtk::AppChooserButton for applications that can handle content of the given type.

Parameters:

  • content_type (String)

    the content type to show applications for

Returns:

  • (Gtk::Widget)

    a newly created Gtk::AppChooserButton

#show_default_itemTrueClass

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

Returns:

  • (TrueClass)

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

#show_default_item=(show_default_item) ⇒ TrueClass

The Gtk::AppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provided content type.

Parameters:

  • show_default_item (TrueClass)

Returns:

  • (TrueClass)

    show-default-item

  • (TrueClass)

    show-default-item

#show_default_item?TrueClass

The Gtk::AppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provided content type.

Returns:

  • (TrueClass)

    show-default-item

#show_dialog_itemTrueClass

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

Returns:

  • (TrueClass)

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

#show_dialog_item=(show_dialog_item) ⇒ TrueClass

The Gtk::AppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a Gtk::AppChooserDialog when clicked.

Parameters:

  • show_dialog_item (TrueClass)

Returns:

  • (TrueClass)

    show-dialog-item

  • (TrueClass)

    show-dialog-item

#show_dialog_item?TrueClass

The Gtk::AppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a Gtk::AppChooserDialog when clicked.

Returns:

  • (TrueClass)

    show-dialog-item