[evolution] Bug 697575 - ESourceConfig: Avoid calling check_complete() too soon
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 697575 - ESourceConfig: Avoid calling check_complete() too soon
- Date: Sat, 20 Jul 2013 21:51:25 +0000 (UTC)
commit 25737061ee2b2d5c92f3c3479ea9d812aeae1c0e
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Jul 20 17:37:47 2013 -0400
Bug 697575 - ESourceConfig: Avoid calling check_complete() too soon
Connect to the GtkComboBox::changed signal after all candidates are
added, to avoid calling e_source_config_check_complete() before the
candidate has been told to insert widgets. This can cause run-time
warnings such as:
(evolution:7106): evolution-cal-config-webcal-CRITICAL **:
cal_config_webcal_check_complete: assertion `context != NULL' failed
e-util/e-source-config.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-source-config.c b/e-util/e-source-config.c
index 6a4f2dd..ba75b7c 100644
--- a/e-util/e-source-config.c
+++ b/e-util/e-source-config.c
@@ -717,6 +717,17 @@ source_config_realize (GtkWidget *widget)
source_config_init_for_adding_source (config);
else
source_config_init_for_editing_source (config);
+
+ /* Connect this signal AFTER we're done adding candidates
+ * so we don't trigger check_complete() before candidates
+ * have a chance to insert widgets. */
+ g_signal_connect (
+ config->priv->type_combo, "changed",
+ G_CALLBACK (source_config_type_combo_changed_cb), config);
+
+ /* Trigger the callback to make sure the right page
+ * is selected, window is an appropriate size, etc. */
+ g_signal_emit_by_name (config->priv->type_combo, "changed");
}
static GList *
@@ -1020,10 +1031,6 @@ e_source_config_init (ESourceConfig *config)
gtk_widget_show (widget);
pango_attr_list_unref (attr_list);
-
- g_signal_connect (
- config->priv->type_combo, "changed",
- G_CALLBACK (source_config_type_combo_changed_cb), config);
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]