aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-10 14:26:40 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-03-15 02:46:45 +0800
commit49e91cc1315d6cb762650810cacfa3bb56f5ff3c (patch)
tree599473e9f5c432d5f4b8196467d3f644f7899322
parente67d78e37c14be2c3e02a8d04a06beef00d144c3 (diff)
downloadgsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar.gz
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar.bz2
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar.lz
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar.xz
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.tar.zst
gsoc2013-empathy-49e91cc1315d6cb762650810cacfa3bb56f5ff3c.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