From 073ef931e617ccc99c3610e9250a0e93b27ba71f Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Mon, 11 Jul 2005 14:17:15 +0000 Subject: added a idle handler that calls ec_rebuild after callback operations are 2005-07-11 Vivek Jain * e-config.c: (e_config_target_changed): added a idle handler that calls ec_rebuild after callback operations are completed. **Fixes #307794 svn path=/trunk/; revision=29721 --- e-util/e-config.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'e-util/e-config.c') diff --git a/e-util/e-config.c b/e-util/e-config.c index 064ca44a79..272b84419a 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -924,6 +924,29 @@ e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *titl return w; } +static gboolean +ec_idle_handler_for_rebuild (gpointer data) +{ + EConfig *emp = (EConfig*) data; + + ec_rebuild (emp); + if (emp->type == E_CONFIG_DRUID) { + if (emp->priv->druid_page) { + gnome_druid_set_page((GnomeDruid *)emp->widget, (GnomeDruidPage *)emp->priv->druid_page->frame); + ec_druid_check_current(emp); + } + } else { + if (emp->window) { + if (e_config_page_check(emp, NULL)) { + gtk_dialog_set_response_sensitive((GtkDialog *)emp->window, GTK_RESPONSE_OK, TRUE); + } else { + gtk_dialog_set_response_sensitive((GtkDialog *)emp->window, GTK_RESPONSE_OK, FALSE); + } + } + } + return FALSE; +} + /** * e_config_target_changed: * @emp: @@ -939,8 +962,10 @@ e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *titl **/ void e_config_target_changed(EConfig *emp, e_config_target_change_t how) { - if (how == E_CONFIG_TARGET_CHANGED_REBUILD) - ec_rebuild(emp); + if (how == E_CONFIG_TARGET_CHANGED_REBUILD) { + g_idle_add (ec_idle_handler_for_rebuild, emp); + return; + } if (emp->type == E_CONFIG_DRUID) { if (emp->priv->druid_page) { -- cgit v1.2.3