aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-10 14:52:06 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-03-19 02:49:56 +0800
commit5b1d609a54f078df47e02b3fe460f96cb367bfbc (patch)
tree3954fffe777af1cdec26249fae27d8676c71b99a
parent8fa646a63efde714d7c79379feb5bf30e95b5e6b (diff)
downloadgsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar.gz
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar.bz2
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar.lz
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar.xz
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.tar.zst
gsoc2013-empathy-5b1d609a54f078df47e02b3fe460f96cb367bfbc.zip
Implement ForgetPassword button
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c23
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.ui4
2 files changed, 27 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index f20726b61..32ee9c9e5 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -422,6 +422,27 @@ account_widget_build_skype_password_entry_focus (GtkWidget *password_entry,
}
static void
+account_widget_skype_forget_password (GtkEntry *entry,
+ GtkEntryIconPosition pos,
+ GdkEvent *event,
+ EmpathyAccountWidget *self)
+{
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+ TpAccount *account = empathy_account_settings_get_account (priv->settings);
+
+ if (pos != GTK_ENTRY_ICON_SECONDARY)
+ return;
+
+ if (account == NULL)
+ return;
+
+ DEBUG ("ForgetPassword clicked");
+
+ emp_cli_account_interface_external_password_storage_call_forget_password (
+ TP_PROXY (account), -1, NULL, NULL, NULL, NULL);
+}
+
+static void
account_widget_build_skype_get_privacy_settings_cb (TpProxy *cm,
GHashTable *props,
const GError *in_error,
@@ -735,6 +756,8 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
empathy_builder_connect (self->ui_details->gui, self,
"edit-privacy-settings-button", "clicked",
account_widget_skype_privacy_settings,
+ "entry_password", "icon-press",
+ account_widget_skype_forget_password,
NULL);
if (account != NULL)
diff --git a/libempathy-gtk/empathy-account-widget-skype.ui b/libempathy-gtk/empathy-account-widget-skype.ui
index 4c17d09a4..67fb50f5d 100644
--- a/libempathy-gtk/empathy-account-widget-skype.ui
+++ b/libempathy-gtk/empathy-account-widget-skype.ui
@@ -449,6 +449,10 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
+ <property name="secondary_icon_stock">gtk-clear</property>
+ <property name="secondary_icon_activatable">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="secondary_icon_tooltip_text">Forget the password</property>
</object>
<packing>
<property name="left_attach">1</property>