gobjectification: 74342447: And even more blist node operations. But...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Nov 8 03:31:27 EST 2009
-----------------------------------------------------------------
Revision: 74342447d6bedef2342be755c06597e6fdc15f6f
Ancestor: 24bf683dd574f099989af05d1b8b700dbc9d66e3
Author: qulogic at pidgin.im
Date: 2009-11-08T06:55:14
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/74342447d6bedef2342be755c06597e6fdc15f6f
Modified files:
finch/gntconv.c finch/gntlog.c finch/gntpounce.c
finch/gntrequest.c
ChangeLog:
And even more blist node operations. But not in Finch's main blist source
code.
-------------- next part --------------
============================================================
--- finch/gntconv.c 0eb3cf681437f2e5ea292d95c66b8ba030998ad7
+++ finch/gntconv.c a647879397d692940d45d0fa54eed465c634462e
@@ -96,7 +96,7 @@ get_conversation_blist_node(PurpleConver
switch (purple_conversation_get_type(conv)) {
case PURPLE_CONV_TYPE_IM:
node = (PurpleBlistNode*)find_buddy_for_conversation(conv);
- node = node ? purple_blist_node_get_parent(node) : NULL;
+ node = node ? purple_blist_node_parent(node) : NULL;
break;
case PURPLE_CONV_TYPE_CHAT:
node = (PurpleBlistNode*)find_chat_for_conversation(conv);
@@ -250,8 +250,8 @@ find_conv_with_contact(PurpleAccount *ac
if (!buddy)
return NULL;
- for (node = purple_blist_node_get_first_child(purple_blist_node_get_parent((PurpleBlistNode*)buddy));
- node; node = purple_blist_node_get_sibling_next(node)) {
+ for (node = purple_blist_node_first_child(purple_blist_node_parent((PurpleBlistNode*)buddy));
+ node; node = purple_blist_node_next(node)) {
if (node == (PurpleBlistNode*)buddy)
continue;
if ((ret = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
@@ -495,8 +495,8 @@ view_log_cb(GntMenuItem *n, gpointer ggc
for (cur = buddies; cur != NULL; cur = cur->next) {
PurpleBlistNode *node = cur->data;
if ((node != NULL) &&
- (purple_blist_node_get_sibling_prev(node) || purple_blist_node_get_sibling_next(node))) {
- finch_log_show_contact((PurpleContact *)purple_blist_node_get_parent(node));
+ (purple_blist_node_prev(node) || purple_blist_node_next(node))) {
+ finch_log_show_contact((PurpleContact *)purple_blist_node_parent(node));
g_slist_free(buddies);
return;
}
@@ -529,8 +529,8 @@ generate_send_to_menu(FinchConv *ggc)
for (; buds; buds = g_slist_delete_link(buds, buds)) {
PurpleBlistNode *node = PURPLE_BLIST_NODE(purple_buddy_get_contact(PURPLE_BUDDY(buds->data)));
- for (node = purple_blist_node_get_first_child(node); node != NULL;
- node = purple_blist_node_get_sibling_next(node)) {
+ for (node = purple_blist_node_first_child(node); node != NULL;
+ node = purple_blist_node_next(node)) {
PurpleBuddy *buddy = (PurpleBuddy *)node;
PurpleAccount *account = purple_buddy_get_account(buddy);
if (purple_account_is_connected(account)) {
============================================================
--- finch/gntlog.c 89f2accf4954b640cdeb6d6658eacddcc27cf983
+++ finch/gntlog.c 9fc223536addb574a6da2c2f7b3c4d3185731bcb
@@ -457,8 +457,8 @@ void finch_log_show_contact(PurpleContac
return;
}
- for (child = purple_blist_node_get_first_child((PurpleBlistNode*)contact); child;
- child = purple_blist_node_get_sibling_next(child)) {
+ for (child = purple_blist_node_first_child((PurpleBlistNode*)contact); child;
+ child = purple_blist_node_next(child)) {
const char *name;
PurpleAccount *account;
if (!PURPLE_IS_BUDDY(child))
@@ -480,7 +480,7 @@ void finch_log_show_contact(PurpleContac
* and none of the contact's buddies are online.
* There is probably a better way to deal with this. */
if (name == NULL) {
- child = purple_blist_node_get_first_child((PurpleBlistNode*)contact);
+ child = purple_blist_node_first_child((PurpleBlistNode*)contact);
if (child != NULL && PURPLE_IS_BUDDY(child))
name = purple_buddy_get_contact_alias((PurpleBuddy *)child);
if (name == NULL)
============================================================
--- finch/gntpounce.c c30571023f457214d064969d08e88c06e20e86a0
+++ finch/gntpounce.c 906723925a4c078a7ed2a09f9cf969e3832b1a4c
@@ -171,7 +171,7 @@ setup_buddy_list_suggestion(GntEntry *en
setup_buddy_list_suggestion(GntEntry *entry, gboolean offline)
{
PurpleBlistNode *node = purple_blist_get_root();
- for (; node; node = purple_blist_node_next(node, offline)) {
+ for (; node; node = purple_blist_node_next_online(node, offline)) {
if (!PURPLE_IS_BUDDY(node))
continue;
gnt_entry_add_suggest(entry, purple_buddy_get_name((PurpleBuddy*)node));
============================================================
--- finch/gntrequest.c c29dcf8d7bbdbe5585852b4a4369f0460fc108b7
+++ finch/gntrequest.c 63c8f5208a959f8417c28d291a92fdedb564013a
@@ -438,7 +438,7 @@ create_string_field(PurpleRequestField *
if (hint && purple_str_has_prefix(hint, "screenname")) {
PurpleBlistNode *node = purple_blist_get_root();
gboolean offline = purple_str_has_suffix(hint, "all");
- for (; node; node = purple_blist_node_next(node, offline)) {
+ for (; node; node = purple_blist_node_next_online(node, offline)) {
if (!PURPLE_IS_BUDDY(node))
continue;
gnt_entry_add_suggest(GNT_ENTRY(entry), purple_buddy_get_name((PurpleBuddy*)node));
@@ -449,7 +449,7 @@ create_string_field(PurpleRequestField *
} else if (hint && !strcmp(hint, "group")) {
PurpleBlistNode *node;
for (node = purple_blist_get_root(); node;
- node = purple_blist_node_get_sibling_next(node)) {
+ node = purple_blist_node_next(node)) {
if (PURPLE_IS_GROUP(node))
gnt_entry_add_suggest(GNT_ENTRY(entry), purple_group_get_name((PurpleGroup *)node));
}
More information about the Commits
mailing list