aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2013-05-04 00:37:11 +0800
committerGustavo Noronha Silva <gns@gnome.org>2013-05-04 03:28:13 +0800
commit5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d (patch)
treec4261b260af1955eb6dc51a148f00a99e80b5a03
parent1f6c4b033e5ff7a21a96abde2e804585e4f234f9 (diff)
downloadgsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar.gz
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar.bz2
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar.lz
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar.xz
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.tar.zst
gsoc2013-epiphany-5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d.zip
Allow running a regular standalone instance with a different profile
Adds a new standalone shell mode and removes restrictions on using --profile in a non-private, non-incognito instance of the browser. Useful for debugging or improving features that rely on being in a regular session, such as password and session saving/restoring. https://bugzilla.gnome.org/show_bug.cgi?id=699602
-rw-r--r--embed/ephy-embed-shell.h1
-rw-r--r--lib/ephy-file-helpers.c2
-rw-r--r--src/ephy-main.c13
3 files changed, 9 insertions, 7 deletions
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 37bcb9c9e..e73d3f1b3 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -46,6 +46,7 @@ typedef struct _EphyEmbedShellPrivate EphyEmbedShellPrivate;
typedef enum
{
EPHY_EMBED_SHELL_MODE_BROWSER,
+ EPHY_EMBED_SHELL_MODE_STANDALONE,
EPHY_EMBED_SHELL_MODE_PRIVATE,
EPHY_EMBED_SHELL_MODE_INCOGNITO,
EPHY_EMBED_SHELL_MODE_APPLICATION,
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index a55d45389..fd4af3898 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -319,7 +319,7 @@ ephy_file_helpers_init (const char *profile_dir,
private_profile = flags & EPHY_FILE_HELPERS_PRIVATE_PROFILE;
steal_data_from_profile = flags & EPHY_FILE_HELPERS_STEAL_DATA;
- if (private_profile && profile_dir != NULL && !steal_data_from_profile)
+ if (profile_dir != NULL && !steal_data_from_profile)
{
dot_dir = g_strdup (profile_dir);
}
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 80d076bad..665739bc3 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -334,11 +334,6 @@ main (int argc,
exit (1);
}
- if (profile_directory != NULL && private_instance == FALSE && application_mode == FALSE && incognito_mode == FALSE) {
- g_print ("--profile can only be used in combination with --private-instance, --incognito-mode or --application-mode\n");
- exit (1);
- }
-
if (application_mode && profile_directory == NULL) {
g_print ("--profile must be used when --application-mode is requested\n");
exit (1);
@@ -417,7 +412,13 @@ main (int argc,
/* Now create the shell */
if (private_instance)
mode = EPHY_EMBED_SHELL_MODE_PRIVATE;
- else if (incognito_mode) {
+ else if (profile_directory) {
+ /* This mode exists purely for letting EphyShell know it should
+ * not consider this instance part of the unique application
+ * represented by the BROWSER mode.
+ */
+ mode = EPHY_EMBED_SHELL_MODE_STANDALONE;
+ } else if (incognito_mode) {
mode = EPHY_EMBED_SHELL_MODE_INCOGNITO;
/* Use the right theming. */