Top | ![]() |
![]() |
![]() |
![]() |
GtkAppChooserWidgetGtkAppChooserWidget — Application chooser widget that can be embedded in other widgets |
GtkAppChooserWidget is a widget for selecting applications. It is the main building block for GtkAppChooserDialog. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs.
GtkAppChooserWidget offers detailed control over what applications are shown, using the “show-default”, “show-recommended”, “show-fallback”, “show-other” and “show-all” properties. See the GtkAppChooser documentation for more information about these groups of applications.
To keep track of the selected application, use the “application-selected” and “application-activated” signals.
GtkWidget *
gtk_app_chooser_widget_new (const gchar *content_type
);
Creates a new GtkAppChooserWidget for applications that can handle content of the given type.
Since: 3.0
void gtk_app_chooser_widget_set_show_default (GtkAppChooserWidget *self
,gboolean setting
);
Sets whether the app chooser should show the default handler for the content type in a separate section.
Since: 3.0
gboolean
gtk_app_chooser_widget_get_show_default
(GtkAppChooserWidget *self
);
Returns the current value of the “show-default” property.
Since: 3.0
void gtk_app_chooser_widget_set_show_recommended (GtkAppChooserWidget *self
,gboolean setting
);
Sets whether the app chooser should show recommended applications for the content type in a separate section.
Since: 3.0
gboolean
gtk_app_chooser_widget_get_show_recommended
(GtkAppChooserWidget *self
);
Returns the current value of the “show-recommended” property.
Since: 3.0
void gtk_app_chooser_widget_set_show_fallback (GtkAppChooserWidget *self
,gboolean setting
);
Sets whether the app chooser should show related applications for the content type in a separate section.
Since: 3.0
gboolean
gtk_app_chooser_widget_get_show_fallback
(GtkAppChooserWidget *self
);
Returns the current value of the “show-fallback” property.
Since: 3.0
void gtk_app_chooser_widget_set_show_other (GtkAppChooserWidget *self
,gboolean setting
);
Sets whether the app chooser should show applications which are unrelated to the content type.
Since: 3.0
gboolean
gtk_app_chooser_widget_get_show_other (GtkAppChooserWidget *self
);
Returns the current value of the “show-other” property.
Since: 3.0
void gtk_app_chooser_widget_set_show_all (GtkAppChooserWidget *self
,gboolean setting
);
Sets whether the app chooser should show all applications in a flat list.
Since: 3.0
gboolean
gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self
);
Returns the current value of the “show-all” property.
Since: 3.0
void gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self
,const gchar *text
);
Sets the text that is shown if there are not applications that can handle the content type.
const gchar *
gtk_app_chooser_widget_get_default_text
(GtkAppChooserWidget *self
);
Returns the text that is shown if there are not applications that can handle the content type.
Since: 3.0
struct GtkAppChooserWidgetClass { GtkWidgetClass parent_class; void (* application_selected) (GtkAppChooserWidget *self, GAppInfo *app_info); void (* application_activated) (GtkAppChooserWidget *self, GAppInfo *app_info); void (* populate_popup) (GtkAppChooserWidget *self, GtkMenu *menu, GAppInfo *app_info); };