diff options
author | James Booth <boothj5@gmail.com> | 2014-10-26 20:53:33 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-10-26 20:53:33 +0000 |
commit | d7911664e1fe0a000c06b5cf953992745341a56a (patch) | |
tree | 91f8a275e4190274e00125f167ee7ff50d622d11 /src/config | |
parent | be7c4f5a0051b61252001c5ae6cf46eed63b3bc0 (diff) | |
parent | fea8945953056012926285ecd7205b69e2a520e6 (diff) | |
download | profani-tty-d7911664e1fe0a000c06b5cf953992745341a56a.tar.gz |
Merge branch 'master' into symlinks
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/accounts.c | 20 | ||||
-rw-r--r-- | src/config/accounts.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c index b5e27127..175cac5f 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -441,6 +441,24 @@ _accounts_clear_password(const char * const account_name) } static void +_accounts_clear_server(const char * const account_name) +{ + if (accounts_account_exists(account_name)) { + g_key_file_remove_key(accounts, account_name, "server", NULL); + _save_accounts(); + } +} + +static void +_accounts_clear_port(const char * const account_name) +{ + if (accounts_account_exists(account_name)) { + g_key_file_remove_key(accounts, account_name, "port", NULL); + _save_accounts(); + } +} + +static void _accounts_clear_otr(const char * const account_name) { if (accounts_account_exists(account_name)) { @@ -869,6 +887,8 @@ accounts_init_module(void) accounts_set_priority_all = _accounts_set_priority_all; accounts_get_priority_for_presence_type = _accounts_get_priority_for_presence_type; accounts_clear_password = _accounts_clear_password; + accounts_clear_server = _accounts_clear_server; + accounts_clear_port = _accounts_clear_port; accounts_clear_otr = _accounts_clear_otr; accounts_add_otr_policy = _accounts_add_otr_policy; } diff --git a/src/config/accounts.h b/src/config/accounts.h index 299fdf0b..97c125eb 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -78,6 +78,8 @@ void (*accounts_set_priority_all)(const char * const account_name, const gint va gint (*accounts_get_priority_for_presence_type)(const char * const account_name, resource_presence_t presence_type); void (*accounts_clear_password)(const char * const account_name); +void (*accounts_clear_server)(const char * const account_name); +void (*accounts_clear_port)(const char * const account_name); void (*accounts_clear_otr)(const char * const account_name); void (*accounts_add_otr_policy)(const char * const account_name, const char * const contact_jid, const char * const policy); |