summaryrefslogtreecommitdiff
path: root/src/mcd-account-manager.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-14 13:23:11 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-14 13:39:36 +0000
commitc0dba4b307cbc965bec3a325373e11a706dda7fe (patch)
tree54c9bd3e647653afb92acaadcb5bb4508cb6cafc /src/mcd-account-manager.c
parentd9a702e8c7dfd80c0f7064824e4bf9498c420cf3 (diff)
Set the Supersedes property on migrated Butterfly accounts
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42814 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'src/mcd-account-manager.c')
-rw-r--r--src/mcd-account-manager.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 69725414..b21f0289 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -4,7 +4,7 @@
* This file is part of mission-control
*
* Copyright © 2007-2011 Nokia Corporation.
- * Copyright © 2009-2011 Collabora Ltd.
+ * Copyright © 2009-2012 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -1212,6 +1212,8 @@ migrate_butterfly_haze_ready (McdManager *manager,
GValue v = {0,};
GHashTable *parameters, *properties;
gchar *str;
+ GPtrArray *supersedes;
+ GPtrArray *old_supersedes;
if (error != NULL)
{
@@ -1246,6 +1248,23 @@ migrate_butterfly_haze_ready (McdManager *manager,
if (str != NULL)
tp_asv_take_string (properties, TP_PROP_ACCOUNT_NICKNAME, str);
+ supersedes = g_ptr_array_new ();
+ old_supersedes = _mcd_account_get_supersedes (ctx->account);
+
+ if (old_supersedes != NULL)
+ {
+ guint i;
+
+ for (i = 0; i < old_supersedes->len; i++)
+ g_ptr_array_add (supersedes,
+ g_strdup (g_ptr_array_index (old_supersedes, i)));
+ }
+
+ g_ptr_array_add (supersedes,
+ g_strdup (mcd_account_get_object_path (ctx->account)));
+ tp_asv_take_boxed (properties, TP_PROP_ACCOUNT_SUPERSEDES,
+ TP_ARRAY_TYPE_OBJECT_PATH_LIST, supersedes);
+
/* Set the service while we're on it */
tp_asv_set_string (properties, TP_PROP_ACCOUNT_SERVICE, "windows-live");