aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-migrate.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 09:36:04 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 09:36:04 +0800
commitfd564be3203400024147469faaa7de0884861566 (patch)
tree80e69ff89307a7393193520e0f2fe51cdc21540e /shell/e-shell-migrate.c
parent7ed5f59771262651ee8b0d29a123e43a6ac0b6c6 (diff)
downloadgsoc2013-evolution-fd564be3203400024147469faaa7de0884861566.tar.gz
gsoc2013-evolution-fd564be3203400024147469faaa7de0884861566.tar.zst
gsoc2013-evolution-fd564be3203400024147469faaa7de0884861566.zip
Clean up the EMFormat stack. Add some GObject properties to bind to.
Add some handy color conversion functions to e-util. svn path=/branches/kill-bonobo/; revision=37290
Diffstat (limited to 'shell/e-shell-migrate.c')
-rw-r--r--shell/e-shell-migrate.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index b4467028f4..aa3e1e0f97 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -85,7 +85,8 @@ shell_migrate_attempt (EShell *shell,
}
static void
-shell_migrate_get_version (gint *major,
+shell_migrate_get_version (EShell *shell,
+ gint *major,
gint *minor,
gint *micro)
{
@@ -97,9 +98,8 @@ shell_migrate_get_version (gint *major,
old_data_dir = shell_migrate_get_old_data_dir ();
key = GCONF_VERSION_KEY;
- client = gconf_client_get_default ();
+ client = e_shell_get_gconf_client (shell);
string = gconf_client_get_string (client, key, NULL);
- g_object_unref (client);
if (string != NULL) {
/* Since 1.4.0 we've kept the version key in GConf. */
@@ -206,6 +206,7 @@ e_shell_migrate_attempt (EShell *shell)
g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
+ client = e_shell_get_gconf_client (shell);
old_data_dir = shell_migrate_get_old_data_dir ();
if (sscanf (BASE_VERSION, "%d.%d", &curr_major, &curr_minor) != 2) {
@@ -215,7 +216,7 @@ e_shell_migrate_attempt (EShell *shell)
curr_micro = atoi (UPGRADE_REVISION);
- shell_migrate_get_version (&major, &minor, &micro);
+ shell_migrate_get_version (shell, &major, &minor, &micro);
if (!(curr_major > major ||
(curr_major == major && curr_minor > minor) ||
@@ -253,10 +254,8 @@ e_shell_migrate_attempt (EShell *shell)
_exit (EXIT_SUCCESS);
/* Record a successful migration. */
- client = gconf_client_get_default ();
string = g_strdup_printf ("%d.%d.%d", major, minor, micro);
gconf_client_set_string (client, GCONF_VERSION_KEY, string, NULL);
- g_object_unref (client);
g_free (string);
migrated = TRUE;
@@ -264,7 +263,6 @@ e_shell_migrate_attempt (EShell *shell)
check_old:
key = GCONF_LAST_VERSION_KEY;
- client = gconf_client_get_default ();
/* Try to retrieve the last migrated version from GConf. */
string = gconf_client_get_string (client, key, NULL);
@@ -321,8 +319,6 @@ check_old:
gconf_client_set_string (client, key, string, NULL);
g_free (string);
- g_object_unref (client);
-
return TRUE;
}