aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-21 05:37:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-21 05:37:47 +0800
commit25737061ee2b2d5c92f3c3479ea9d812aeae1c0e (patch)
tree44bd4da0edb007d3d1fe96143c00e73de26c5de8 /e-util
parent83478e041afa04f740618c0be21cbcffab660c97 (diff)
downloadgsoc2013-evolution-25737061ee2b2d5c92f3c3479ea9d812aeae1c0e.tar.gz
gsoc2013-evolution-25737061ee2b2d5c92f3c3479ea9d812aeae1c0e.tar.zst
gsoc2013-evolution-25737061ee2b2d5c92f3c3479ea9d812aeae1c0e.zip
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
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-source-config.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/e-util/e-source-config.c b/e-util/e-source-config.c
index 6a4f2ddf93..ba75b7c8bb 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 *