aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-10 14:26:40 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-14 18:46:47 +0800
commitbd006e65c7e0af34288b15ff1dab031536cd2816 (patch)
tree0c78eb5ae4106e48c7d2376bf2e923a0b34be6ae
parent2b808ebf2f96ada9cd0ba12ecef0205a94f93d1e (diff)
downloadgsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar.gz
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar.bz2
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar.lz
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar.xz
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.tar.zst
gsoc2013-empathy-bd006e65c7e0af34288b15ff1dab031536cd2816.zip
If the password is fake, and the user focuses in, clear the fake password
Also mark the password entry as no longer fake. This allows the user to change their password even though an old password was saved.
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index a1af69fb8..70cbc8dfc 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -405,6 +405,23 @@ account_widget_build_skype_account_properties_changed_cb (TpProxy *account,
}
static void
+account_widget_build_skype_password_entry_focus (GtkWidget *password_entry,
+ GdkEventFocus *event,
+ gpointer user_data)
+{
+ if (g_object_get_data (G_OBJECT (password_entry), "fake-password") == NULL)
+ return;
+
+ DEBUG ("Clearing fake password for editing");
+
+ gtk_entry_set_text (GTK_ENTRY (password_entry), "");
+ g_object_set_data (G_OBJECT (password_entry), "fake-password",
+ GUINT_TO_POINTER (FALSE));
+
+ /* FIXME: need to light up the apply/cancel buttons */
+}
+
+static void
account_widget_build_skype_get_privacy_settings_cb (TpProxy *cm,
GHashTable *props,
const GError *in_error,
@@ -759,6 +776,11 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
account_widget_build_skype_account_properties_changed_cb,
NULL, NULL, G_OBJECT (password_entry), NULL);
}
+
+ /* if the user changes the password, it's probably no longer a fake
+ * password */
+ g_signal_connect (password_entry, "focus-in-event",
+ G_CALLBACK (account_widget_build_skype_password_entry_focus), NULL);
}
gboolean