| Top |
CtkAppChooserWidgetCtkAppChooserWidget — Application chooser widget that can be embedded in other widgets |
| CtkWidget * | ctk_app_chooser_widget_new () |
| void | ctk_app_chooser_widget_set_show_default () |
| gboolean | ctk_app_chooser_widget_get_show_default () |
| void | ctk_app_chooser_widget_set_show_recommended () |
| gboolean | ctk_app_chooser_widget_get_show_recommended () |
| void | ctk_app_chooser_widget_set_show_fallback () |
| gboolean | ctk_app_chooser_widget_get_show_fallback () |
| void | ctk_app_chooser_widget_set_show_other () |
| gboolean | ctk_app_chooser_widget_get_show_other () |
| void | ctk_app_chooser_widget_set_show_all () |
| gboolean | ctk_app_chooser_widget_get_show_all () |
| void | ctk_app_chooser_widget_set_default_text () |
| const gchar * | ctk_app_chooser_widget_get_default_text () |
| char * | default-text | Read / Write |
| gboolean | show-all | Read / Write / Construct |
| gboolean | show-default | Read / Write / Construct |
| gboolean | show-fallback | Read / Write / Construct |
| gboolean | show-other | Read / Write / Construct |
| gboolean | show-recommended | Read / Write / Construct |
| void | application-activated | Run First |
| void | application-selected | Run First |
| void | populate-popup | Run First |
GObject
╰── GInitiallyUnowned
╰── CtkWidget
╰── CtkContainer
╰── CtkBox
╰── CtkAppChooserWidget
CtkAppChooserWidget implements AtkImplementorIface, CtkBuildable, CtkOrientable and CtkAppChooser.
CtkAppChooserWidget is a widget for selecting applications. It is the main building block for CtkAppChooserDialog. 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.
CtkAppChooserWidget offers detailed control over what applications are shown, using the “show-default”, “show-recommended”, “show-fallback”, “show-other” and “show-all” properties. See the CtkAppChooser documentation for more information about these groups of applications.
To keep track of the selected application, use the “application-selected” and “application-activated” signals.
CtkWidget *
ctk_app_chooser_widget_new (const gchar *content_type);
Creates a new CtkAppChooserWidget for applications that can handle content of the given type.
Since: 3.0
void ctk_app_chooser_widget_set_show_default (CtkAppChooserWidget *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
ctk_app_chooser_widget_get_show_default
(CtkAppChooserWidget *self);
Returns the current value of the “show-default” property.
Since: 3.0
void ctk_app_chooser_widget_set_show_recommended (CtkAppChooserWidget *self,gboolean setting);
Sets whether the app chooser should show recommended applications for the content type in a separate section.
Since: 3.0
gboolean
ctk_app_chooser_widget_get_show_recommended
(CtkAppChooserWidget *self);
Returns the current value of the “show-recommended” property.
Since: 3.0
void ctk_app_chooser_widget_set_show_fallback (CtkAppChooserWidget *self,gboolean setting);
Sets whether the app chooser should show related applications for the content type in a separate section.
Since: 3.0
gboolean
ctk_app_chooser_widget_get_show_fallback
(CtkAppChooserWidget *self);
Returns the current value of the “show-fallback” property.
Since: 3.0
void ctk_app_chooser_widget_set_show_other (CtkAppChooserWidget *self,gboolean setting);
Sets whether the app chooser should show applications which are unrelated to the content type.
Since: 3.0
gboolean
ctk_app_chooser_widget_get_show_other (CtkAppChooserWidget *self);
Returns the current value of the “show-other” property.
Since: 3.0
void ctk_app_chooser_widget_set_show_all (CtkAppChooserWidget *self,gboolean setting);
Sets whether the app chooser should show all applications in a flat list.
Since: 3.0
gboolean
ctk_app_chooser_widget_get_show_all (CtkAppChooserWidget *self);
Returns the current value of the “show-all” property.
Since: 3.0
void ctk_app_chooser_widget_set_default_text (CtkAppChooserWidget *self,const gchar *text);
Sets the text that is shown if there are not applications that can handle the content type.
const gchar *
ctk_app_chooser_widget_get_default_text
(CtkAppChooserWidget *self);
Returns the text that is shown if there are not applications that can handle the content type.
Since: 3.0
struct CtkAppChooserWidgetClass {
CtkBoxClass parent_class;
void (* application_selected) (CtkAppChooserWidget *self,
GAppInfo *app_info);
void (* application_activated) (CtkAppChooserWidget *self,
GAppInfo *app_info);
void (* populate_popup) (CtkAppChooserWidget *self,
CtkMenu *menu,
GAppInfo *app_info);
};
“default-text” property “default-text” char *
The “default-text” property determines the text
that appears in the widget when there are no applications for the
given content type.
See also ctk_app_chooser_widget_set_default_text().
Owner: CtkAppChooserWidget
Flags: Read / Write
Default value: NULL
“show-all” property “show-all” gboolean
If the “show-all” property is TRUE, the app
chooser presents all applications in a single list, without
subsections for default, recommended or related applications.
Owner: CtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
“show-default” property “show-default” gboolean
The ::show-default property determines whether the app chooser
should show the default handler for the content type in a
separate section. If FALSE, the default handler is listed
among the recommended applications.
Owner: CtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
“show-fallback” property “show-fallback” gboolean
The “show-fallback” property determines whether
the app chooser should show a section for fallback applications.
If FALSE, the fallback applications are listed among the other
applications.
Owner: CtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
“show-other” property “show-other” gboolean
The “show-other” property determines whether the app chooser should show a section for other applications.
Owner: CtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
“show-recommended” property “show-recommended” gboolean
The “show-recommended” property determines
whether the app chooser should show a section for recommended
applications. If FALSE, the recommended applications are listed
among the other applications.
Owner: CtkAppChooserWidget
Flags: Read / Write / Construct
Default value: TRUE
“application-activated” signalvoid user_function (CtkAppChooserWidget *self, GAppInfo *application, gpointer user_data)
Emitted when an application item is activated from the widget's list.
This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.
self |
the object which received the signal |
|
application |
the activated GAppInfo |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“application-selected” signalvoid user_function (CtkAppChooserWidget *self, GAppInfo *application, gpointer user_data)
Emitted when an application item is selected from the widget's list.
self |
the object which received the signal |
|
application |
the selected GAppInfo |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“populate-popup” signalvoid user_function (CtkAppChooserWidget *self, CtkMenu *menu, GAppInfo *application, gpointer user_data)
Emitted when a context menu is about to popup over an application item. Clients can insert menu items into the provided CtkMenu object in the callback of this signal; the context menu will be shown over the item if at least one item has been added to the menu.
self |
the object which received the signal |
|
menu |
the CtkMenu to populate |
|
application |
the current GAppInfo |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First