Mercurial > pidgin.yaz
changeset 22246:ee80c4ab91ee
Rename 'add_buddies_in_permit' to 'add_all_buddies_to_permit_list'
which I think more accurately describes the function, and add
comments to 'purple_privacy_allow' and 'purple_privacy_deny' saying
that I think the 'local' and 'restore' parameters could be removed.
Does anyone know what those parameters are intended to be used for?
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 01 Feb 2008 17:48:53 +0000 |
parents | 31863f2d7c3c |
children | 5ffb0b5f785f |
files | libpurple/privacy.c |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/privacy.c Fri Feb 01 02:53:51 2008 +0000 +++ b/libpurple/privacy.c Fri Feb 01 17:48:53 2008 +0000 @@ -207,7 +207,7 @@ * buddy list and ONLY buddies from your buddy list. */ static void -add_buddies_in_permit(PurpleAccount *account, gboolean local) +add_all_buddies_to_permit_list(PurpleAccount *account, gboolean local) { GSList *list; @@ -230,6 +230,12 @@ } } +/* + * TODO: All callers of this function pass in FALSE for local and + * restore and I don't understand when you would ever want to + * use TRUE for either of them. I think both parameters could + * safely be removed in the next major version bump. + */ void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local, gboolean restore) @@ -259,7 +265,7 @@ break; case PURPLE_PRIVACY_ALLOW_BUDDYLIST: if (!purple_find_buddy(account, who)) { - add_buddies_in_permit(account, local); + add_all_buddies_to_permit_list(account, local); purple_privacy_permit_add(account, who, local); account->perm_deny = PURPLE_PRIVACY_ALLOW_USERS; } @@ -269,6 +275,12 @@ } } +/* + * TODO: All callers of this function pass in FALSE for local and + * restore and I don't understand when you would ever want to + * use TRUE for either of them. I think both parameters could + * safely be removed in the next major version bump. + */ void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local, gboolean restore) @@ -298,7 +310,7 @@ break; case PURPLE_PRIVACY_ALLOW_BUDDYLIST: if (purple_find_buddy(account, who)) { - add_buddies_in_permit(account, local); + add_all_buddies_to_permit_list(account, local); purple_privacy_permit_remove(account, who, local); account->perm_deny = PURPLE_PRIVACY_ALLOW_USERS; }