diff options
author | James Booth <boothj5@gmail.com> | 2013-08-26 14:52:14 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-08-26 14:52:14 +0100 |
commit | 080515fe85090d1fb1d7bbeec049755e228df790 (patch) | |
tree | 9db06e49352e275de151b22353644450ad03bd3a /src/config | |
parent | 550071afded1464dc04cba856bed4687a8a968a4 (diff) | |
parent | 70bbc2e34474d9a466707d90c5d56666cf27b3ae (diff) | |
download | profani-tty-080515fe85090d1fb1d7bbeec049755e228df790.tar.gz |
Merge branch 'master' into otr
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/accounts.c | 20 | ||||
-rw-r--r-- | src/config/preferences.c | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c index 3d198874..3e3daec0 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -64,9 +64,9 @@ accounts_load(void) gsize i; for (i = 0; i < naccounts; i++) { - autocomplete_add(all_ac, strdup(account_names[i])); + autocomplete_add(all_ac, account_names[i]); if (g_key_file_get_boolean(accounts, account_names[i], "enabled", NULL)) { - autocomplete_add(enabled_ac, strdup(account_names[i])); + autocomplete_add(enabled_ac, account_names[i]); } _fix_legacy_accounts(account_names[i]); @@ -138,8 +138,8 @@ accounts_add(const char *account_name, const char *altdomain) g_key_file_set_integer(accounts, account_name, "priority.dnd", 0); _save_accounts(); - autocomplete_add(all_ac, strdup(account_name)); - autocomplete_add(enabled_ac, strdup(account_name)); + autocomplete_add(all_ac, account_name); + autocomplete_add(enabled_ac, account_name); } jid_destroy(jid); @@ -260,7 +260,7 @@ accounts_enable(const char * const name) if (g_key_file_has_group(accounts, name)) { g_key_file_set_boolean(accounts, name, "enabled", TRUE); _save_accounts(); - autocomplete_add(enabled_ac, strdup(name)); + autocomplete_add(enabled_ac, name); return TRUE; } else { return FALSE; @@ -273,7 +273,7 @@ accounts_disable(const char * const name) if (g_key_file_has_group(accounts, name)) { g_key_file_set_boolean(accounts, name, "enabled", FALSE); _save_accounts(); - autocomplete_remove(enabled_ac, strdup(name)); + autocomplete_remove(enabled_ac, name); return TRUE; } else { return FALSE; @@ -317,11 +317,11 @@ accounts_rename(const char * const account_name, const char * const new_name) g_key_file_remove_group(accounts, account_name, NULL); _save_accounts(); - autocomplete_remove(all_ac, strdup(account_name)); - autocomplete_add(all_ac, strdup(new_name)); + autocomplete_remove(all_ac, account_name); + autocomplete_add(all_ac, new_name); if (g_key_file_get_boolean(accounts, new_name, "enabled", NULL)) { - autocomplete_remove(enabled_ac, strdup(account_name)); - autocomplete_add(enabled_ac, strdup(new_name)); + autocomplete_remove(enabled_ac, account_name); + autocomplete_add(enabled_ac, new_name); } return TRUE; diff --git a/src/config/preferences.c b/src/config/preferences.c index fe34e00e..1d417e41 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -77,8 +77,8 @@ prefs_load(void) } boolean_choice_ac = autocomplete_new(); - autocomplete_add(boolean_choice_ac, strdup("on")); - autocomplete_add(boolean_choice_ac, strdup("off")); + autocomplete_add(boolean_choice_ac, "on"); + autocomplete_add(boolean_choice_ac, "off"); } void |