# HG changeset patch # User Christian Hammond # Date 1054626282 0 # Node ID 2d0d96c5a7a79d45bd4adc5da1796e08f07ffed6 # Parent 0b531823556204a13f36ea131d5d766d37e0c456 [gaim-migrate @ 6115] Added a function to clear all protocol settings from an account. committer: Tailor Script diff -r 0b5318235562 -r 2d0d96c5a7a7 src/account.c --- a/src/account.c Tue Jun 03 06:51:52 2003 +0000 +++ b/src/account.c Tue Jun 03 07:44:42 2003 +0000 @@ -308,6 +308,17 @@ } void +gaim_account_clear_settings(GaimAccount *account) +{ + g_return_if_fail(account != NULL); + + g_hash_table_destroy(account->settings); + + account->settings = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, __delete_setting); +} + +void gaim_account_set_int(GaimAccount *account, const char *name, int value) { GaimAccountSetting *setting; diff -r 0b5318235562 -r 2d0d96c5a7a7 src/account.h --- a/src/account.h Tue Jun 03 06:51:52 2003 +0000 +++ b/src/account.h Tue Jun 03 07:44:42 2003 +0000 @@ -169,6 +169,13 @@ void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); /** + * Clears all protocol-specific settings on an account. + * + * @param account The account. + */ +void gaim_account_clear_settings(GaimAccount *account); + +/** * Sets a protocol-specific integer setting for an account. * * @param account The account.