+/* We signal key changes in batches, every X seconds: */
+static gboolean
+on_timeout_notify_changes (gpointer data)
+{
+ ModestAccountMgr *self = MODEST_ACCOUNT_MGR (data);
+ ModestAccountMgrPrivate *priv = MODEST_ACCOUNT_MGR_GET_PRIVATE (self);
+
+ /* TODO: Also store the account names, and notify one list for each account,
+ * if anything uses the account names. */
+
+ if (priv->changed_conf_keys) {
+ gchar *default_account =
+ modest_account_mgr_get_default_account (self);
+
+ g_signal_emit (G_OBJECT(self), signals[ACCOUNT_CHANGED_SIGNAL], 0,
+ default_account, priv->changed_conf_keys, FALSE);
+
+ g_free (default_account);
+
+ g_slist_free (priv->changed_conf_keys);
+ priv->changed_conf_keys = NULL;
+ }
+
+ return TRUE; /* Call this again later. */
+}
+