mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 16:36:21 +00:00
implement account removal
This commit is contained in:
@@ -193,6 +193,16 @@ _accounts_add(const char *account_name, const char *altdomain, const int port)
|
||||
jid_destroy(jid);
|
||||
}
|
||||
|
||||
static int
|
||||
_accounts_remove(const char *account_name)
|
||||
{
|
||||
int r = g_key_file_remove_group(accounts, account_name, NULL);
|
||||
_save_accounts();
|
||||
autocomplete_remove(all_ac, account_name);
|
||||
autocomplete_remove(enabled_ac, account_name);
|
||||
return r;
|
||||
}
|
||||
|
||||
static gchar**
|
||||
_accounts_get_list(void)
|
||||
{
|
||||
@@ -861,6 +871,7 @@ accounts_init_module(void)
|
||||
accounts_reset_all_search = _accounts_reset_all_search;
|
||||
accounts_reset_enabled_search = _accounts_reset_enabled_search;
|
||||
accounts_add = _accounts_add;
|
||||
accounts_remove = _accounts_remove;
|
||||
accounts_get_list = _accounts_get_list;
|
||||
accounts_get_account = _accounts_get_account;
|
||||
accounts_enable = _accounts_enable;
|
||||
|
||||
@@ -50,6 +50,7 @@ char * (*accounts_find_enabled)(char *prefix);
|
||||
void (*accounts_reset_all_search)(void);
|
||||
void (*accounts_reset_enabled_search)(void);
|
||||
void (*accounts_add)(const char *jid, const char *altdomain, const int port);
|
||||
int (*accounts_remove)(const char *jid);
|
||||
gchar** (*accounts_get_list)(void);
|
||||
ProfAccount* (*accounts_get_account)(const char * const name);
|
||||
gboolean (*accounts_enable)(const char * const name);
|
||||
|
||||
Reference in New Issue
Block a user