aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-application.c
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-06-29 07:11:09 +0800
committerXan Lopez <xlopez@igalia.com>2011-06-29 20:53:01 +0800
commit7628d25419c00d95da3e104ad6f132f4607b78c0 (patch)
tree6cc47068b5e1dd34e1c5c341f55e3011bcb4f981 /src/ephy-application.c
parentc652dbec96495d77fb85860ce1a01008b48c56a1 (diff)
downloadgsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar.gz
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar.bz2
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar.lz
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar.xz
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.tar.zst
gsoc2013-epiphany-7628d25419c00d95da3e104ad6f132f4607b78c0.zip
ephy-application: use our private instance property
Instead of relying on ephy-file-helpers global method. Down the road we want to do this everywhere, but first we need some refactoring to be able to use EphyApplication outside of src/.
Diffstat (limited to 'src/ephy-application.c')
-rw-r--r--src/ephy-application.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ephy-application.c b/src/ephy-application.c
index a3235f8a6..969b591a3 100644
--- a/src/ephy-application.c
+++ b/src/ephy-application.c
@@ -159,7 +159,7 @@ ephy_application_startup (GApplication* application)
{
/* We're not remoting; start our services */
/* Migrate profile if we are not running a private instance */
- if (ephy_has_private_profile () == FALSE &&
+ if (!ephy_application_is_private_instance (EPHY_APPLICATION (application)) &&
ephy_profile_utils_get_migration_version () < EPHY_PROFILE_MIGRATION_VERSION) {
GError *error = NULL;
char *argv[1] = { "ephy-profile-migrator" };
@@ -433,3 +433,17 @@ ephy_application_set_startup_context (EphyApplication *application,
application->priv->startup_context = ctx;
}
+
+/**
+ * ephy_application_is_private_instance:
+ * @application: an #EphyApplication
+ *
+ * Returns: whether @application is a private instance
+ **/
+gboolean
+ephy_application_is_private_instance (EphyApplication *application)
+{
+ g_return_val_if_fail (EPHY_IS_APPLICATION (application), FALSE);
+
+ return application->priv->private_instance;
+}