aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-22 19:56:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-25 22:13:40 +0800
commit3bda80255069253fcb801673c3c81c8d1cd4a67e (patch)
tree0ff27cbdc98587f9f8124cfe806b2ced1b102d79 /src
parentf1cca624fa83a3a1fe33a227edd4b8c6f0e0978c (diff)
downloadgsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar.gz
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar.bz2
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar.lz
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar.xz
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.tar.zst
gsoc2013-empathy-3bda80255069253fcb801673c3c81c8d1cd4a67e.zip
Don't display the salut page after the create one if there is no need to
Diffstat (limited to 'src')
-rw-r--r--src/empathy-account-assistant.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index f341fa5d0..964b69154 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -228,6 +228,22 @@ account_assistant_present_error_page (EmpathyAccountAssistant *self,
}
static void
+update_create_page_buttons (EmpathyAccountAssistant *self)
+{
+ EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
+ GtkAssistantPageType type;
+
+ if (priv->display_salut_page ||
+ priv->create_enter_resp == RESPONSE_CREATE_AGAIN)
+ type = GTK_ASSISTANT_PAGE_CONTENT;
+ else
+ type = GTK_ASSISTANT_PAGE_CONFIRM;
+
+ gtk_assistant_set_page_type (GTK_ASSISTANT (self), priv->enter_or_create_page,
+ type);
+}
+
+static void
account_assistant_reset_enter_create_page (EmpathyAccountAssistant *self)
{
EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
@@ -236,9 +252,8 @@ account_assistant_reset_enter_create_page (EmpathyAccountAssistant *self)
page = account_assistant_build_enter_or_create_page (self);
idx = gtk_assistant_append_page (GTK_ASSISTANT (self), page);
- gtk_assistant_set_page_type (GTK_ASSISTANT (self), page,
- GTK_ASSISTANT_PAGE_INTRO);
priv->enter_or_create_page = page;
+ update_create_page_buttons (self);
gtk_assistant_set_current_page (GTK_ASSISTANT (self), idx);
@@ -526,10 +541,15 @@ account_assistant_page_forward_func (gint current_page,
priv->enter_create_forward = TRUE;
retval = current_page;
}
- else
+ else if (priv->display_salut_page)
{
retval = PAGE_SALUT;
}
+ else
+ {
+ /* Don't go forward */
+ retval = -1;
+ }
}
return retval;
@@ -734,6 +754,8 @@ account_assistant_radio_create_again_clicked_cb (GtkButton *button,
"response"));
priv->create_enter_resp = response;
+
+ update_create_page_buttons (self);
}
static GtkWidget *
@@ -1109,6 +1131,8 @@ account_mgr_prepare_cb (GObject *source_object,
gtk_assistant_set_page_type (GTK_ASSISTANT (self), priv->import_page,
GTK_ASSISTANT_PAGE_CONFIRM);
+
+ update_create_page_buttons (self);
}
}