diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-03-10 14:26:40 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-04-08 18:41:29 +0800 |
commit | c3525b083aa89976ce2d5bee876194d58c696c87 (patch) | |
tree | f412bde4f5e4e891c1b6d14990750274c6dc2a15 /libempathy-gtk | |
parent | b928cc263b24106076317dd615f452be04cd71e5 (diff) | |
download | gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar.gz gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar.bz2 gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar.lz gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar.xz gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.tar.zst gsoc2013-empathy-c3525b083aa89976ce2d5bee876194d58c696c87.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.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget-skype.c | 22 |
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 |