summaryrefslogtreecommitdiff
path: root/lib/ephy-web-app-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-web-app-utils.c')
-rw-r--r--lib/ephy-web-app-utils.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 086d794b7..d89bdca58 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -963,3 +963,20 @@ ephy_web_application_save (EphyWebApplication *app)
return saved;
}
+
+gboolean
+ephy_web_application_is_system (EphyWebApplication *app)
+{
+ GSettings *web_app_settings;
+ g_autofree char *profile_directory = NULL;
+ g_autofree char *name = NULL;
+ g_autofree char *path = NULL;
+
+ profile_directory = ephy_web_application_get_profile_directory (app->id);
+ name = g_path_get_basename (profile_directory);
+
+ path = g_build_path ("/", "/org/gnome/epiphany/web-apps/", name, "webapp/", NULL);
+ web_app_settings = g_settings_new_with_path (EPHY_PREFS_WEB_APP_SCHEMA, path);
+
+ return g_settings_get_boolean (web_app_settings, EPHY_PREFS_WEB_APP_SYSTEM);
+}