Mercurial > pidgin.yaz
comparison src/account.c @ 8134:ea3eb461efc0
[gaim-migrate @ 8839]
this makes the nifty account dropdowns reflect changes when an account is added or removed
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 17 Jan 2004 19:21:39 +0000 |
parents | fa6395637e2c |
children | 63c7a16a2c09 |
comparison
equal
deleted
inserted
replaced
8133:7616ff76fe07 | 8134:ea3eb461efc0 |
---|---|
1416 return; | 1416 return; |
1417 | 1417 |
1418 accounts = g_list_append(accounts, account); | 1418 accounts = g_list_append(accounts, account); |
1419 | 1419 |
1420 schedule_accounts_save(); | 1420 schedule_accounts_save(); |
1421 | |
1422 gaim_signal_emit(gaim_accounts_get_handle(), "account-added", account); | |
1421 } | 1423 } |
1422 | 1424 |
1423 void | 1425 void |
1424 gaim_accounts_remove(GaimAccount *account) | 1426 gaim_accounts_remove(GaimAccount *account) |
1425 { | 1427 { |
1426 g_return_if_fail(account != NULL); | 1428 g_return_if_fail(account != NULL); |
1427 | 1429 |
1428 accounts = g_list_remove(accounts, account); | 1430 accounts = g_list_remove(accounts, account); |
1429 | 1431 |
1430 schedule_accounts_save(); | 1432 schedule_accounts_save(); |
1433 | |
1434 gaim_signal_emit(gaim_accounts_get_handle(), "account-removed", account); | |
1431 } | 1435 } |
1432 | 1436 |
1433 void | 1437 void |
1434 gaim_accounts_delete(GaimAccount *account) | 1438 gaim_accounts_delete(GaimAccount *account) |
1435 { | 1439 { |
1635 gaim_marshal_VOID__POINTER_POINTER_UINT, NULL, 3, | 1639 gaim_marshal_VOID__POINTER_POINTER_UINT, NULL, 3, |
1636 gaim_value_new(GAIM_TYPE_SUBTYPE, | 1640 gaim_value_new(GAIM_TYPE_SUBTYPE, |
1637 GAIM_SUBTYPE_ACCOUNT), | 1641 GAIM_SUBTYPE_ACCOUNT), |
1638 gaim_value_new(GAIM_TYPE_STRING), | 1642 gaim_value_new(GAIM_TYPE_STRING), |
1639 gaim_value_new(GAIM_TYPE_UINT)); | 1643 gaim_value_new(GAIM_TYPE_UINT)); |
1644 | |
1645 gaim_signal_register(handle, "account-added", | |
1646 gaim_marshal_VOID__POINTER, NULL, 1, | |
1647 gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT)); | |
1648 | |
1649 gaim_signal_register(handle, "account-removed", | |
1650 gaim_marshal_VOID__POINTER, NULL, 1, | |
1651 gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT)); | |
1640 } | 1652 } |
1641 | 1653 |
1642 void | 1654 void |
1643 gaim_accounts_uninit(void) | 1655 gaim_accounts_uninit(void) |
1644 { | 1656 { |