-
- GtkTreeIter iter;
- gtk_list_store_append (liststore, &iter);
- gtk_list_store_set (liststore, &iter, MODEL_COL_ID, (gint)MODEST_PROTOCOL_AUTH_NONE, MODEL_COL_NAME, _("mcen_fi_advsetup_smtp_none"), -1);
-
- /* Select the None item: */
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
-
- gtk_list_store_append (liststore, &iter);
- gtk_list_store_set (liststore, &iter, MODEL_COL_ID, (gint)MODEST_PROTOCOL_AUTH_PASSWORD, MODEL_COL_NAME, _("mcen_fi_advsetup_smtp_login"), -1);
-
- gtk_list_store_append (liststore, &iter);
- gtk_list_store_set (liststore, &iter, MODEL_COL_ID, (gint)MODEST_PROTOCOL_AUTH_CRAMMD5, MODEL_COL_NAME, _("mcen_fi_advsetup_smtp_cram_md5"), -1);
+
+ protocol_registry = modest_runtime_get_protocol_registry ();
+ protocols = modest_protocol_registry_get_by_tag (protocol_registry, MODEST_PROTOCOL_REGISTRY_AUTH_PROTOCOLS);
+
+ for (node = protocols; node != NULL; node = g_slist_next (node)) {
+ ModestProtocol *protocol;
+ protocol = (ModestProtocol *) node->data;
+
+ gtk_list_store_append (liststore, &iter);
+ gtk_list_store_set (liststore, &iter,
+ MODEL_COL_ID, (gint)modest_protocol_get_type_id (protocol),
+ MODEL_COL_NAME, modest_protocol_get_display_name (protocol),
+ -1);
+ }
+ g_slist_free (protocols);