GTK+ 3 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
GtkAppChooserWidgetGtkAppChooserWidget — Application chooser widget that can be embedded in other widgets |
#include <gtk/gtk.h> struct GtkAppChooserWidget; GtkWidget * gtk_app_chooser_widget_new (const gchar *content_type
); void gtk_app_chooser_widget_set_show_default (GtkAppChooserWidget *self
,gboolean setting
); gboolean gtk_app_chooser_widget_get_show_default (GtkAppChooserWidget *self
); void gtk_app_chooser_widget_set_show_recommended (GtkAppChooserWidget *self
,gboolean setting
); gboolean gtk_app_chooser_widget_get_show_recommended (GtkAppChooserWidget *self
); void gtk_app_chooser_widget_set_show_fallback (GtkAppChooserWidget *self
,gboolean setting
); gboolean gtk_app_chooser_widget_get_show_fallback (GtkAppChooserWidget *self
); void gtk_app_chooser_widget_set_show_other (GtkAppChooserWidget *self
,gboolean setting
); gboolean gtk_app_chooser_widget_get_show_other (GtkAppChooserWidget *self
); void gtk_app_chooser_widget_set_show_all (GtkAppChooserWidget *self
,gboolean setting
); gboolean gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self
); void gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self
,const gchar *text
); const gchar * gtk_app_chooser_widget_get_default_text (GtkAppChooserWidget *self
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBox +----GtkAppChooserWidget
GtkAppChooserWidget implements AtkImplementorIface, GtkBuildable, GtkOrientable and GtkAppChooser.
"default-text" gchar* : Read / Write "show-all" gboolean : Read / Write / Construct "show-default" gboolean : Read / Write / Construct "show-fallback" gboolean : Read / Write / Construct "show-other" gboolean : Read / Write / Construct "show-recommended" gboolean : Read / Write / Construct
"application-activated" :Run First
"application-selected" :Run First
"populate-popup" :Run First
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.
GtkWidget * gtk_app_chooser_widget_new (const gchar *content_type
);
Creates a new GtkAppChooserWidget for applications that can handle content of the given type.
|
the content type to show applications for |
Returns : |
a newly created GtkAppChooserWidget |
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.
|
a GtkAppChooserWidget |
|
the new value for "show-default" |
Since 3.0
gboolean gtk_app_chooser_widget_get_show_default
(GtkAppChooserWidget *self
);
Returns the current value of the "show-default" property.
|
a GtkAppChooserWidget |
Returns : |
the value of "show-default" |
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.
|
a GtkAppChooserWidget |
|
the new value for "show-recommended" |
Since 3.0
gboolean gtk_app_chooser_widget_get_show_recommended
(GtkAppChooserWidget *self
);
Returns the current value of the "show-recommended" property.
|
a GtkAppChooserWidget |
Returns : |
the value of "show-recommended" |
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.
|
a GtkAppChooserWidget |
|
the new value for "show-fallback" |
Since 3.0
gboolean gtk_app_chooser_widget_get_show_fallback
(GtkAppChooserWidget *self
);
Returns the current value of the "show-fallback" property.
|
a GtkAppChooserWidget |
Returns : |
the value of "show-fallback" |
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.
|
a GtkAppChooserWidget |
|
the new value for "show-other" |
Since 3.0
gboolean gtk_app_chooser_widget_get_show_other
(GtkAppChooserWidget *self
);
Returns the current value of the "show-other" property.
|
a GtkAppChooserWidget |
Returns : |
the value of "show-other" |
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.
|
a GtkAppChooserWidget |
|
the new value for "show-all" |
Since 3.0
gboolean gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self
);
Returns the current value of the "show-all" property.
|
a GtkAppChooserWidget |
Returns : |
the value of "show-all" |
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.
|
a GtkAppChooserWidget |
|
the new value for "default-text" |
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.
|
a GtkAppChooserWidget |
Returns : |
the value of "default-text" |
Since 3.0
"default-text"
property"default-text" gchar* : Read / Write
The "default-text" property determines the text that appears
in the widget when there are no applications for the given content type.
See also gtk_app_chooser_widget_set_default_text()
.
Default value: NULL
"show-all"
property"show-all" gboolean : Read / Write / Construct
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.
Default value: FALSE
"show-default"
property"show-default" gboolean : Read / Write / Construct
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.
Default value: FALSE
"show-fallback"
property"show-fallback" gboolean : Read / Write / Construct
The "show-fallback" property determines whether the app chooser
should show a section for related applications. If FALSE
, the
related applications are listed among the other applications.
Default value: FALSE
"show-other"
property"show-other" gboolean : Read / Write / Construct
The "show-other" property determines whether the app chooser should show a section for other applications.
Default value: FALSE
"show-recommended"
property"show-recommended" gboolean : Read / Write / Construct
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.
Default value: TRUE
"application-activated"
signalvoid user_function (GtkAppChooserWidget *self,
GAppInfo *application,
gpointer user_data) : Run First
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.
|
the object which received the signal |
|
the activated GAppInfo |
|
user data set when the signal handler was connected. |
"application-selected"
signalvoid user_function (GtkAppChooserWidget *self,
GAppInfo *application,
gpointer user_data) : Run First
Emitted when an application item is selected from the widget's list.
|
the object which received the signal |
|
the selected GAppInfo |
|
user data set when the signal handler was connected. |
"populate-popup"
signalvoid user_function (GtkAppChooserWidget *self,
GtkMenu *menu,
GAppInfo *application,
gpointer user_data) : Run First
Emitted when a context menu is about to popup over an application item. Clients can insert menu items into the provided GtkMenu 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.