GtkAppChooserButton

GtkAppChooserButton — A button to launch an application chooser dialog

Synopsis

#include <gtk/gtk.h>

                    GtkAppChooserButton;
GtkWidget *         gtk_app_chooser_button_new          (const gchar *content_type);
void                gtk_app_chooser_button_append_custom_item
                                                        (GtkAppChooserButton *self,
                                                         const gchar *name,
                                                         const gchar *label,
                                                         GIcon *icon);
void                gtk_app_chooser_button_append_separator
                                                        (GtkAppChooserButton *self);
void                gtk_app_chooser_button_set_active_custom_item
                                                        (GtkAppChooserButton *self,
                                                         const gchar *name);
gboolean            gtk_app_chooser_button_get_show_dialog_item
                                                        (GtkAppChooserButton *self);
void                gtk_app_chooser_button_set_show_dialog_item
                                                        (GtkAppChooserButton *self,
                                                         gboolean setting);
const gchar *       gtk_app_chooser_button_get_heading  (GtkAppChooserButton *self);
void                gtk_app_chooser_button_set_heading  (GtkAppChooserButton *self,
                                                         const gchar *heading);

Description

The GtkAppChooserButton is a widget that lets the user select an application. It implements the GtkAppChooser interface.

Details

GtkAppChooserButton

typedef struct {
  GtkComboBox parent;
} GtkAppChooserButton;


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.

content_type :

the content type to show applications for

Returns :

a newly created GtkAppChooserButton

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().

self :

a GtkAppChooserButton

name :

the name of the custom item

label :

the label for the custom item

icon :

the icon for the custom item

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_active_custom_item ()

void                gtk_app_chooser_button_set_active_custom_item
                                                        (GtkAppChooserButton *self,
                                                         const gchar *name);

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.

self :

a GtkAppChooserButton

name :

the name of the custom item

Since 3.0


gtk_app_chooser_button_get_show_dialog_item ()

gboolean            gtk_app_chooser_button_get_show_dialog_item
                                                        (GtkAppChooserButton *self);

Returns the current value of the "show-dialog-item" property.

self :

a GtkAppChooserButton

Returns :

the value of "show-dialog-item"

Since 3.0


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.

self :

a GtkAppChooserButton

setting :

the new value for "show-dialog-item"

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.

self :

a GtkAppChooserButton

Returns :

the text to display at the top of the dialog, or NULL, in which case a default text is displayed

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.

self :

a GtkAppChooserButton

heading :

a string containing Pango markup