im.pidgin.pidgin: 796a61ac575e44a9b6cc29a27df3d34ad52e627b
markdoliner at pidgin.im
markdoliner at pidgin.im
Fri Feb 1 12:50:40 EST 2008
-----------------------------------------------------------------
Revision: 796a61ac575e44a9b6cc29a27df3d34ad52e627b
Ancestor: ba2fcd0ff9b6309bdae42ab4c25a628916a5cb6c
Author: markdoliner at pidgin.im
Date: 2008-02-01T17:48:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/796a61ac575e44a9b6cc29a27df3d34ad52e627b
Modified files:
libpurple/privacy.c
URL: http://d.pidgin.im/viewmtn/revision/info/796a61ac575e44a9b6cc29a27df3d34ad52e627b
ChangeLog:
URL: http://d.pidgin.im/viewmtn/revision/info/796a61ac575e44a9b6cc29a27df3d34ad52e627b
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.
URL: http://d.pidgin.im/viewmtn/revision/info/796a61ac575e44a9b6cc29a27df3d34ad52e627b
Does anyone know what those parameters are intended to be used for?
URL: http://d.pidgin.im/viewmtn/revision/info/796a61ac575e44a9b6cc29a27df3d34ad52e627b
-------------- next part --------------
============================================================
--- libpurple/privacy.c 39b8c45a9c173b8a76da5fe4ea093cac217718e9
+++ libpurple/privacy.c a843321bbd13669d76484ed3429f9fe83b7361ae
@@ -207,7 +207,7 @@ static void
* 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 @@ add_buddies_in_permit(PurpleAccount *acc
}
}
+/*
+ * 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 @@ purple_privacy_allow(PurpleAccount *acco
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 @@ purple_privacy_allow(PurpleAccount *acco
}
}
+/*
+ * 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 @@ purple_privacy_deny(PurpleAccount *accou
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;
}
More information about the Commits
mailing list