- /* is it in the conf? */
- pwd = modest_account_mgr_get_string (priv->account_mgr,
- key, MODEST_ACCOUNT_PASSWORD,
- TRUE, NULL);
- if (!pwd || strlen(pwd) == 0) {
- /* we don't have it yet. we emit a signal to get the password somewhere */
- const gchar* name = tny_account_iface_get_name (account);
- *cancel = TRUE;
- pwd = NULL;
- g_signal_emit (G_OBJECT(self), signals[PASSWORD_REQUESTED_SIGNAL], 0,
- name, &pwd, cancel);
- if (!*cancel) /* remember the password */
- modest_account_mgr_set_string (priv->account_mgr,
- key, MODEST_ACCOUNT_PASSWORD,
- pwd, TRUE, NULL);
- } else
- *cancel = FALSE;
-
+ /* is it in the hash? if it's already there, it must be wrong... */
+ already_asked = g_hash_table_lookup (priv->password_hash, key) != NULL;
+
+ /* if the password is not already there, try ModestConf */
+/* if (!already_asked) */
+ pwd = modest_account_mgr_get_string (priv->account_mgr,
+ key, MODEST_ACCOUNT_PASSWORD,
+ TRUE, NULL);
+
+/* /\* if it was already asked, it must have been wrong, so ask again *\/ */
+/* if (!already_asked || !pwd || strlen(pwd) == 0) { */
+
+/* /\* we don't have it yet. we emit a signal to get the password somewhere *\/ */
+/* const gchar* name = tny_account_get_name (account); */
+/* *cancel = TRUE; */
+/* pwd = NULL; */
+/* g_signal_emit (G_OBJECT(self), signals[PASSWORD_REQUESTED_SIGNAL], 0, */
+/* name, &pwd, cancel); */
+/* if (!*cancel) /\* remember the password *\/ */
+/* modest_account_mgr_set_string (priv->account_mgr, */
+/* key, MODEST_ACCOUNT_PASSWORD, */
+/* pwd, TRUE, NULL); */
+/* } else */
+/* *cancel = FALSE; */
+
+/* g_hash_table_insert (priv->password_hash, key, pwd); */
+