comparison src/account.c @ 11638:3a05b53a589e

[gaim-migrate @ 13914] Some bits'n'pieces: A bunch of memory leak fixes Fix newly created accounts to connect in the currently active global status Fix the modify account dialog to only show relevant user options etc. Update sametime to use some more of the new status stuff, it still needs more love though. Some s/online/available/ for consistency across prpls Fix a racyness in disconnecting connections that want to die (fixes the Yahoo crash when signing on somewhere else) Sorry if I caused any conflicts! committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 10 Oct 2005 17:59:48 +0000
parents e1e47878d0ed
children eb14bbcf7249
comparison
equal deleted inserted replaced
11637:cedd48571c90 11638:3a05b53a589e
1280 1280
1281 void 1281 void
1282 gaim_account_set_enabled(GaimAccount *account, const char *ui, 1282 gaim_account_set_enabled(GaimAccount *account, const char *ui,
1283 gboolean value) 1283 gboolean value)
1284 { 1284 {
1285 GaimConnection *gc;
1286
1285 g_return_if_fail(account != NULL); 1287 g_return_if_fail(account != NULL);
1286 g_return_if_fail(ui != NULL); 1288 g_return_if_fail(ui != NULL);
1287 1289
1288 gaim_account_set_ui_bool(account, ui, "auto-login", value); 1290 gaim_account_set_ui_bool(account, ui, "auto-login", value);
1291 gc = gaim_account_get_connection(account);
1292
1293 if ((gc != NULL) && (gc->wants_to_die == TRUE))
1294 return;
1295
1289 if (value && gaim_presence_is_online(account->presence)) 1296 if (value && gaim_presence_is_online(account->presence))
1290 gaim_account_connect(account); 1297 gaim_account_connect(account);
1291 else if (!value && !gaim_account_is_disconnected(account)) 1298 else if (!value && !gaim_account_is_disconnected(account))
1292 gaim_account_disconnect(account); 1299 gaim_account_disconnect(account);
1293 } 1300 }