diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2017-01-31 15:24:46 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2017-01-31 17:08:18 +0100 |
commit | 9e305eb9b9dfb59f450d15438a9bbf8c6a3c8639 (patch) | |
tree | 9e88bd432857e3abd4ce8499bea9792df4817a19 /src/ephy-main.c | |
parent | aff4396245565d11fb588aa68504515ff6c0585a (diff) | |
download | epiphany-9e305eb9b9dfb59f450d15438a9bbf8c6a3c8639.tar.gz |
Save state of web apps in their own gsettings path
Make the org.gnome.Epiphany.state schema relocatable and set a specific
path for web apps, or use the default one otherwise. This ensures that
web apps don't write their window geometry to the general settings and
every web app can have its own geometry no matter what window was last
closed.
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r-- | src/ephy-main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 2d5f8430d..9a441e5a3 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -380,6 +380,19 @@ main (int argc, exit (0); } + /* Setup relocatable schemas */ + if (application_mode) { + char *web_app_name; + char *path; + + web_app_name = g_path_get_basename (profile_directory); + path = g_build_path ("/", "/org/gnome/epiphany/web-apps/", web_app_name, "state/", NULL); + ephy_settings_ensure_schema_for_path (EPHY_PREFS_STATE_SCHEMA, path); + g_free (web_app_name); + g_free (path); + } else + ephy_settings_ensure_schema_for_path (EPHY_PREFS_STATE_SCHEMA, "/org/gnome/epiphany/state/"); + startup_flags = get_startup_flags (); /* Now create the shell */ |