aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-10 14:16:29 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-03-15 02:46:45 +0800
commite67d78e37c14be2c3e02a8d04a06beef00d144c3 (patch)
treeee0c6e019a58cbaa8eef1c82e1312091d0b41238
parentcffc6b5f6641617ec76fe7a2d64bb75843f7bacc (diff)
downloadgsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar.gz
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar.bz2
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar.lz
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar.xz
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.tar.zst
gsoc2013-empathy-e67d78e37c14be2c3e02a8d04a06beef00d144c3.zip
Track the change notification for PasswordSaved
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index 1cb6156da..a1af69fb8 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -374,14 +374,37 @@ account_widget_build_skype_get_password_saved_cb (TpProxy *account,
DEBUG ("PasswordSaved: %s", password_saved ? "yes" : "no");
- if (password_saved)
- gtk_entry_set_text (GTK_ENTRY (password_entry), "xxxxxxxx");
+ gtk_entry_set_text (GTK_ENTRY (password_entry),
+ password_saved ? "xxxxxxxx": "");
g_object_set_data (password_entry, "fake-password",
GUINT_TO_POINTER (password_saved));
}
static void
+account_widget_build_skype_account_properties_changed_cb (TpProxy *account,
+ const char *iface,
+ GHashTable *changed,
+ const char **invalidated,
+ gpointer user_data,
+ GObject *password_entry)
+{
+ GValue *value;
+
+ if (tp_strdiff (iface,
+ EMP_IFACE_ACCOUNT_INTERFACE_EXTERNAL_PASSWORD_STORAGE))
+ return;
+
+ value = g_hash_table_lookup (changed, "PasswordSaved");
+
+ if (value == NULL)
+ return;
+
+ account_widget_build_skype_get_password_saved_cb (account, value, NULL,
+ NULL, password_entry);
+}
+
+static void
account_widget_build_skype_get_privacy_settings_cb (TpProxy *cm,
GHashTable *props,
const GError *in_error,
@@ -732,6 +755,9 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
"PasswordSaved",
account_widget_build_skype_get_password_saved_cb,
NULL, NULL, G_OBJECT (password_entry));
+ tp_cli_dbus_properties_connect_to_properties_changed (account,
+ account_widget_build_skype_account_properties_changed_cb,
+ NULL, NULL, G_OBJECT (password_entry), NULL);
}
}