From e0b08161d71d42f8d64ad93d5cb2f4a01e0b31d8 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 16 Feb 2016 16:30:33 +0100 Subject: [PATCH] lib: Add xdg_app_installation_get_path --- lib/xdg-app-installation.c | 13 +++++++++++++ lib/xdg-app-installation.h | 1 + 2 files changed, 14 insertions(+) diff --git a/lib/xdg-app-installation.c b/lib/xdg-app-installation.c index 8c912fc74..2be6d5256 100644 --- a/lib/xdg-app-installation.c +++ b/lib/xdg-app-installation.c @@ -155,6 +155,19 @@ xdg_app_installation_get_is_user (XdgAppInstallation *self) return xdg_app_dir_is_user (priv->dir); } +/** + * xdg_app_installation_get_path + * + * Returns: (transfer full): an #GFile + */ +GFile * +xdg_app_installation_get_path (XdgAppInstallation *self) +{ + XdgAppInstallationPrivate *priv = xdg_app_installation_get_instance_private (self); + + return g_object_ref (xdg_app_dir_get_path (priv->dir)); +} + /** * xdg_app_installation_launch: * @self: a #XdgAppInstallation diff --git a/lib/xdg-app-installation.h b/lib/xdg-app-installation.h index f45ec6fcd..c381384ec 100644 --- a/lib/xdg-app-installation.h +++ b/lib/xdg-app-installation.h @@ -79,6 +79,7 @@ typedef void (*XdgAppProgressCallback)(const char *status, gpointer user_data); XDG_APP_EXTERN gboolean xdg_app_installation_get_is_user (XdgAppInstallation *self); +XDG_APP_EXTERN GFile *xdg_app_installation_get_path (XdgAppInstallation *self); XDG_APP_EXTERN gboolean xdg_app_installation_launch (XdgAppInstallation *self, const char *name, const char *arch,