Mercurial > pidgin.yaz
changeset 5780:a9029bed0479
[gaim-migrate @ 6205]
Auto-login works again.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 07 Jun 2003 00:43:28 +0000 |
parents | 758fa27534b3 |
children | c8837160add6 |
files | src/account.c src/main.c |
diffstat | 2 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.c Sat Jun 07 00:30:09 2003 +0000 +++ b/src/account.c Sat Jun 07 00:43:28 2003 +0000 @@ -764,7 +764,6 @@ data->tag = TAG_PORT; else if (!strcmp(element_name, "settings")) { if ((value = g_hash_table_lookup(atts, "ui")) != NULL) { - gaim_debug(GAIM_DEBUG_INFO, "account", "Found ui: %s\n", value); data->setting_ui = g_strdup(value); } } @@ -876,10 +875,6 @@ } else if (data->tag == TAG_SETTING) { if (data->setting_ui != NULL) { - gaim_debug(GAIM_DEBUG_INFO, "account", - "Setting account. UI = %s, setting = %s, buffer = %s\n", - data->setting_ui, data->setting_name, buffer); - if (data->setting_type == GAIM_PREF_STRING) gaim_account_set_ui_string(data->account, data->setting_ui, data->setting_name, buffer); @@ -965,8 +960,6 @@ return FALSE; } - gaim_debug(GAIM_DEBUG_INFO, "accounts", "Reading %s\n", filename); - if (!g_file_get_contents(filename, &contents, &length, &error)) { gaim_debug(GAIM_DEBUG_ERROR, "accounts", "Error reading accounts: %s\n", error->message); @@ -1005,8 +998,6 @@ g_markup_parse_context_free(context); g_free(contents); - gaim_debug(GAIM_DEBUG_INFO, "accounts", "Finished reading %s\n", - filename); g_free(filename); accounts_loaded = TRUE; @@ -1220,11 +1211,14 @@ g_return_if_fail(ui != NULL); - for (l = gaim_connections_get_all(); l != NULL; l = l->next) { + for (l = gaim_accounts_get_all(); l != NULL; l = l->next) { account = l->data; - if (gaim_account_get_auto_login(account, ui)) + if (gaim_account_get_auto_login(account, ui) && + gaim_account_get_remember_password(account)) { + gaim_account_connect(account); + } } }
--- a/src/main.c Sat Jun 07 00:30:09 2003 +0000 +++ b/src/main.c Sat Jun 07 00:43:28 2003 +0000 @@ -178,7 +178,7 @@ if (event->button != 2) return FALSE; - /* TODO auto_login(); */ + gaim_accounts_auto_login(GAIM_GTK_UI); return TRUE; } @@ -656,7 +656,7 @@ #ifdef DEBUG opt_debug = 1; #endif -abort(); + abort(); #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); @@ -957,7 +957,7 @@ } if (!opt_acct && !opt_nologin && gaim_session == 0) - ; /* TODO auto_login(); */ + gaim_accounts_auto_login(GAIM_GTK_UI); if (opt_acct) { gaim_gtk_account_dialog_show();