aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-03 01:23:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-03 22:04:37 +0800
commit219e27e8fb0dd0be1514af3d30b35d95472245ee (patch)
treeda8fba5b9e9cf62a7c51e513baa10b141fab32a0 /libempathy-gtk/empathy-account-widget.c
parent24a3d8e3e4cee7272cc26d17ca3bdb8029581304 (diff)
downloadgsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar.gz
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar.bz2
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar.lz
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar.xz
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.tar.zst
gsoc2013-empathy-219e27e8fb0dd0be1514af3d30b35d95472245ee.zip
empathy_account_widget_contains_pending_changes: return TRUE if we are creating a new account which is not created yet
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index af9fbb026..a8646d2bc 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -71,6 +71,9 @@ typedef struct {
/* An EmpathyAccountWidget can be used to either create an account or
* modify it. When we are creating an account, this member is set to TRUE */
gboolean creating_account;
+ /* If we are creating a new account, this member is set to TRUE once the
+ * account has been created */
+ gboolean account_created;
EmpathyIdle *idle;
@@ -575,6 +578,7 @@ account_widget_account_enabled_cb (GObject *source_object,
GError *error = NULL;
TpAccount *account = TP_ACCOUNT (source_object);
EmpathyAccountWidget *widget = EMPATHY_ACCOUNT_WIDGET (user_data);
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (widget);
tp_account_set_enabled_finish (account, res, &error);
@@ -585,6 +589,7 @@ account_widget_account_enabled_cb (GObject *source_object,
}
else
{
+ priv->account_created = TRUE;
g_signal_emit (widget, signals[ACCOUNT_CREATED], 0);
}
}
@@ -1551,6 +1556,11 @@ empathy_account_widget_contains_pending_changes (EmpathyAccountWidget *widget)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (widget);
+ if (priv->creating_account && !priv->account_created)
+ /* We always want to warn the user if he's in the process of creating a
+ * new account which hasn't been actually created yet. */
+ return TRUE;
+
return priv->contains_pending_changes;
}