diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-29 03:16:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-29 03:16:21 +0800 |
commit | a290610bfd09fc8889c3998bcf9229afc7eb7073 (patch) | |
tree | 0b5c475a6ab3ab05c7831681e3ea68a17b555d24 /e-util | |
parent | 748918c36ea6199a83042a94e26b54db5c68076b (diff) | |
download | gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar.gz gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar.bz2 gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar.lz gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar.xz gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.tar.zst gsoc2013-evolution-a290610bfd09fc8889c3998bcf9229afc7eb7073.zip |
Bug 595812 - Crash after finishing account set up
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-config.c | 53 |
1 files changed, 19 insertions, 34 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c index db410a58ac..1c21098827 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -445,40 +445,12 @@ ec_assistant_check_current (EConfig *ec) gtk_assistant_update_buttons_state (assistant); } -static void -ec_assistant_cancel (GtkAssistant *assistant, EConfig *config) -{ - d(printf("finishing assistant, calling abort\n")); - e_config_abort (config); - - if (config->window) - gtk_widget_destroy (config->window); -} - -static void -ec_assistant_apply (GtkAssistant *assistant, EConfig *config) -{ - d(printf("finishing assistant, calling commit\n")); - e_config_commit (config); - - /* TODO: allow the commit to fail? Do we care? */ - if (config->window) - gtk_widget_destroy (config->window); -} - -static void -ec_assistant_prepare (GtkAssistant *assistant, GtkWidget *page, EConfig *config) -{ - d(printf("prepare page '%p'\n", page)); - ec_assistant_check_current (config); -} - static gint ec_assistant_forward (gint current_page, gpointer user_data) { EConfig *ec = user_data; struct _widget_node *wn; - gint next_page = current_page; + gint next_page = current_page + 1; d(printf("next page from '%d'\n", current_page)); @@ -598,11 +570,24 @@ ec_rebuild (EConfig *emp) abort(); if (item->type == E_CONFIG_ASSISTANT) { - g_signal_connect (root, "cancel", G_CALLBACK (ec_assistant_cancel), emp); - g_signal_connect (root, "close", G_CALLBACK (ec_assistant_cancel), emp); - g_signal_connect (root, "apply", G_CALLBACK (ec_assistant_apply), emp); - g_signal_connect (root, "prepare", G_CALLBACK (ec_assistant_prepare), emp); - gtk_assistant_set_forward_page_func (GTK_ASSISTANT (root), ec_assistant_forward, emp, NULL); + g_signal_connect_swapped ( + root, "apply", + G_CALLBACK (e_config_commit), emp); + g_signal_connect_swapped ( + root, "cancel", + G_CALLBACK (e_config_abort), emp); + g_signal_connect ( + root, "cancel", + G_CALLBACK (gtk_widget_destroy), emp); + g_signal_connect ( + root, "close", + G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect_swapped ( + root, "prepare", + G_CALLBACK (ec_assistant_check_current), emp); + gtk_assistant_set_forward_page_func ( + GTK_ASSISTANT (root), + ec_assistant_forward, emp, NULL); } emp->widget = root; |