[evolution/kill-bonobo] Fix EConfig bugs for Anjal's account setup.



commit 673e1177e756fdd09c0094edbcd481e3523f7622
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Fri May 22 16:33:49 2009 +0530

    Fix EConfig bugs for Anjal's account setup.
---
 e-util/e-config.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/e-util/e-config.c b/e-util/e-config.c
index 1da54b5..a2d68e1 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -532,11 +532,13 @@ ec_rebuild(EConfig *emp)
 					gnome_druid_page_edge_set_title((GnomeDruidPageEdge *)page, translated_label);
 					gnome_druid_insert_page((GnomeDruid *)druid, pagenode?(GnomeDruidPage *)pagenode->frame:NULL, (GnomeDruidPage *)page);
 				}
-				if (item->type == E_CONFIG_PAGE_FINISH) {
-					g_signal_connect(page, "back", G_CALLBACK(ec_druid_prev), wn);
-					g_signal_connect(page, "finish", G_CALLBACK(ec_druid_finish), wn);
-				} else
-					g_signal_connect(page, "next", G_CALLBACK(ec_druid_next), wn);
+				if (page) {
+					if (item->type == E_CONFIG_PAGE_FINISH) {
+						g_signal_connect(page, "back", G_CALLBACK(ec_druid_prev), wn);
+						g_signal_connect(page, "finish", G_CALLBACK(ec_druid_finish), wn);
+					} else
+						g_signal_connect(page, "next", G_CALLBACK(ec_druid_next), wn);
+				}
 				wn->frame = page;
 				wn->widget = page;
 			}
@@ -567,10 +569,11 @@ ec_rebuild(EConfig *emp)
 				page = item->factory(emp, item, root, wn->frame, wn->context->data);
 				if (emp->type == E_CONFIG_DRUID) {
 					if (page) {
-						g_return_if_fail (GNOME_IS_DRUID_PAGE_STANDARD(page));
-						connect = wn->frame != page;
-						wn->frame = page;
-						page = ((GnomeDruidPageStandard *)page)->vbox;
+						if (GNOME_IS_DRUID_PAGE_STANDARD(page)) {
+							connect = wn->frame != page;
+							wn->frame = page;
+							page = ((GnomeDruidPageStandard *)page)->vbox;
+						}
 					} else
 						wn->frame = page;
 				} else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]