+ /* Free the result of modest_presets_get_providers()
+ * as specified by its documentation: */
+ g_strfreev (provider_names);
+ g_strfreev (provider_ids);
+
+ /* Add the provider protocols */
+ registry = modest_runtime_get_protocol_registry ();
+ provider_protos = modest_protocol_registry_get_by_tag (registry,
+ MODEST_PROTOCOL_REGISTRY_PROVIDER_PROTOCOLS);
+ tmp = provider_protos;
+ while (tmp) {
+ GtkTreeIter iter;
+ ModestProtocol *proto = MODEST_PROTOCOL (tmp->data);
+
+ /* only add store protocols, no need to duplicate them */
+ if (modest_protocol_registry_protocol_type_has_tag (registry,
+ modest_protocol_get_type_id (proto),
+ MODEST_PROTOCOL_REGISTRY_STORE_PROTOCOLS)) {
+ gboolean supported;
+
+ supported = modest_account_protocol_is_supported (MODEST_ACCOUNT_PROTOCOL (proto));
+
+ if (supported) {
+ const gchar *name = modest_protocol_get_display_name (proto);
+
+ gtk_list_store_append (liststore, &iter);
+ gtk_list_store_set (liststore, &iter,
+ MODEL_COL_ID, modest_protocol_get_name (proto),
+ MODEL_COL_NAME, name,
+ MODEL_COL_ID_TYPE, EASYSETUP_PROVIDER_COMBO_BOX_ID_PLUGIN_PROTOCOL,
+ -1);
+ }
+ }
+ tmp = g_slist_next (tmp);
+ }
+ g_slist_free (provider_protos);