GtkAppChooserButton
GtkAppChooserButton — A button to launch an application chooser dialog
|
 |
Includes
#include <gtk/gtk.h>
Functions
gtk_app_chooser_button_new ()
GtkWidget *
gtk_app_chooser_button_new (const gchar *content_type);
Creates a new GtkAppChooserButton for applications
that can handle content of the given type.
Since: 3.0
gtk_app_chooser_button_append_custom_item ()
void
gtk_app_chooser_button_append_custom_item
(GtkAppChooserButton *self,
const gchar *name,
const gchar *label,
GIcon *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 gtk_app_chooser_button_append_separator().
Since: 3.0
gtk_app_chooser_button_append_separator ()
void
gtk_app_chooser_button_append_separator
(GtkAppChooserButton *self);
Appends a separator to the list of applications that is shown
in the popup.
Since: 3.0
gtk_app_chooser_button_set_show_default_item ()
void
gtk_app_chooser_button_set_show_default_item
(GtkAppChooserButton *self,
gboolean setting);
Sets whether the dropdown menu of this button should show the
default application for the given content type at top.
Since: 3.2
gtk_app_chooser_button_set_show_dialog_item ()
void
gtk_app_chooser_button_set_show_dialog_item
(GtkAppChooserButton *self,
gboolean setting);
Sets whether the dropdown menu of this button should show an
entry to trigger a GtkAppChooserDialog.
Since: 3.0
gtk_app_chooser_button_get_heading ()
const gchar *
gtk_app_chooser_button_get_heading (GtkAppChooserButton *self);
Returns the text to display at the top of the dialog.
Returns
the text to display at the top of the dialog,
or NULL, in which case a default text is displayed.
[nullable]
gtk_app_chooser_button_set_heading ()
void
gtk_app_chooser_button_set_heading (GtkAppChooserButton *self,
const gchar *heading);
Sets the text to display at the top of the dialog.
If the heading is not set, the dialog displays a default text.
Types and Values
struct GtkAppChooserButton
struct GtkAppChooserButton;
struct GtkAppChooserButtonClass
struct GtkAppChooserButtonClass {
GtkComboBoxClass parent_class;
void (* custom_item_activated) (GtkAppChooserButton *self,
const gchar *item_name);
};
Property Details
The “heading” property
“heading” gchar *
The text to show at the top of the dialog that can be
opened from the button. The string may contain Pango markup.
Owner: GtkAppChooserButton
Flags: Read / Write
Default value: NULL
The “show-default-item” property
“show-default-item” gboolean
The “show-default-item” property determines
whether the dropdown menu should show the default application
on top for the provided content type.
Owner: GtkAppChooserButton
Flags: Read / Write / Construct
Default value: FALSE
Since: 3.2
The “show-dialog-item” property
“show-dialog-item” gboolean
The “show-dialog-item” property determines
whether the dropdown menu should show an item that triggers
a GtkAppChooserDialog when clicked.
Owner: GtkAppChooserButton
Flags: Read / Write / Construct
Default value: FALSE