aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-05 09:30:47 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-05 09:30:47 +0800
commitb06bf5de42fca789a03b3d9666a1f9cd3b56b71d (patch)
tree37586971a374f52ae2609e770495e0474fb0cdc4
parent77f2925266281eb12f75743dabeedb94e2493e51 (diff)
downloadgsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar.gz
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar.bz2
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar.lz
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar.xz
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.tar.zst
gsoc2013-empathy-b06bf5de42fca789a03b3d9666a1f9cd3b56b71d.zip
Always call additional_apply_async() so that the password is fed to the observer
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index 288fc039a..fb56ac561 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -461,16 +461,22 @@ account_widget_skype_additional_apply_async (EmpathyAccountWidget *self,
remember = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (remember_password));
+ DEBUG ("Setting password and remember-password (%u) on auth observer",
+ remember);
g_object_set_data_full (auth_observer, "password",
g_strdup (password), g_free);
g_object_set_data (auth_observer, "remember-password",
GUINT_TO_POINTER (remember));
- /* we have to forget the password, else psyke won't query for the new one */
- emp_cli_account_interface_external_password_storage_call_forget_password (
- TP_PROXY (account), -1,
- account_widget_skype_additional_apply_forget_passwd_cb,
- NULL, NULL, G_OBJECT (simple));
+ if (priv->contains_pending_changes)
+ {
+ /* forget the password, else psyke won't query for the new one */
+ DEBUG ("Forget the password so that Psyke queries for a new one");
+ emp_cli_account_interface_external_password_storage_call_forget_password (
+ TP_PROXY (account), -1,
+ account_widget_skype_additional_apply_forget_passwd_cb,
+ NULL, NULL, G_OBJECT (simple));
+ }
}
static gboolean
@@ -494,8 +500,6 @@ account_widget_build_skype_password_entry_focus (GtkWidget *password_entry,
{
DEBUG ("Highlighting Apply/Cancel button");
- self->ui_details->additional_apply_async =
- account_widget_skype_additional_apply_async;
empathy_account_widget_changed (self);
}
@@ -799,6 +803,10 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
TpAccount *account = empathy_account_settings_get_account (priv->settings);
GtkWidget *password_entry, *remember_password;
+ /* additional apply function */
+ self->ui_details->additional_apply_async =
+ account_widget_skype_additional_apply_async;
+
if (priv->simple || priv->creating_account)
{
GtkWidget *skype_info;