summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-06 18:11:50 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-06 18:11:50 +0100
commit8453cbb099abd8f3ab3992559750297cea7c7ce0 (patch)
tree2c08d97779237a31f18d605a12c3ec39c756720b
parent2667fa042934116d06a828767860964f52363943 (diff)
parentdd0eb39c5da72f5f0fae9bfc28072b001044b7bd (diff)
downloadtelepathy-mission-control-8453cbb099abd8f3ab3992559750297cea7c7ce0.tar.gz
Merge branch 'telepathy-mission-control-5.12'
Conflicts: NEWS configure.ac
-rw-r--r--NEWS5
-rw-r--r--src/mcd-account-manager.c16
-rw-r--r--src/mcd-account.c18
-rw-r--r--src/mcd-account.h6
-rw-r--r--tools/Makefile.am10
5 files changed, 45 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index 2b52cb03..37fd68e1 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,11 @@ Changes:
Fixes:
• Passwords are now deleted from gnome-keyring correctly (fd.o #42088, Simon)
+• When migrating Butterfly accounts to Haze, do the migration even if Butterfly
+ isn't installed, and copy the password as well as the username
+ (Debian #686835, Simon)
+• If compiled with UPower support, do not attempt to connect while going
+ to sleep (Guillaume)
• Set up the altered-one signal for account storage backends correctly
(fd.o #52231, Xavier)
• If service-activated under both names o.fd.Telepathy.MissionControl5
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index b023b42e..e0e23502 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -1246,6 +1246,7 @@ migrate_butterfly_haze_ready (McdManager *manager,
MigrateCtx *ctx = user_data;
gchar *display_name;
GValue v = {0,};
+ GValue password_v = {0,};
GHashTable *parameters, *properties;
gchar *str;
GPtrArray *supersedes;
@@ -1258,8 +1259,10 @@ migrate_butterfly_haze_ready (McdManager *manager,
goto error;
}
- /* Parameters; we just care about 'account' */
- if (!mcd_account_get_parameter (ctx->account, "account", &v, NULL))
+ /* Parameters; the only mandatory one is 'account' */
+ if (!mcd_account_get_parameter_of_known_type (ctx->account,
+ "account", G_TYPE_STRING,
+ &v, NULL))
{
_mcd_account_set_enabled (ctx->account, FALSE, TRUE, NULL);
goto error;
@@ -1268,6 +1271,15 @@ migrate_butterfly_haze_ready (McdManager *manager,
parameters = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (parameters, "account", &v);
+ /* If MC is storing the password, let's copy that too, so Empathy
+ * can migrate it somewhere better. */
+ if (mcd_account_get_parameter_of_known_type (ctx->account,
+ "password", G_TYPE_STRING,
+ &password_v, NULL))
+ {
+ g_hash_table_insert (parameters, "password", &password_v);
+ }
+
display_name = mcd_account_dup_display_name (ctx->account);
/* Properties */
diff --git a/src/mcd-account.c b/src/mcd-account.c
index b7637962..a07e1265 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -421,16 +421,28 @@ mcd_account_get_parameter (McdAccount *account, const gchar *name,
GError **error)
{
McdAccountPrivate *priv = account->priv;
- McdStorage *storage = priv->storage;
- gchar key[MAX_KEY_LENGTH];
const TpConnectionManagerParam *param;
GType type;
- const gchar *account_name = mcd_account_get_unique_name (account);
param = mcd_manager_get_protocol_param (priv->manager,
priv->protocol_name, name);
type = mc_param_type (param);
+ return mcd_account_get_parameter_of_known_type (account, name,
+ type, parameter, error);
+}
+
+gboolean
+mcd_account_get_parameter_of_known_type (McdAccount *account,
+ const gchar *name,
+ GType type,
+ GValue *parameter,
+ GError **error)
+{
+ const gchar *account_name = mcd_account_get_unique_name (account);
+ McdStorage *storage = account->priv->storage;
+ gchar key[MAX_KEY_LENGTH];
+
g_snprintf (key, sizeof (key), "param-%s", name);
if (mcd_storage_has_value (storage, account_name, key))
diff --git a/src/mcd-account.h b/src/mcd-account.h
index 06c6dfa7..458287ee 100644
--- a/src/mcd-account.h
+++ b/src/mcd-account.h
@@ -135,6 +135,12 @@ gboolean mcd_account_get_parameter (McdAccount *account, const gchar *name,
GValue *parameter,
GError **error);
+gboolean mcd_account_get_parameter_of_known_type (McdAccount *account,
+ const gchar *name,
+ GType type,
+ GValue *parameter,
+ GError **error);
+
gchar * mcd_account_dup_icon (McdAccount *self);
gchar * mcd_account_dup_nickname (McdAccount *self);
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 40a06c4e..7426080f 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -23,15 +23,15 @@ CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo
all: $(EXTRA_DIST)
libglibcodegen.py: libtpcodegen.py
- touch $@
+ $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@
glib-client-marshaller-gen.py: libglibcodegen.py
- touch $@
+ $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@
glib-ginterface-gen.py: libglibcodegen.py
- touch $@
+ $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@
glib-gtypes-generator.py: libglibcodegen.py
- touch $@
+ $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@
glib-signals-marshal-gen.py: libglibcodegen.py
- touch $@
+ $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@
TELEPATHY_GLIB_SRCDIR = $(top_srcdir)/../telepathy-glib
maintainer-update-from-telepathy-glib: