gobjectification: 34bbcc96: Removed BList from uiops
aluink at soc.pidgin.im
aluink at soc.pidgin.im
Wed Jul 15 20:55:28 EDT 2009
-----------------------------------------------------------------
Revision: 34bbcc961e079f1af02905cd16ddd52030dd0d44
Ancestor: a6aa7dea0ef464a7daaeda7854776c6b02c80384
Author: aluink at soc.pidgin.im
Date: 2009-07-16T00:37:50
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/34bbcc961e079f1af02905cd16ddd52030dd0d44
Modified files:
libpurple/blist-node.c libpurple/blist.c libpurple/blist.h
libpurple/buddy.c libpurple/chat.c libpurple/contact.c
libpurple/status.c
ChangeLog:
Removed BList from uiops
-------------- next part --------------
============================================================
--- libpurple/blist-node.c bcea2509ef5bb2d8c6260c4eef69dedce8c2e068
+++ libpurple/blist-node.c a88d16ca1af3bea86fe0721322f99d24f7129dad
@@ -163,7 +163,7 @@ purple_blist_update_node_icon(PurpleBlis
g_return_if_fail(node != NULL);
if (ops && ops->update)
- ops->update(purple_blist_get_list(), node);
+ ops->update(node);
}
============================================================
--- libpurple/blist.c 6523ee5b545a08a0c164b5b3a23f2278803cbdda
+++ libpurple/blist.c b488f7891c1e1ec4bd05bdb2d9763ab9f8dab3d3
@@ -194,7 +194,7 @@ blist_to_xmlnode(void)
/* Write groups */
child = xmlnode_new_child(node, "blist");
- gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list))
+ gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
for (; gnode != NULL; gnode = gnode->next)
{
if (!PURPLE_BLIST_NODE_SHOULD_SAVE(gnode))
@@ -417,7 +417,7 @@ void purple_blist_set_visible(gboolean s
PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
if (ops && ops->set_visible)
- ops->set_visible(purple_blist_get_list(), show);
+ ops->set_visible(show);
}
@@ -504,7 +504,7 @@ void purple_blist_rename_group(PurpleGro
/* Update the UI */
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode*)source);
+ ops->update(PURPLE_BLIST_NODE(source));
/* Notify all PRPLs */
/* TODO: Is this condition needed? Seems like it would always be TRUE */
@@ -595,7 +595,7 @@ void purple_blist_rename_buddy(PurpleBud
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(list, (PurpleBlistNode *)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
}
void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node)
@@ -701,7 +701,7 @@ void purple_blist_add_contact(PurpleCont
PURPLE_GROUP(cnode->parent)->totalsize--;
if (ops && ops->remove)
- ops->remove(list, cnode);
+ ops->remove(cnode);
purple_blist_schedule_save();
}
@@ -714,10 +714,10 @@ void purple_blist_add_contact(PurpleCont
if (ops && ops->update)
{
if (cnode->child)
- ops->update(list, cnode);
+ ops->update(cnode);
for (bnode = cnode->child; bnode; bnode = bnode->next)
- ops->update(list, bnode);
+ ops->update(bnode);
}
}
@@ -758,7 +758,7 @@ void purple_blist_add_group(PurpleGroup
/* This is just being moved */
if (ops && ops->remove)
- ops->remove(list, (PurpleBlistNode *)group);
+ ops->remove(PURPLE_BLIST_NODE(group));
purple_blist_node_remove(gnode);
}
@@ -773,9 +773,9 @@ void purple_blist_add_group(PurpleGroup
purple_blist_schedule_save();
if (ops && ops->update) {
- ops->update(list, gnode);
+ ops->update(gnode);
for (node = gnode->child; node; node = node->next)
- ops->update(list, node);
+ ops->update(node);
}
purple_signal_emit(purple_blist_get_handle(), "blist-node-added",
@@ -815,7 +815,7 @@ void purple_blist_remove_contact(PurpleC
/* Update the UI */
if (ops && ops->remove)
- ops->remove(purple_blist_get_list(), node);
+ ops->remove(node);
purple_signal_emit(purple_blist_get_handle(), "blist-node-removed",
PURPLE_BLIST_NODE(contact));
@@ -856,7 +856,7 @@ void purple_blist_remove_buddy(PurpleBud
/* Update the UI */
if (ops && ops->remove)
- ops->remove(list, node);
+ ops->remove(node);
/* Signal that the buddy has been removed before freeing the memory for it */
purple_signal_emit(purple_blist_get_handle(), "buddy-removed", buddy);
@@ -896,7 +896,7 @@ void purple_blist_remove_chat(PurpleChat
/* Update the UI */
if (ops && ops->remove)
- ops->remove(purple_blist_get_list(), node);
+ ops->remove(node);
purple_signal_emit(purple_blist_get_handle(), "blist-node-removed",
PURPLE_BLIST_NODE(chat));
@@ -921,7 +921,7 @@ purple_blist_remove_group(PurpleGroup *g
/* Update the UI */
if (ops && ops->remove)
- ops->remove(purple_blist_get_list(), node);
+ ops->remove(node);
purple_signal_emit(purple_blist_get_handle(), "blist-node-removed",
PURPLE_BLIST_NODE(group));
@@ -1007,10 +1007,10 @@ GSList *purple_find_buddies(PurpleAccoun
}
g_free(hb.name);
} else {
- GSList *list = NULL;
+ GSList *glist = NULL;
GHashTable *buddies = g_hash_table_lookup(list->buddies_cache, account);
- g_hash_table_foreach(buddies, find_acct_buddies, &list);
- ret = list;
+ g_hash_table_foreach(buddies, find_acct_buddies, &glist);
+ ret = glist;
}
return ret;
@@ -1026,7 +1026,7 @@ void purple_blist_add_account(PurpleAcco
if (!ops || !ops->update)
return;
- gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list))
+ gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
for (; gnode; gnode = gnode->next) {
if (!PURPLE_IS_GROUP(gnode))
continue;
@@ -1040,22 +1040,22 @@ void purple_blist_add_account(PurpleAcco
((PurpleContact*)cnode)->currentsize++;
if (((PurpleContact*)cnode)->currentsize == 1)
((PurpleGroup*)gnode)->currentsize++;
- ops->update(list, bnode);
+ ops->update(bnode);
}
}
if (recompute ||
purple_blist_node_get_bool(cnode, "show_offline")) {
purple_contact_invalidate_priority_buddy((PurpleContact*)cnode);
- ops->update(list, cnode);
+ ops->update(cnode);
}
} else if (PURPLE_IS_CHAT(cnode) &&
((PurpleChat*)cnode)->account == account) {
((PurpleGroup *)gnode)->online++;
((PurpleGroup *)gnode)->currentsize++;
- ops->update(list, cnode);
+ ops->update(cnode);
}
}
- ops->update(list, gnode);
+ ops->update(gnode);
}
}
@@ -1068,9 +1068,9 @@ void purple_blist_remove_account(PurpleA
PurpleContact *contact;
PurpleGroup *group;
GList *list = NULL, *iter = NULL;
- PurpleBuddyList *list = purple_blist_get_list();
+ PurpleBuddyList *blist = purple_blist_get_list();
- gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list))
+ gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(blist));
for (; gnode; gnode = gnode->next) {
if (!PURPLE_IS_GROUP(gnode))
continue;
@@ -1114,14 +1114,14 @@ void purple_blist_remove_account(PurpleA
recompute = TRUE;
if (ops && ops->remove) {
- ops->remove(list, bnode);
+ ops->remove(bnode);
}
}
}
if (recompute) {
purple_contact_invalidate_priority_buddy(contact);
if (ops && ops->update)
- ops->update(list, cnode);
+ ops->update(cnode);
}
} else if (PURPLE_IS_CHAT(cnode)) {
chat = (PurpleChat *)cnode;
@@ -1131,7 +1131,7 @@ void purple_blist_remove_account(PurpleA
group->online--;
if (ops && ops->remove)
- ops->remove(list, cnode);
+ ops->remove(cnode);
}
}
}
@@ -1196,7 +1196,7 @@ void purple_blist_add_chat(PurpleChat *c
PURPLE_GET_BLIST_NODE_CLASS(cnode->parent)->remove(cnode);
if (ops && ops->remove)
- ops->remove(list, cnode);
+ ops->remove(cnode);
/* ops->remove() cleaned up the cnode's ui_data, so we need to
* reinitialize it */
if (ops && ops->new_node)
@@ -1234,7 +1234,7 @@ void purple_blist_add_chat(PurpleChat *c
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(list, (PurpleBlistNode *)cnode);
+ ops->update(PURPLE_BLIST_NODE(cnode));
purple_signal_emit(purple_blist_get_handle(), "blist-node-added",
cnode);
@@ -1308,7 +1308,7 @@ void purple_blist_add_buddy(PurpleBuddy
bnode->parent->child = bnode->next;
if (ops && ops->remove)
- ops->remove(list, bnode);
+ ops->remove(bnode);
purple_blist_schedule_save();
@@ -1331,7 +1331,7 @@ void purple_blist_add_buddy(PurpleBuddy
} else {
purple_contact_invalidate_priority_buddy((PurpleContact*)bnode->parent);
if (ops && ops->update)
- ops->update(list, bnode->parent);
+ ops->update(bnode->parent);
}
}
@@ -1382,7 +1382,7 @@ void purple_blist_add_buddy(PurpleBuddy
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(list, (PurpleBlistNode*)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
/* Signal that the buddy has been added */
purple_signal_emit(purple_blist_get_handle(), "buddy-added", buddy);
============================================================
--- libpurple/blist.h 10be254bab3feda7127abc7cfeefd63cff5d569f
+++ libpurple/blist.h 37e2fd8d08535e02cd627e0fb8b36c6ee269c1da
@@ -63,14 +63,11 @@ struct _PurpleBlistUiOps
{
void (*new_list)(); /**< Sets UI-specific data on a buddy list. */
void (*new_node)(PurpleBlistNode *node); /**< Sets UI-specific data on a node. */
- void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */
- void (*update)(PurpleBuddyList *list,
- PurpleBlistNode *node); /**< This will update a node in the buddy list. */
- void (*remove)(PurpleBuddyList *list,
- PurpleBlistNode *node); /**< This removes a node from the list */
- void (*destroy)(PurpleBuddyList *list); /**< When the list is destroyed, this is called to destroy the UI. */
- void (*set_visible)(PurpleBuddyList *list,
- gboolean show); /**< Hides or unhides the buddy list */
+ void (*show)(); /**< The core will call this when it's finished doing its core stuff */
+ void (*update)(PurpleBlistNode *node); /**< This will update a node in the buddy list. */
+ void (*remove)(PurpleBlistNode *node); /**< This removes a node from the list */
+ void (*destroy)(); /**< When the list is destroyed, this is called to destroy the UI. */
+ void (*set_visible)(gboolean show); /**< Hides or unhides the buddy list */
void (*request_add_buddy)(PurpleAccount *account, const char *username,
const char *group, const char *alias);
void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group,
============================================================
--- libpurple/buddy.c 0f0c51b29947683f99fa50a5080c308b4319fb7b
+++ libpurple/buddy.c d8fe046406a6b4d5a1a06dc1a56271d1f9ac4c58
@@ -133,7 +133,7 @@ purple_blist_update_buddy_status(PurpleB
*/
purple_contact_invalidate_priority_buddy(purple_buddy_get_contact(buddy));
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
}
void
@@ -172,7 +172,7 @@ void purple_buddy_set_alias(PurpleBuddy
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, priv->name,
priv->account);
@@ -227,7 +227,7 @@ void purple_blist_server_alias_buddy(Pur
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, priv->name,
priv->account);
============================================================
--- libpurple/chat.c 4e29a66863b56b4eaa11901680576061e8451635
+++ libpurple/chat.c 0f8af602adb68f553c34050d7b47ac03adc38610
@@ -151,7 +151,7 @@ void purple_chat_set_alias(PurpleChat *c
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)chat);
+ ops->update(PURPLE_BLIST_NODE(chat));
purple_signal_emit(purple_blist_get_handle(), "blist-node-aliased",
chat, old_alias);
============================================================
--- libpurple/contact.c 15964a5a97cba93677ed3edb223c4d0c3520f38c
+++ libpurple/contact.c bf959f1f32bee7dcbf3ea0b6909ef73ea6e09f28
@@ -173,7 +173,7 @@ void purple_blist_alias_contact(PurpleCo
purple_blist_schedule_save();
if (ops && ops->update)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)contact);
+ ops->update(PURPLE_BLIST_NODE(contact));
for(bnode = ((PurpleBlistNode *)contact)->child; bnode != NULL; bnode = bnode->next)
{
@@ -349,7 +349,7 @@ purple_contact_remove_buddy(PurpleBlistN
if (purple_blist_node_get_first_child(PURPLE_BLIST_NODE(contact)) && contact->priority == buddy) {
purple_contact_invalidate_priority_buddy(contact);
if (ops && ops->update)
- ops->update(purple_blist_get_list(), PURPLE_BLIST_NODE(contact));
+ ops->update(PURPLE_BLIST_NODE(contact));
}
}
============================================================
--- libpurple/status.c e0d0953658866ad7b9cdb86bdd03836f4030f0f0
+++ libpurple/status.c c0107a9237c55cdf21483268238ec297719ba7f9
@@ -1341,7 +1341,7 @@ update_buddy_idle(PurpleBuddy *buddy, Pu
*/
if (ops != NULL && ops->update != NULL)
- ops->update(purple_blist_get_list(), (PurpleBlistNode *)buddy);
+ ops->update(PURPLE_BLIST_NODE(buddy));
}
void
More information about the Commits
mailing list