diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-11-24 18:32:05 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-11-24 18:32:05 -0500 |
commit | a498d9a9bac007fb2b9b7ab3a960b853818867c2 (patch) | |
tree | 6514981cf4725c213b9fb857dd754c921c29dbee /gtk/gtkappchooser.c | |
parent | f64448473e8d718f35cc1cca04dee90499a2faee (diff) | |
download | gtk+-a498d9a9bac007fb2b9b7ab3a960b853818867c2.tar.gz |
Coding style fixups
This commit adjusts the app chooser code to GTK+ coding style:
- line up prototypes
- remove some excess {}
- remove tabs and trailing whitespace
- add docs
Diffstat (limited to 'gtk/gtkappchooser.c')
-rw-r--r-- | gtk/gtkappchooser.c | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/gtk/gtkappchooser.c b/gtk/gtkappchooser.c index 74b552bb38..1e8843a1ff 100644 --- a/gtk/gtkappchooser.c +++ b/gtk/gtkappchooser.c @@ -21,7 +21,7 @@ * Authors: Cosimo Cecchi <ccecchi@redhat.com> */ -#include <config.h> +#include "config.h" #include "gtkappchooser.h" @@ -39,11 +39,11 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface) GParamSpec *pspec; pspec = g_param_spec_string ("content-type", - P_("Content type"), - P_("The content type used by the open with object"), - NULL, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS); + P_("Content type"), + P_("The content type used by the open with object"), + NULL, + G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS); g_object_interface_install_property (iface, pspec); } @@ -55,18 +55,37 @@ gtk_app_chooser_get_content_type (GtkAppChooser *self) g_return_val_if_fail (GTK_IS_APP_CHOOSER (self), NULL); g_object_get (self, - "content-type", &retval, - NULL); + "content-type", &retval, + NULL); return retval; } +/** + * gtk_app_chooser_get_app_info: + * @self: a #GtkAppChooser + * + * Returns the currently selected application. + * + * Returns: (transfer full): a #GAppInfo for the currently selected + * application, or %NULL if none is selected. Free with g_object_unref(). + * + * Since: 3.0 + */ GAppInfo * gtk_app_chooser_get_app_info (GtkAppChooser *self) { return GTK_APP_CHOOSER_GET_IFACE (self)->get_app_info (self); } +/** + * gtk_app_chooser_refresh: + * @self: a #GtkAppChooser + * + * Reload the list of applications. + * + * Since: 3.0 + */ void gtk_app_chooser_refresh (GtkAppChooser *self) { |