diff options
author | Alexandre Mazari <alexandre.mazari@gmail.com> | 2012-03-29 02:55:08 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-03-31 09:35:59 +0800 |
commit | 2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059 (patch) | |
tree | 8e6bd1f70516c983989151a5566db8aa5954df08 /embed | |
parent | c07d7675862fb64f8addf8d92704167d2b21168d (diff) | |
download | gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar.gz gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar.bz2 gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar.lz gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar.xz gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.tar.zst gsoc2013-epiphany-2ef933ea60bcebbab86f4ca4fe7a4bf31b48e059.zip |
e-web-app-utils: add ephy_web_application_exists
Signed-off-by: Diego Escalante Urrelo <diegoe@igalia.com>
https://bugzilla.gnome.org/show_bug.cgi?id=658925
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-web-app-utils.c | 19 | ||||
-rw-r--r-- | embed/ephy-web-app-utils.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/embed/ephy-web-app-utils.c b/embed/ephy-web-app-utils.c index 0789f6ef2..aebef974c 100644 --- a/embed/ephy-web-app-utils.c +++ b/embed/ephy-web-app-utils.c @@ -463,3 +463,22 @@ ephy_web_application_free_application_list (GList *list) g_list_free (list); } + +/** + * ephy_web_application_exists: + * @name: the potential name of the web application + * + * Returns: whether an application with @name exists. + **/ +gboolean +ephy_web_application_exists (const char *name) +{ + char *profile_dir; + gboolean profile_exists; + + profile_dir = ephy_web_application_get_profile_directory (name); + profile_exists = g_file_test (profile_dir, G_FILE_TEST_IS_DIR); + g_free (profile_dir); + + return profile_exists; +} diff --git a/embed/ephy-web-app-utils.h b/embed/ephy-web-app-utils.h index b552da3e3..1ec1c0149 100644 --- a/embed/ephy-web-app-utils.h +++ b/embed/ephy-web-app-utils.h @@ -51,6 +51,8 @@ GList *ephy_web_application_get_application_list (void); void ephy_web_application_free_application_list (GList *list); +gboolean ephy_web_application_exists (const char *name); + G_END_DECLS #endif |