diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-main.c | 3 | ||||
-rw-r--r-- | src/ephy-shell.c | 8 | ||||
-rw-r--r-- | src/ephy-shell.h | 2 | ||||
-rw-r--r-- | src/pdm-dialog.c | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 2b5f10261..e8e5fb1bf 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -415,7 +415,8 @@ main (int argc, g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE); /* Now create the shell */ - _ephy_shell_create_instance (private_instance); + _ephy_shell_create_instance (private_instance ? + EPHY_EMBED_SHELL_MODE_PRIVATE : EPHY_EMBED_SHELL_MODE_BROWSER); startup_flags = get_startup_flags (); ctx = ephy_shell_startup_context_new (startup_flags, diff --git a/src/ephy-shell.c b/src/ephy-shell.c index bba574161..594301ec0 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -179,7 +179,7 @@ ephy_shell_startup (GApplication* application) { /* We're not remoting; start our services */ /* Migrate profile if we are not running a private instance */ - if (!ephy_embed_shell_is_private_instance (EPHY_EMBED_SHELL (application)) && + if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (application)) != EPHY_EMBED_SHELL_MODE_PRIVATE && ephy_profile_utils_get_migration_version () < EPHY_PROFILE_MIGRATION_VERSION) { GError *error = NULL; @@ -365,7 +365,7 @@ ephy_shell_before_emit (GApplication *application, static void ephy_shell_constructed (GObject *object) { - if (ephy_embed_shell_is_private_instance (EPHY_EMBED_SHELL (object))) + if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (object)) == EPHY_EMBED_SHELL_MODE_PRIVATE) { GApplicationFlags flags; @@ -1088,13 +1088,13 @@ ephy_shell_get_prefs_dialog (EphyShell *shell) } void -_ephy_shell_create_instance (gboolean private_instance) +_ephy_shell_create_instance (EphyEmbedShellMode mode) { g_assert (ephy_shell == NULL); ephy_shell = EPHY_SHELL (g_object_new (EPHY_TYPE_SHELL, "application-id", "org.gnome.Epiphany", - "private-instance", private_instance, + "mode", mode, NULL)); /* FIXME weak ref */ g_assert (ephy_shell != NULL); diff --git a/src/ephy-shell.h b/src/ephy-shell.h index bd49a0fd9..b3d19d7a6 100644 --- a/src/ephy-shell.h +++ b/src/ephy-shell.h @@ -160,7 +160,7 @@ EphyShellStartupContext *ephy_shell_startup_context_new (EphyStartupFlags startu guint32 user_time); /* private API */ -void _ephy_shell_create_instance (gboolean private_instance); +void _ephy_shell_create_instance (EphyEmbedShellMode mode); G_END_DECLS diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index f5ce73f97..c243c16e0 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -1518,7 +1518,8 @@ pdm_dialog_init (PdmDialog *dialog) PdmDialogPrivate *priv; PdmActionInfo *cookies, *passwords; GtkWidget *window; - gboolean has_private_profile = ephy_embed_shell_is_private_instance (embed_shell); + gboolean has_private_profile = + ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_PRIVATE; priv = dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog); |