/soc/2013/ankitkv/gobjectification: 8efd73063ecf: Renamed buddy ...
Ankit Vani
a at nevitus.org
Tue Jul 9 06:18:47 EDT 2013
Changeset: 8efd73063ecfb3570a41e33070f7ba92f068e64b
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-09 15:48 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/8efd73063ecf
Description:
Renamed buddy list functions to more appropriate/simler names.
* Replaced purple_blist_update_node_icon() with purple_blist_node_update()
* Replaced purple_blist_update_buddy_status() with purple_buddy_update_status()
* Replaced purple_blist_rename_buddy() with purple_buddy_set_name()
* Replaced purple_blist_alias_contact() with purple_contact_set_alias()
* Replaced purple_blist_alias_chat() with purple_chat_set_alias()
* Replaced purple_blist_alias_buddy() with purple_buddy_set_local_alias()
* Replaced purple_blist_server_alias_buddy() with purple_buddy_set_server_alias()
* Replaced purple_blist_rename_group() with purple_group_set_name()
* Replaced purple_blist_merge_contact() with purple_contact_merge()
* Replaced purple_find_buddy_in_group() with purple_blist_find_buddy_in_group()
* Replaced purple_find_buddy() with purple_blist_find_buddy()
* Replaced purple_find_buddies() with purple_blist_find_buddies()
* Replaced purple_find_group() with purple_blist_find_group()
diffstat:
finch/gntblist.c | 24 +++---
finch/gntconv.c | 10 +-
finch/gntlog.c | 2 +-
finch/gntmedia.c | 2 +-
finch/gntpounce.c | 4 +-
finch/gntrequest.c | 2 +-
finch/plugins/gnthistory.c | 2 +-
finch/plugins/grouping.c | 2 +-
libpurple/account.c | 20 +++---
libpurple/blistnodetypes.c | 8 +-
libpurple/blistnodetypes.h | 4 +-
libpurple/buddyicon.c | 10 +-
libpurple/buddylist.c | 20 +++---
libpurple/buddylist.h | 12 +-
libpurple/connection.c | 2 +-
libpurple/conversation.c | 6 +-
libpurple/conversationtypes.c | 14 ++--
libpurple/ft.c | 12 +-
libpurple/log.c | 2 +-
libpurple/plugins/autoaccept.c | 2 +-
libpurple/plugins/joinpart.c | 2 +-
libpurple/plugins/log_reader.c | 8 +-
libpurple/plugins/offlinemsg.c | 2 +-
libpurple/plugins/perl/common/BuddyList.xs | 22 +++---
libpurple/plugins/psychic.c | 2 +-
libpurple/plugins/statenotify.c | 2 +-
libpurple/plugins/tcl/tcl_cmds.c | 2 +-
libpurple/protocols/bonjour/bonjour.c | 8 +-
libpurple/protocols/bonjour/bonjour_ft.c | 2 +-
libpurple/protocols/bonjour/buddy.c | 4 +-
libpurple/protocols/bonjour/jabber.c | 10 +-
libpurple/protocols/bonjour/mdns_avahi.c | 4 +-
libpurple/protocols/bonjour/mdns_win32.c | 8 +-
libpurple/protocols/gg/avatar.c | 4 +-
libpurple/protocols/gg/blist.c | 12 +-
libpurple/protocols/gg/gg.c | 2 +-
libpurple/protocols/gg/pubdir-prpl.c | 2 +-
libpurple/protocols/gg/roster.c | 22 +++---
libpurple/protocols/gg/status.c | 2 +-
libpurple/protocols/irc/msgs.c | 4 +-
libpurple/protocols/jabber/buddy.c | 2 +-
libpurple/protocols/jabber/google/google_roster.c | 6 +-
libpurple/protocols/jabber/jabber.c | 4 +-
libpurple/protocols/jabber/message.c | 4 +-
libpurple/protocols/jabber/presence.c | 6 +-
libpurple/protocols/jabber/roster.c | 22 +++---
libpurple/protocols/jabber/useravatar.c | 2 +-
libpurple/protocols/msn/contact.c | 10 +-
libpurple/protocols/msn/error.c | 6 +-
libpurple/protocols/msn/msg.c | 2 +-
libpurple/protocols/msn/msn.c | 8 +-
libpurple/protocols/msn/session.c | 2 +-
libpurple/protocols/msn/user.c | 8 +-
libpurple/protocols/msn/userlist.c | 4 +-
libpurple/protocols/mxit/multimx.c | 2 +-
libpurple/protocols/mxit/mxit.c | 6 +-
libpurple/protocols/mxit/profile.c | 2 +-
libpurple/protocols/mxit/protocol.c | 4 +-
libpurple/protocols/mxit/roster.c | 24 +++---
libpurple/protocols/mxit/voicevideo.c | 2 +-
libpurple/protocols/myspace/myspace.c | 10 +-
libpurple/protocols/myspace/user.c | 2 +-
libpurple/protocols/myspace/zap.c | 2 +-
libpurple/protocols/novell/novell.c | 24 +++---
libpurple/protocols/null/nullprpl.c | 6 +-
libpurple/protocols/oscar/authorization.c | 4 +-
libpurple/protocols/oscar/family_buddy.c | 2 +-
libpurple/protocols/oscar/family_icbm.c | 2 +-
libpurple/protocols/oscar/family_icq.c | 4 +-
libpurple/protocols/oscar/oscar.c | 32 +++++-----
libpurple/protocols/oscar/userinfo.c | 6 +-
libpurple/protocols/oscar/visibility.c | 2 +-
libpurple/protocols/sametime/sametime.c | 30 ++++----
libpurple/protocols/silc/buddy.c | 4 +-
libpurple/protocols/silc/ops.c | 4 +-
libpurple/protocols/simple/simple.c | 12 +-
libpurple/protocols/yahoo/libymsg.c | 26 ++++----
libpurple/protocols/yahoo/yahoo_aliases.c | 2 +-
libpurple/protocols/yahoo/yahoo_picture.c | 2 +-
libpurple/protocols/yahoo/yahoo_profile.c | 4 +-
libpurple/protocols/zephyr/zephyr.c | 20 +++---
libpurple/prpl.c | 18 ++--
libpurple/server.c | 8 +-
pidgin/gtkblist.c | 32 +++++-----
pidgin/gtkconv.c | 72 +++++++++++-----------
pidgin/gtkdialogs.c | 8 +-
pidgin/gtklog.c | 4 +-
pidgin/gtkmedia.c | 4 +-
pidgin/gtkpounce.c | 4 +-
pidgin/gtkutils.c | 2 +-
pidgin/gtkwhiteboard.c | 2 +-
pidgin/plugins/cap/cap.c | 4 +-
pidgin/plugins/gevolution/add_buddy_dialog.c | 2 +-
pidgin/plugins/gevolution/gevo-util.c | 4 +-
pidgin/plugins/gevolution/gevolution.c | 2 +-
pidgin/plugins/history.c | 2 +-
96 files changed, 389 insertions(+), 389 deletions(-)
diffs (truncated from 3610 to 300 lines):
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -648,7 +648,7 @@ add_buddy_cb(void *data, PurpleRequestFi
return;
}
- grp = purple_find_group(group);
+ grp = purple_blist_find_group(group);
if (!grp)
{
grp = purple_group_new(group);
@@ -657,7 +657,7 @@ add_buddy_cb(void *data, PurpleRequestFi
/* XXX: Ask to merge if there's already a buddy with the same alias in the same group (#4553) */
- if ((buddy = purple_find_buddy_in_group(account, username, grp)) == NULL)
+ if ((buddy = purple_blist_find_buddy_in_group(account, username, grp)) == NULL)
{
buddy = purple_buddy_new(account, username, alias);
purple_blist_add_buddy(buddy, NULL, grp, NULL);
@@ -759,12 +759,12 @@ add_chat_cb(void *data, PurpleRequestFie
chat = purple_chat_new(account, name, hash);
if (chat != NULL) {
- if ((grp = purple_find_group(group)) == NULL) {
+ if ((grp = purple_blist_find_group(group)) == NULL) {
grp = purple_group_new(group);
purple_blist_add_group(grp, NULL);
}
purple_blist_add_chat(chat, grp, NULL);
- purple_blist_alias_chat(chat, alias);
+ purple_chat_set_alias(chat, alias);
purple_blist_node_set_bool((PurpleBListNode*)chat, "gnt-autojoin", autojoin);
if (autojoin) {
join_chat(chat);
@@ -818,7 +818,7 @@ add_group_cb(gpointer null, const char *
return;
}
- grp = purple_find_group(group);
+ grp = purple_blist_find_group(group);
if (!grp) {
grp = purple_group_new(group);
purple_blist_add_group(grp, NULL);
@@ -1364,16 +1364,16 @@ rename_blist_node(PurpleBListNode *node,
if (PURPLE_IS_CONTACT(node)) {
PurpleContact *contact = (PurpleContact*)node;
PurpleBuddy *buddy = purple_contact_get_priority_buddy(contact);
- purple_blist_alias_contact(contact, name);
- purple_blist_alias_buddy(buddy, name);
+ purple_contact_set_alias(contact, name);
+ purple_buddy_set_local_alias(buddy, name);
serv_alias_buddy(buddy);
} else if (PURPLE_IS_BUDDY(node)) {
- purple_blist_alias_buddy((PurpleBuddy*)node, name);
+ purple_buddy_set_local_alias((PurpleBuddy*)node, name);
serv_alias_buddy((PurpleBuddy*)node);
} else if (PURPLE_IS_CHAT(node))
- purple_blist_alias_chat((PurpleChat*)node, name);
+ purple_chat_set_alias((PurpleChat*)node, name);
else if (PURPLE_IS_GROUP(node) && (name != NULL))
- purple_blist_rename_group((PurpleGroup*)node, name);
+ purple_group_set_name((PurpleGroup*)node, name);
else
g_return_if_reached();
}
@@ -1597,7 +1597,7 @@ finch_blist_place_tagged(PurpleBListNode
purple_blist_add_contact((PurpleContact*)node, tg, NULL);
} else if (tc) {
/* The target is either a buddy, or a contact. Merge with that contact. */
- purple_blist_merge_contact((PurpleContact*)node, (PurpleBListNode*)tc);
+ purple_contact_merge((PurpleContact*)node, (PurpleBListNode*)tc);
} else {
/* The target is a chat. Add the contact to the group after this chat. */
purple_blist_add_contact((PurpleContact*)node, NULL, target);
@@ -2856,7 +2856,7 @@ view_log_select_cb(gpointer data, Purple
account = purple_request_fields_get_account(fields, "account");
name = purple_request_fields_get_string(fields, "screenname");
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
if (buddy) {
contact = purple_buddy_get_contact(buddy);
} else {
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -78,7 +78,7 @@ static int color_timestamp;
static PurpleBuddy *
find_buddy_for_conversation(PurpleConversation *conv)
{
- return purple_find_buddy(purple_conversation_get_account(conv),
+ return purple_blist_find_buddy(purple_conversation_get_account(conv),
purple_conversation_get_name(conv));
}
@@ -230,7 +230,7 @@ static PurpleIMConversation *
find_im_with_contact(PurpleAccount *account, const char *name)
{
PurpleBListNode *node;
- PurpleBuddy *buddy = purple_find_buddy(account, name);
+ PurpleBuddy *buddy = purple_blist_find_buddy(account, name);
PurpleIMConversation *im = NULL;
if (!buddy)
@@ -529,7 +529,7 @@ view_log_cb(GntMenuItem *n, gpointer ggc
name = purple_conversation_get_name(conv);
account = purple_conversation_get_account(conv);
- buddies = purple_find_buddies(account, name);
+ buddies = purple_blist_find_buddies(account, name);
for (cur = buddies; cur != NULL; cur = cur->next) {
PurpleBListNode *node = cur->data;
if ((node != NULL) &&
@@ -552,7 +552,7 @@ generate_send_to_menu(FinchConv *ggc)
GSList *buds;
GList *list = NULL;
- buds = purple_find_buddies(purple_conversation_get_account(ggc->active_conv),
+ buds = purple_blist_find_buddies(purple_conversation_get_account(ggc->active_conv),
purple_conversation_get_name(ggc->active_conv));
if (!buds)
return;
@@ -1038,7 +1038,7 @@ finch_write_im(PurpleIMConversation *im,
{
PurpleBuddy *buddy;
who = purple_conversation_get_name(conv);
- buddy = purple_find_buddy(account, who);
+ buddy = purple_blist_find_buddy(account, who);
if (buddy)
who = purple_buddy_get_contact_alias(buddy);
}
diff --git a/finch/gntlog.c b/finch/gntlog.c
--- a/finch/gntlog.c
+++ b/finch/gntlog.c
@@ -407,7 +407,7 @@ void finch_log_show(PurpleLogType type,
PurpleBuddy *buddy;
if (username) {
- buddy = purple_find_buddy(account, username);
+ buddy = purple_blist_find_buddy(account, username);
if (buddy != NULL)
name = purple_buddy_get_contact_alias(buddy);
title = g_strdup_printf(_("Conversations with %s"), name);
diff --git a/finch/gntmedia.c b/finch/gntmedia.c
--- a/finch/gntmedia.c
+++ b/finch/gntmedia.c
@@ -262,7 +262,7 @@ finch_media_state_changed_cb(PurpleMedia
gchar *message = NULL;
account = purple_media_get_account(gntmedia->priv->media);
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
alias = buddy ? purple_buddy_get_contact_alias(buddy) : name;
if (type & PURPLE_MEDIA_AUDIO) {
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -558,7 +558,7 @@ finch_pounce_editor_show(PurpleAccount *
PurpleBuddy *buddy = NULL;
if (name != NULL)
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
/* Set some defaults */
if (buddy == NULL) {
@@ -789,7 +789,7 @@ pounce_cb(PurplePounce *pounce, PurplePo
pouncee = purple_pounce_get_pouncee(pounce);
account = purple_pounce_get_pouncer(pounce);
- buddy = purple_find_buddy(account, pouncee);
+ buddy = purple_blist_find_buddy(account, pouncee);
if (buddy != NULL)
{
alias = purple_buddy_get_alias(buddy);
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -412,7 +412,7 @@ update_selected_account(GntEntry *userna
GList *accounts = gnt_tree_get_rows(GNT_TREE(accountlist->dropdown));
const char *name = gnt_entry_get_text(username);
while (accounts) {
- if (purple_find_buddy(accounts->data, name)) {
+ if (purple_blist_find_buddy(accounts->data, name)) {
gnt_combo_box_set_selected(accountlist, accounts->data);
gnt_widget_draw(GNT_WIDGET(accountlist));
break;
diff --git a/finch/plugins/gnthistory.c b/finch/plugins/gnthistory.c
--- a/finch/plugins/gnthistory.c
+++ b/finch/plugins/gnthistory.c
@@ -63,7 +63,7 @@ static void historize(PurpleConversation
return;
/* Find buddies for this conversation. */
- buddies = purple_find_buddies(account, name);
+ buddies = purple_blist_find_buddies(account, name);
/* If we found at least one buddy, save the first buddy's alias. */
if (buddies != NULL)
diff --git a/finch/plugins/grouping.c b/finch/plugins/grouping.c
--- a/finch/plugins/grouping.c
+++ b/finch/plugins/grouping.c
@@ -262,7 +262,7 @@ nested_group_find_parent(PurpleBListNode
while (sep) {
*sep = 0;
- if (*(sep + 1) && (ret = (PurpleBListNode *)purple_find_group(name))) {
+ if (*(sep + 1) && (ret = (PurpleBListNode *)purple_blist_find_group(name))) {
finch_blist_manager_add_node(ret);
parent = ret;
} else if (!(ret = g_hash_table_lookup(groups, name))) {
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -1458,7 +1458,7 @@ purple_account_get_name_for_display(cons
}
username = purple_account_get_username(account);
- self = purple_find_buddy((PurpleAccount *)account, username);
+ self = purple_blist_find_buddy((PurpleAccount *)account, username);
if (self) {
const gchar *calias= purple_buddy_get_contact_alias(self);
@@ -1573,7 +1573,7 @@ purple_account_privacy_permit_add(Purple
blist_ops->save_account(account);
/* This lets the UI know a buddy has had its privacy setting changed */
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
if (buddy != NULL) {
purple_signal_emit(purple_blist_get_handle(),
"buddy-privacy-changed", buddy);
@@ -1625,7 +1625,7 @@ purple_account_privacy_permit_remove(Pur
if (blist_ops != NULL && blist_ops->save_account != NULL)
blist_ops->save_account(account);
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
if (buddy != NULL) {
purple_signal_emit(purple_blist_get_handle(),
"buddy-privacy-changed", buddy);
@@ -1676,7 +1676,7 @@ purple_account_privacy_deny_add(PurpleAc
if (blist_ops != NULL && blist_ops->save_account != NULL)
blist_ops->save_account(account);
- buddy = purple_find_buddy(account, name);
+ buddy = purple_blist_find_buddy(account, name);
if (buddy != NULL) {
purple_signal_emit(purple_blist_get_handle(),
"buddy-privacy-changed", buddy);
@@ -1712,7 +1712,7 @@ purple_account_privacy_deny_remove(Purpl
/* We didn't find the buddy we were looking for, so bail out */
return FALSE;
- buddy = purple_find_buddy(account, normalized);
+ buddy = purple_blist_find_buddy(account, normalized);
name = l->data;
priv->deny = g_slist_delete_link(priv->deny, l);
@@ -1751,12 +1751,12 @@ add_all_buddies_to_permit_list(PurpleAcc
for (list = priv->permit; list != NULL; ) {
char *person = list->data;
list = list->next;
- if (!purple_find_buddy(account, person))
+ if (!purple_blist_find_buddy(account, person))
purple_account_privacy_permit_remove(account, person, local);
}
/* Now make sure everyone in the buddylist is in the permit list */
- list = purple_find_buddies(account, NULL);
+ list = purple_blist_find_buddies(account, NULL);
while (list != NULL)
{
PurpleBuddy *buddy = list->data;
@@ -1799,7 +1799,7 @@ purple_account_privacy_allow(PurpleAccou
}
break;
case PURPLE_ACCOUNT_PRIVACY_ALLOW_BUDDYLIST:
- if (!purple_find_buddy(account, who)) {
+ if (!purple_blist_find_buddy(account, who)) {
add_all_buddies_to_permit_list(account, FALSE);
purple_account_privacy_permit_add(account, who, FALSE);
purple_account_set_privacy_type(account, PURPLE_ACCOUNT_PRIVACY_ALLOW_USERS);
@@ -1845,7 +1845,7 @@ purple_account_privacy_deny(PurpleAccoun
case PURPLE_ACCOUNT_PRIVACY_DENY_ALL:
break;
case PURPLE_ACCOUNT_PRIVACY_ALLOW_BUDDYLIST:
- if (purple_find_buddy(account, who)) {
+ if (purple_blist_find_buddy(account, who)) {
add_all_buddies_to_permit_list(account, FALSE);
purple_account_privacy_permit_remove(account, who, FALSE);
purple_account_set_privacy_type(account, PURPLE_ACCOUNT_PRIVACY_ALLOW_USERS);
@@ -1912,7 +1912,7 @@ purple_account_privacy_check(PurpleAccou
return TRUE;
case PURPLE_ACCOUNT_PRIVACY_ALLOW_BUDDYLIST:
- return (purple_find_buddy(account, who) != NULL);
More information about the Commits
mailing list