[epiphany] Allow running a regular standalone instance with a different profile
- From: Gustavo Noronha Silva <gns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Allow running a regular standalone instance with a different profile
- Date: Fri, 3 May 2013 19:28:31 +0000 (UTC)
commit 5ee94f4954f6e4b49eabeafd6a9bd6ee925f395d
Author: Gustavo Noronha Silva <gns gnome org>
Date: Fri May 3 09:37:11 2013 -0700
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
embed/ephy-embed-shell.h | 1 +
lib/ephy-file-helpers.c | 2 +-
src/ephy-main.c | 13 +++++++------
3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 37bcb9c..e73d3f1 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 a55d453..fd4af38 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 80d076b..665739b 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]