app-chooser: update docs
This commit is contained in:
parent
51cb082022
commit
d8ef15c592
@ -38,6 +38,11 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface)
|
|||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooser:content-type:
|
||||||
|
*
|
||||||
|
* The content type of the #GtkAppChooser object.
|
||||||
|
*/
|
||||||
pspec = g_param_spec_string ("content-type",
|
pspec = g_param_spec_string ("content-type",
|
||||||
P_("Content type"),
|
P_("Content type"),
|
||||||
P_("The content type used by the open with object"),
|
P_("The content type used by the open with object"),
|
||||||
@ -47,6 +52,17 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface)
|
|||||||
g_object_interface_install_property (iface, pspec);
|
g_object_interface_install_property (iface, pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_app_chooser_get_content_type:
|
||||||
|
* @self: a #GtkAppChooser
|
||||||
|
*
|
||||||
|
* Returns the current value of the #GtkAppChooser:content-type property.
|
||||||
|
*
|
||||||
|
* Returns: the content type of @self. Free with g_free()
|
||||||
|
*
|
||||||
|
* Since: 3.0
|
||||||
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
gtk_app_chooser_get_content_type (GtkAppChooser *self)
|
gtk_app_chooser_get_content_type (GtkAppChooser *self)
|
||||||
{
|
{
|
||||||
@ -68,7 +84,7 @@ gtk_app_chooser_get_content_type (GtkAppChooser *self)
|
|||||||
* Returns the currently selected application.
|
* Returns the currently selected application.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a #GAppInfo for the currently selected
|
* Returns: (transfer full): a #GAppInfo for the currently selected
|
||||||
* application, or %NULL if none is selected. Free with g_object_unref().
|
* application, or %NULL if none is selected. Free with g_object_unref()
|
||||||
*
|
*
|
||||||
* Since: 3.0
|
* Since: 3.0
|
||||||
*/
|
*/
|
||||||
@ -82,7 +98,7 @@ gtk_app_chooser_get_app_info (GtkAppChooser *self)
|
|||||||
* gtk_app_chooser_refresh:
|
* gtk_app_chooser_refresh:
|
||||||
* @self: a #GtkAppChooser
|
* @self: a #GtkAppChooser
|
||||||
*
|
*
|
||||||
* Reload the list of applications.
|
* Reloads the list of applications.
|
||||||
*
|
*
|
||||||
* Since: 3.0
|
* Since: 3.0
|
||||||
*/
|
*/
|
||||||
|
@ -523,6 +523,15 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
|
|||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
|
||||||
g_object_class_install_property (oclass, PROP_SHOW_DIALOG_ITEM, pspec);
|
g_object_class_install_property (oclass, PROP_SHOW_DIALOG_ITEM, pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooserButton::custom-item-activated:
|
||||||
|
* @self: the object which received the signal
|
||||||
|
* @item_name: the name of the activated item
|
||||||
|
*
|
||||||
|
* Emitted when a custom item, previously added with
|
||||||
|
* gtk_app_chooser_button_append_custom_item(), is activated from the
|
||||||
|
* dropdown menu.
|
||||||
|
*/
|
||||||
signals[SIGNAL_CUSTOM_ITEM_ACTIVATED] =
|
signals[SIGNAL_CUSTOM_ITEM_ACTIVATED] =
|
||||||
g_signal_new ("custom-item-activated",
|
g_signal_new ("custom-item-activated",
|
||||||
GTK_TYPE_APP_CHOOSER_BUTTON,
|
GTK_TYPE_APP_CHOOSER_BUTTON,
|
||||||
|
@ -660,9 +660,16 @@ gtk_app_chooser_dialog_class_init (GtkAppChooserDialogClass *klass)
|
|||||||
|
|
||||||
g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");
|
g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooserDialog:gfile:
|
||||||
|
*
|
||||||
|
* The GFile used by the #GtkAppChooserDialog.
|
||||||
|
* The dialog's #GtkAppChooserWidget content type will be guessed from the
|
||||||
|
* file, if present.
|
||||||
|
*/
|
||||||
pspec = g_param_spec_object ("gfile",
|
pspec = g_param_spec_object ("gfile",
|
||||||
P_("GFile"),
|
P_("GFile"),
|
||||||
P_("The GFile used by the open with dialog"),
|
P_("The GFile used by the app chooser dialog"),
|
||||||
G_TYPE_FILE,
|
G_TYPE_FILE,
|
||||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
|
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
@ -1069,6 +1069,13 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
|||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);
|
g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooserWidget::application-selected:
|
||||||
|
* @self: the object which received the signal
|
||||||
|
* @application: the selected #GAppInfo
|
||||||
|
*
|
||||||
|
* Emitted when an application item is selected from the widget's list.
|
||||||
|
*/
|
||||||
signals[SIGNAL_APPLICATION_SELECTED] =
|
signals[SIGNAL_APPLICATION_SELECTED] =
|
||||||
g_signal_new ("application-selected",
|
g_signal_new ("application-selected",
|
||||||
GTK_TYPE_APP_CHOOSER_WIDGET,
|
GTK_TYPE_APP_CHOOSER_WIDGET,
|
||||||
@ -1079,6 +1086,16 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1, G_TYPE_APP_INFO);
|
1, G_TYPE_APP_INFO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooserWidget::application-activated:
|
||||||
|
* @self: the object which received the signal
|
||||||
|
* @application: the activated #GAppInfo
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
signals[SIGNAL_APPLICATION_ACTIVATED] =
|
signals[SIGNAL_APPLICATION_ACTIVATED] =
|
||||||
g_signal_new ("application-activated",
|
g_signal_new ("application-activated",
|
||||||
GTK_TYPE_APP_CHOOSER_WIDGET,
|
GTK_TYPE_APP_CHOOSER_WIDGET,
|
||||||
@ -1089,6 +1106,17 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1, G_TYPE_APP_INFO);
|
1, G_TYPE_APP_INFO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkAppChooserWidget::populate-popup:
|
||||||
|
* @self: the object which received the signal
|
||||||
|
* @menu: the #GtkMenu to populate
|
||||||
|
* @application: the current #GAppInfo
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
signals[SIGNAL_POPULATE_POPUP] =
|
signals[SIGNAL_POPULATE_POPUP] =
|
||||||
g_signal_new ("populate-popup",
|
g_signal_new ("populate-popup",
|
||||||
GTK_TYPE_APP_CHOOSER_WIDGET,
|
GTK_TYPE_APP_CHOOSER_WIDGET,
|
||||||
|
Loading…
Reference in New Issue
Block a user