diff options
author | Xan Lopez <xan@igalia.com> | 2012-05-08 02:27:33 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-05-08 02:29:24 +0800 |
commit | 3847db0803addac9f0b90dc86767d8f65768d4ad (patch) | |
tree | baa17c614dc6b90333eeca6ab47f2629c9303546 /src | |
parent | 8c65eb746306499465f23057dbd4dea484c953aa (diff) | |
download | gsoc2013-epiphany-3847db0803addac9f0b90dc86767d8f65768d4ad.tar.gz gsoc2013-epiphany-3847db0803addac9f0b90dc86767d8f65768d4ad.tar.zst gsoc2013-epiphany-3847db0803addac9f0b90dc86767d8f65768d4ad.zip |
Allow for more fine-grained file helpers init
Since we are about to migrate our profile dir, allow file helpers init
to not ensure the profile dir exists (it was hardcoded until now). For
this we get rid of the ugly boolean parameters and add a flags
parameter, which preserves the old behaviors and allows for this new
option.
We update all the callers in the tree.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index a9b71dd89..328e506ce 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -26,6 +26,7 @@ #include "ephy-embed-prefs.h" #include "ephy-file-helpers.h" #include "ephy-private.h" +#include "ephy-profile-utils.h" #include "ephy-session.h" #include "ephy-settings.h" #include "ephy-shell.h" @@ -245,6 +246,7 @@ main (int argc, EphyStartupFlags startup_flags; EphyEmbedShellMode mode; int status; + EphyFileHelpersFlags flags; #ifdef ENABLE_NLS /* Initialize the i18n stuff */ @@ -392,9 +394,14 @@ main (int argc, ephy_profile_utils_do_migration (); /* Start our services */ - if (!ephy_file_helpers_init (profile_directory, - private_instance || application_mode, - keep_temp_directory || profile_directory, + flags = EPHY_FILE_HELPERS_ENSURE_EXISTS; + + if (private_instance || application_mode) + flags |= EPHY_FILE_HELPERS_PRIVATE_PROFILE; + if (keep_temp_directory || profile_directory) + flags |= EPHY_FILE_HELPERS_KEEP_TEMP_DIR; + + if (!ephy_file_helpers_init (profile_directory, flags, &error)) { show_error_message (&error); exit (1); |