[empathy] account-widget: apply settings when activating the password entry (#625575)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] account-widget: apply settings when activating the password entry (#625575)
- Date: Fri, 3 Sep 2010 07:57:52 +0000 (UTC)
commit 76db409a25964cfb74e030c2edb426bc1aab2d6a
Author: Cyril Roelandt <tipecaml gmail com>
Date: Fri Sep 3 09:57:04 2010 +0200
account-widget: apply settings when activating the password entry (#625575)
libempathy-gtk/empathy-account-widget.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 49c1ca1..cd55b2a 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -109,6 +109,8 @@ enum {
LAST_SIGNAL
};
+static void account_widget_apply_and_log_in (EmpathyAccountWidget *);
+
static guint signals[LAST_SIGNAL] = { 0 };
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccountWidget)
@@ -357,6 +359,16 @@ password_entry_changed_cb (GtkEditable *entry,
GTK_ENTRY_ICON_SECONDARY, !EMP_STR_EMPTY (str));
}
+static void
+password_entry_activated_cb (GtkEntry *entry,
+ EmpathyAccountWidget *self)
+{
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+
+ if (gtk_widget_get_sensitive (priv->apply_button))
+ account_widget_apply_and_log_in (self);
+}
+
void
empathy_account_widget_setup_widget (EmpathyAccountWidget *self,
GtkWidget *widget,
@@ -433,6 +445,8 @@ empathy_account_widget_setup_widget (EmpathyAccountWidget *self,
G_CALLBACK (clear_icon_released_cb), self);
g_signal_connect (widget, "changed",
G_CALLBACK (password_entry_changed_cb), self);
+ g_signal_connect (widget, "activate",
+ G_CALLBACK (password_entry_activated_cb), self);
}
g_signal_connect (widget, "changed",
@@ -802,8 +816,7 @@ account_widget_applied_cb (GObject *source_object,
}
static void
-account_widget_apply_clicked_cb (GtkWidget *button,
- EmpathyAccountWidget *self)
+account_widget_apply_and_log_in (EmpathyAccountWidget *self)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
gboolean display_name_overridden;
@@ -841,6 +854,13 @@ account_widget_apply_clicked_cb (GtkWidget *button,
}
static void
+account_widget_apply_clicked_cb (GtkWidget *button,
+ EmpathyAccountWidget *self)
+{
+ account_widget_apply_and_log_in (self);
+}
+
+static void
account_widget_setup_generic (EmpathyAccountWidget *self)
{
GtkWidget *table_common_settings;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]