gobjectification: 35339a98: Remove no-longer public PurpleBuddyList ...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Nov 8 03:31:07 EST 2009
-----------------------------------------------------------------
Revision: 35339a980e51b7ec34bf93f454b66bce68a04ff3
Ancestor: 7b4a971214d2bcfa59ab09112bf7b64f1de0aecf
Author: qulogic at pidgin.im
Date: 2009-11-08T05:31:31
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/35339a980e51b7ec34bf93f454b66bce68a04ff3
Modified files:
finch/gntblist.c
ChangeLog:
Remove no-longer public PurpleBuddyList from Finch.
-------------- next part --------------
============================================================
--- finch/gntblist.c d5281a937a2c1bed9d2a73083901a00837b7329e
+++ finch/gntblist.c 930b89cc64a6d42b98bf79290a398ddb18393675
@@ -130,7 +130,7 @@ static void add_node(PurpleBlistNode *no
static void add_group(PurpleGroup *group, FinchBlist *ggblist);
static void add_chat(PurpleChat *chat, FinchBlist *ggblist);
static void add_node(PurpleBlistNode *node, FinchBlist *ggblist);
-static void node_update(PurpleBuddyList *list, PurpleBlistNode *node);
+static void node_update(PurpleBlistNode *node);
#if 0
static gboolean is_contact_online(PurpleContact *contact);
static gboolean is_group_online(PurpleGroup *group);
@@ -141,7 +141,7 @@ static void savedstatus_changed(PurpleSa
static void remove_peripherals(FinchBlist *ggblist);
static const char * get_display_name(PurpleBlistNode *node);
static void savedstatus_changed(PurpleSavedStatus *now, PurpleSavedStatus *old);
-static void blist_show(PurpleBuddyList *list);
+static void blist_show(void);
static void update_node_display(PurpleBlistNode *buddy, FinchBlist *ggblist);
static void update_buddy_display(PurpleBuddy *buddy, FinchBlist *ggblist);
static void account_signed_on_cb(PurpleConnection *pc, gpointer null);
@@ -491,7 +491,7 @@ static void
}
static void
-node_remove(PurpleBuddyList *list, PurpleBlistNode *node)
+node_remove(PurpleBlistNode *node)
{
FinchBlist *ggblist = purple_blist_get_ui_data();
PurpleBlistNode *parent;
@@ -511,20 +511,20 @@ node_remove(PurpleBuddyList *list, Purpl
parent = purple_blist_node_get_parent(node);
for (node = purple_blist_node_get_first_child(node); node;
node = purple_blist_node_get_sibling_next(node))
- node_remove(list, node);
+ node_remove(node);
if (parent) {
if (!ggblist->manager->can_add_node(parent))
- node_remove(list, parent);
+ node_remove(parent);
else
- node_update(list, parent);
+ node_update(parent);
}
draw_tooltip(ggblist);
}
static void
-node_update(PurpleBuddyList *list, PurpleBlistNode *node)
+node_update(PurpleBlistNode *node)
{
/* It really looks like this should never happen ... but it does.
This will at least emit a warning to the log when it
@@ -544,13 +544,13 @@ node_update(PurpleBuddyList *list, Purpl
blist_update_row_flags(node);
if (gnt_tree_get_parent_key(GNT_TREE(ggblist->tree), node) !=
ggblist->manager->find_parent(node))
- node_remove(list, node);
+ node_remove(node);
}
if (PURPLE_IS_BUDDY(node)) {
PurpleBuddy *buddy = (PurpleBuddy*)node;
add_node((PurpleBlistNode*)buddy, purple_blist_get_ui_data());
- node_update(list, purple_blist_node_get_parent(node));
+ node_update(purple_blist_node_get_parent(node));
} else if (PURPLE_IS_CHAT(node)) {
add_node(node, purple_blist_get_ui_data());
} else if (PURPLE_IS_CONTACT(node)) {
@@ -561,7 +561,7 @@ node_update(PurpleBuddyList *list, Purpl
}
} else if (PURPLE_IS_GROUP(node)) {
if (!ggblist->manager->can_add_node(node))
- node_remove(list, node);
+ node_remove(node);
else
add_node(node, purple_blist_get_ui_data());
}
@@ -571,7 +571,7 @@ static void
}
static void
-new_list(PurpleBuddyList *list)
+new_list(void)
{
if (ggblist)
return;
@@ -586,19 +586,14 @@ remove_new_empty_group(gpointer data)
static gboolean
remove_new_empty_group(gpointer data)
{
- PurpleBuddyList *list;
-
if (!ggblist)
return FALSE;
- list = purple_get_blist();
- g_return_val_if_fail(list, FALSE);
-
ggblist->new_group_timeout = 0;
while (ggblist->new_group) {
PurpleBlistNode *group = ggblist->new_group->data;
ggblist->new_group = g_list_delete_link(ggblist->new_group, ggblist->new_group);
- node_update(list, group);
+ node_update(group);
}
return FALSE;
@@ -1007,7 +1002,7 @@ buddy_signed_off(PurpleBuddy *buddy, Fin
static void
buddy_signed_off(PurpleBuddy *buddy, FinchBlist *ggblist)
{
- node_remove(purple_get_blist(), (PurpleBlistNode*)buddy);
+ node_remove((PurpleBlistNode*)buddy);
}
#endif
@@ -1292,9 +1287,9 @@ toggle_show_offline(GntMenuItem *item, g
purple_blist_node_set_bool(buddy, "show_offline",
!purple_blist_node_get_bool(buddy, "show_offline"));
if (!ggblist->manager->can_add_node(buddy))
- node_remove(purple_get_blist(), buddy);
+ node_remove(buddy);
else
- node_update(purple_get_blist(), buddy);
+ node_update(buddy);
}
static void
@@ -2030,7 +2025,6 @@ populate_buddylist(void)
populate_buddylist(void)
{
PurpleBlistNode *node;
- PurpleBuddyList *list;
if (ggblist->manager->init)
ggblist->manager->init();
@@ -2045,12 +2039,11 @@ populate_buddylist(void)
gnt_tree_set_compare_func(GNT_TREE(ggblist->tree),
(GCompareFunc)blist_node_compare_log);
}
-
- list = purple_get_blist();
+
node = purple_blist_get_root();
while (node)
{
- node_update(list, node);
+ node_update(node);
node = purple_blist_node_next(node, FALSE);
}
}
@@ -2510,7 +2503,7 @@ buddy_recent_signed_on_off(gpointer data
fnode->signed_timer = 0;
if (!ggblist->manager->can_add_node(node)) {
- node_remove(purple_get_blist(), node);
+ node_remove(node);
} else {
update_node_display(node, ggblist);
if (purple_blist_node_get_parent(node) && PURPLE_IS_CONTACT(purple_blist_node_get_parent(node)))
@@ -3060,7 +3053,7 @@ void finch_blist_show()
void finch_blist_show()
{
- blist_show(purple_get_blist());
+ blist_show();
}
static void
@@ -3071,10 +3064,10 @@ static void
}
static void
-blist_show(PurpleBuddyList *list)
+blist_show(void)
{
if (ggblist == NULL)
- new_list(list);
+ new_list();
else if (ggblist->window) {
gnt_window_present(ggblist->window);
return;
More information about the Commits
mailing list