pidgin/gtkblist.c

changeset 32716
79450ccced89
parent 32713
e5581dd86f9d
child 32717
a6775a796e95
equal deleted inserted replaced
32715:81e0226a4dd5 32716:79450ccced89
341 341
342 } 342 }
343 343
344 static void gtk_blist_menu_autojoin_cb(GtkWidget *w, PurpleChat *chat) 344 static void gtk_blist_menu_autojoin_cb(GtkWidget *w, PurpleChat *chat)
345 { 345 {
346 purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-autojoin", 346 purple_blist_node_set_bool(PURPLE_BLIST_NODE(chat), "gtk-autojoin",
347 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))); 347 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)));
348 } 348 }
349 349
350 static void gtk_blist_menu_persistent_cb(GtkWidget *w, PurpleChat *chat) 350 static void gtk_blist_menu_persistent_cb(GtkWidget *w, PurpleChat *chat)
351 { 351 {
352 purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-persistent", 352 purple_blist_node_set_bool(PURPLE_BLIST_NODE(chat), "gtk-persistent",
353 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))); 353 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)));
354 } 354 }
355 355
356 static PurpleConversation * 356 static PurpleConversation *
357 find_conversation_with_buddy(PurpleBuddy *buddy) 357 find_conversation_with_buddy(PurpleBuddy *buddy)
1551 1551
1552 pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(purple_buddy_get_account(buddy)), node); 1552 pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(purple_buddy_get_account(buddy)), node);
1553 pidgin_append_blist_node_extended_menu(menu, node); 1553 pidgin_append_blist_node_extended_menu(menu, node);
1554 1554
1555 if (!contact_expanded && contact != NULL) 1555 if (!contact_expanded && contact != NULL)
1556 pidgin_append_blist_node_move_to_menu(menu, (PurpleBlistNode *)contact); 1556 pidgin_append_blist_node_move_to_menu(menu, PURPLE_BLIST_NODE(contact));
1557 1557
1558 if (node->parent && node->parent->child->next && 1558 if (node->parent && node->parent->child->next &&
1559 !sub && !contact_expanded) { 1559 !sub && !contact_expanded) {
1560 pidgin_separator(menu); 1560 pidgin_separator(menu);
1561 pidgin_append_blist_node_privacy_menu(menu, node); 1561 pidgin_append_blist_node_privacy_menu(menu, node);
1803 } 1803 }
1804 1804
1805 static GtkWidget * 1805 static GtkWidget *
1806 create_buddy_menu(PurpleBlistNode *node, PurpleBuddy *b) 1806 create_buddy_menu(PurpleBlistNode *node, PurpleBuddy *b)
1807 { 1807 {
1808 struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; 1808 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
1809 GtkWidget *menu; 1809 GtkWidget *menu;
1810 GtkWidget *menuitem; 1810 GtkWidget *menuitem;
1811 gboolean show_offline = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies"); 1811 gboolean show_offline = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies");
1812 1812
1813 menu = gtk_menu_new(); 1813 menu = gtk_menu_new();
1871 GtkMenuPositionFunc func, 1871 GtkMenuPositionFunc func,
1872 GtkWidget *tv, 1872 GtkWidget *tv,
1873 guint button, 1873 guint button,
1874 guint32 time) 1874 guint32 time)
1875 { 1875 {
1876 struct _pidgin_blist_node *gtknode; 1876 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
1877 GtkWidget *menu = NULL; 1877 GtkWidget *menu = NULL;
1878 gboolean handled = FALSE; 1878 gboolean handled = FALSE;
1879
1880 gtknode = (struct _pidgin_blist_node *)node->ui_data;
1881 1879
1882 /* Create a menu based on the thing we right-clicked on */ 1880 /* Create a menu based on the thing we right-clicked on */
1883 if (PURPLE_BLIST_NODE_IS_GROUP(node)) { 1881 if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
1884 PurpleGroup *g = (PurpleGroup *)node; 1882 PurpleGroup *g = (PurpleGroup *)node;
1885 1883
1938 /* Here we figure out which node was clicked */ 1936 /* Here we figure out which node was clicked */
1939 if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), event->x, event->y, &path, NULL, NULL, NULL)) 1937 if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), event->x, event->y, &path, NULL, NULL, NULL))
1940 return FALSE; 1938 return FALSE;
1941 gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path); 1939 gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path);
1942 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1); 1940 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
1943 gtknode = (struct _pidgin_blist_node *)node->ui_data; 1941 gtknode = purple_blist_node_get_ui_data(node);
1944 1942
1945 /* Right click draws a context menu */ 1943 /* Right click draws a context menu */
1946 if ((event->button == 3) && (event->type == GDK_BUTTON_PRESS)) { 1944 if ((event->button == 3) && (event->type == GDK_BUTTON_PRESS)) {
1947 handled = pidgin_blist_show_context_menu(node, NULL, tv, 3, event->time); 1945 handled = pidgin_blist_show_context_menu(node, NULL, tv, 3, event->time);
1948 1946
2356 2354
2357 gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), 2355 gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel),
2358 &iter, path); 2356 &iter, path);
2359 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), 2357 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel),
2360 &iter, NODE_COLUMN, &node, -1); 2358 &iter, NODE_COLUMN, &node, -1);
2361 gtknode = node->ui_data; 2359 gtknode = purple_blist_node_get_ui_data(node);
2362 2360
2363 if (PURPLE_BLIST_NODE_IS_CONTACT(n)) { 2361 if (PURPLE_BLIST_NODE_IS_CONTACT(n)) {
2364 PurpleContact *c = (PurpleContact*)n; 2362 PurpleContact *c = (PurpleContact*)n;
2365 if (PURPLE_BLIST_NODE_IS_CONTACT(node) && gtknode->contact_expanded) { 2363 if (PURPLE_BLIST_NODE_IS_CONTACT(node) && gtknode->contact_expanded) {
2366 purple_blist_merge_contact(c, node); 2364 purple_blist_merge_contact(c, node);
2687 /* If we have a contact then this is either a contact or a buddy and 2685 /* If we have a contact then this is either a contact or a buddy and
2688 * we want to fetch the custom icon for the contact. If we don't have 2686 * we want to fetch the custom icon for the contact. If we don't have
2689 * a contact then this is a group or some other type of node and we 2687 * a contact then this is a group or some other type of node and we
2690 * want to use that directly. */ 2688 * want to use that directly. */
2691 if (contact) { 2689 if (contact) {
2692 custom_img = purple_buddy_icons_node_find_custom_icon((PurpleBlistNode*)contact); 2690 custom_img = purple_buddy_icons_node_find_custom_icon(PURPLE_BLIST_NODE(contact));
2693 } else { 2691 } else {
2694 custom_img = purple_buddy_icons_node_find_custom_icon(node); 2692 custom_img = purple_buddy_icons_node_find_custom_icon(node);
2695 } 2693 }
2696 2694
2697 if (custom_img) { 2695 if (custom_img) {
3172 if(!PURPLE_BLIST_NODE_IS_CONTACT(node)) { 3170 if(!PURPLE_BLIST_NODE_IS_CONTACT(node)) {
3173 gtk_tree_path_free(path); 3171 gtk_tree_path_free(path);
3174 return FALSE; 3172 return FALSE;
3175 } 3173 }
3176 3174
3177 gtknode = node->ui_data; 3175 gtknode = purple_blist_node_get_ui_data(node);
3178 3176
3179 if (!gtknode->contact_expanded) { 3177 if (!gtknode->contact_expanded) {
3180 GtkTreeIter i; 3178 GtkTreeIter i;
3181 3179
3182 pidgin_blist_expand_contact_cb(NULL, node); 3180 pidgin_blist_expand_contact_cb(NULL, node);
3201 struct _pidgin_blist_node *gtknode; 3199 struct _pidgin_blist_node *gtknode;
3202 3200
3203 if(!buddy) 3201 if(!buddy)
3204 return FALSE; 3202 return FALSE;
3205 3203
3206 gtknode = ((PurpleBlistNode*)buddy)->ui_data; 3204 gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
3207 3205
3208 return (purple_account_is_connected(purple_buddy_get_account(buddy)) && 3206 return (purple_account_is_connected(purple_buddy_get_account(buddy)) &&
3209 (purple_presence_is_online(purple_buddy_get_presence(buddy)) || 3207 (purple_presence_is_online(purple_buddy_get_presence(buddy)) ||
3210 (gtknode && gtknode->recent_signonoff) || 3208 (gtknode && gtknode->recent_signonoff) ||
3211 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies") || 3209 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies") ||
3212 purple_blist_node_get_bool((PurpleBlistNode*)buddy, "show_offline"))); 3210 purple_blist_node_get_bool(PURPLE_BLIST_NODE(buddy), "show_offline")));
3213 } 3211 }
3214 3212
3215 void pidgin_blist_draw_tooltip(PurpleBlistNode *node, GtkWidget *widget) 3213 void pidgin_blist_draw_tooltip(PurpleBlistNode *node, GtkWidget *widget)
3216 { 3214 {
3217 pidgin_tooltip_show(widget, node, pidgin_blist_create_tooltip_for_node, pidgin_blist_paint_tip); 3215 pidgin_tooltip_show(widget, node, pidgin_blist_create_tooltip_for_node, pidgin_blist_paint_tip);
3672 GList *connections; 3670 GList *connections;
3673 GList *cur; 3671 GList *cur;
3674 struct proto_chat_entry *pce; 3672 struct proto_chat_entry *pce;
3675 char *name, *value; 3673 char *name, *value;
3676 PurpleConversation *conv; 3674 PurpleConversation *conv;
3677 PidginBlistNode *bnode = node->ui_data; 3675 PidginBlistNode *bnode = purple_blist_node_get_ui_data(node);
3678 3676
3679 chat = (PurpleChat *)node; 3677 chat = (PurpleChat *)node;
3680 prpl = purple_find_prpl(purple_account_get_protocol_id(purple_chat_get_account(chat))); 3678 prpl = purple_find_prpl(purple_account_get_protocol_id(purple_chat_get_account(chat)));
3681 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); 3679 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
3682 3680
3832 } 3830 }
3833 3831
3834 /* Last Seen */ 3832 /* Last Seen */
3835 if (full && c && !PURPLE_BUDDY_IS_ONLINE(b)) 3833 if (full && c && !PURPLE_BUDDY_IS_ONLINE(b))
3836 { 3834 {
3837 struct _pidgin_blist_node *gtknode = ((PurpleBlistNode *)c)->ui_data; 3835 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(c));
3838 PurpleBlistNode *bnode; 3836 PurpleBlistNode *bnode;
3839 int lastseen = 0; 3837 int lastseen = 0;
3840 3838
3841 if (gtknode && (!gtknode->contact_expanded || PURPLE_BLIST_NODE_IS_CONTACT(node))) 3839 if (gtknode && (!gtknode->contact_expanded || PURPLE_BLIST_NODE_IS_CONTACT(node)))
3842 { 3840 {
3961 3959
3962 GdkPixbuf * 3960 GdkPixbuf *
3963 pidgin_blist_get_emblem(PurpleBlistNode *node) 3961 pidgin_blist_get_emblem(PurpleBlistNode *node)
3964 { 3962 {
3965 PurpleBuddy *buddy = NULL; 3963 PurpleBuddy *buddy = NULL;
3966 struct _pidgin_blist_node *gtknode = node->ui_data; 3964 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
3967 PurplePlugin *prpl; 3965 PurplePlugin *prpl;
3968 PurplePluginProtocolInfo *prpl_info; 3966 PurplePluginProtocolInfo *prpl_info;
3969 const char *name = NULL; 3967 const char *name = NULL;
3970 char *filename, *path; 3968 char *filename, *path;
3971 PurplePresence *p = NULL; 3969 PurplePresence *p = NULL;
3984 path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emotes", 3982 path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emotes",
3985 "small", "mobile.png", NULL); 3983 "small", "mobile.png", NULL);
3986 return _pidgin_blist_get_cached_emblem(path); 3984 return _pidgin_blist_get_cached_emblem(path);
3987 } 3985 }
3988 3986
3989 if (((struct _pidgin_blist_node*)(node->parent->ui_data))->contact_expanded) { 3987 if (((struct _pidgin_blist_node*)purple_blist_node_get_ui_data(node->parent))->contact_expanded) {
3990 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons")) 3988 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons"))
3991 return NULL; 3989 return NULL;
3992 return pidgin_create_prpl_icon(purple_buddy_get_account((PurpleBuddy*)node), PIDGIN_PRPL_ICON_SMALL); 3990 return pidgin_create_prpl_icon(purple_buddy_get_account((PurpleBuddy*)node), PIDGIN_PRPL_ICON_SMALL);
3993 } 3991 }
3994 } else { 3992 } else {
4068 GdkPixbuf * 4066 GdkPixbuf *
4069 pidgin_blist_get_status_icon(PurpleBlistNode *node, PidginStatusIconSize size) 4067 pidgin_blist_get_status_icon(PurpleBlistNode *node, PidginStatusIconSize size)
4070 { 4068 {
4071 GdkPixbuf *ret; 4069 GdkPixbuf *ret;
4072 const char *icon = NULL; 4070 const char *icon = NULL;
4073 struct _pidgin_blist_node *gtknode = node->ui_data; 4071 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
4074 struct _pidgin_blist_node *gtkbuddynode = NULL; 4072 struct _pidgin_blist_node *gtkbuddynode = NULL;
4075 PurpleBuddy *buddy = NULL; 4073 PurpleBuddy *buddy = NULL;
4076 PurpleChat *chat = NULL; 4074 PurpleChat *chat = NULL;
4077 GtkIconSize icon_size = gtk_icon_size_from_name((size == PIDGIN_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL : 4075 GtkIconSize icon_size = gtk_icon_size_from_name((size == PIDGIN_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL :
4078 PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC); 4076 PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC);
4079 4077
4080 if(PURPLE_BLIST_NODE_IS_CONTACT(node)) { 4078 if(PURPLE_BLIST_NODE_IS_CONTACT(node)) {
4081 if(!gtknode->contact_expanded) { 4079 if(!gtknode->contact_expanded) {
4082 buddy = purple_contact_get_priority_buddy((PurpleContact*)node); 4080 buddy = purple_contact_get_priority_buddy((PurpleContact*)node);
4083 if (buddy != NULL) 4081 if (buddy != NULL)
4084 gtkbuddynode = ((PurpleBlistNode*)buddy)->ui_data; 4082 gtkbuddynode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
4085 } 4083 }
4086 } else if(PURPLE_BLIST_NODE_IS_BUDDY(node)) { 4084 } else if(PURPLE_BLIST_NODE_IS_BUDDY(node)) {
4087 buddy = (PurpleBuddy*)node; 4085 buddy = (PurpleBuddy*)node;
4088 gtkbuddynode = node->ui_data; 4086 gtkbuddynode = purple_blist_node_get_ui_data(node);
4089 } else if(PURPLE_BLIST_NODE_IS_CHAT(node)) { 4087 } else if(PURPLE_BLIST_NODE_IS_CHAT(node)) {
4090 chat = (PurpleChat*)node; 4088 chat = (PurpleChat*)node;
4091 } else { 4089 } else {
4092 return NULL; 4090 return NULL;
4093 } 4091 }
4112 gboolean trans; 4110 gboolean trans;
4113 4111
4114 if(conv != NULL) { 4112 if(conv != NULL) {
4115 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); 4113 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
4116 if (gtkconv == NULL && size == PIDGIN_STATUS_ICON_SMALL) { 4114 if (gtkconv == NULL && size == PIDGIN_STATUS_ICON_SMALL) {
4117 PidginBlistNode *ui = buddy->node.ui_data; 4115 PidginBlistNode *ui = purple_blist_node_get_ui_data(&(buddy->node));
4118 if (ui == NULL || (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)) 4116 if (ui == NULL || (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE))
4119 return gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), 4117 return gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview),
4120 PIDGIN_STOCK_STATUS_MESSAGE, icon_size, "GtkTreeView"); 4118 PIDGIN_STOCK_STATUS_MESSAGE, icon_size, "GtkTreeView");
4121 } 4119 }
4122 } 4120 }
4196 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); 4194 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
4197 PidginThemeFont *statusfont = NULL, *namefont = NULL; 4195 PidginThemeFont *statusfont = NULL, *namefont = NULL;
4198 PidginBlistTheme *theme; 4196 PidginBlistTheme *theme;
4199 4197
4200 if (conv != NULL) { 4198 if (conv != NULL) {
4201 PidginBlistNode *ui = b->node.ui_data; 4199 PidginBlistNode *ui = purple_blist_node_get_ui_data(&(b->node));
4202 if (ui) { 4200 if (ui) {
4203 if (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE) 4201 if (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)
4204 hidden_conv = TRUE; 4202 hidden_conv = TRUE;
4205 } else { 4203 } else {
4206 if (PIDGIN_CONVERSATION(conv) == NULL) 4204 if (PIDGIN_CONVERSATION(conv) == NULL)
4430 4428
4431 buddy = purple_contact_get_priority_buddy((PurpleContact*)cnode); 4429 buddy = purple_contact_get_priority_buddy((PurpleContact*)cnode);
4432 4430
4433 if (buddy && 4431 if (buddy &&
4434 purple_presence_is_idle(purple_buddy_get_presence(buddy))) 4432 purple_presence_is_idle(purple_buddy_get_presence(buddy)))
4435 pidgin_blist_update_contact(list, (PurpleBlistNode*)buddy); 4433 pidgin_blist_update_contact(list, PURPLE_BLIST_NODE(buddy));
4436 } 4434 }
4437 } 4435 }
4438 } 4436 }
4439 4437
4440 /* keep on going */ 4438 /* keep on going */
4441 return TRUE; 4439 return TRUE;
4442 } 4440 }
4443 4441
4444 static void pidgin_blist_hide_node(PurpleBuddyList *list, PurpleBlistNode *node, gboolean update) 4442 static void pidgin_blist_hide_node(PurpleBuddyList *list, PurpleBlistNode *node, gboolean update)
4445 { 4443 {
4446 struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; 4444 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
4447 GtkTreeIter iter; 4445 GtkTreeIter iter;
4448 4446
4449 if (!gtknode || !gtknode->row || !gtkblist) 4447 if (!gtknode || !gtknode->row || !gtkblist)
4450 return; 4448 return;
4451 4449
4601 return; 4599 return;
4602 4600
4603 if(account != NULL && purple_conversation_get_name(conv) != NULL) { 4601 if(account != NULL && purple_conversation_get_name(conv) != NULL) {
4604 PurpleBuddy *buddy = purple_find_buddy(account, purple_conversation_get_name(conv)); 4602 PurpleBuddy *buddy = purple_find_buddy(account, purple_conversation_get_name(conv));
4605 if(buddy != NULL) 4603 if(buddy != NULL)
4606 pidgin_blist_update_buddy(NULL, (PurpleBlistNode *)buddy, TRUE); 4604 pidgin_blist_update_buddy(NULL, PURPLE_BLIST_NODE(buddy), TRUE);
4607 } 4605 }
4608 4606
4609 if (gtkblist->menutrayicon) { 4607 if (gtkblist->menutrayicon) {
4610 gtk_widget_destroy(gtkblist->menutrayicon); 4608 gtk_widget_destroy(gtkblist->menutrayicon);
4611 gtkblist->menutrayicon = NULL; 4609 gtkblist->menutrayicon = NULL;
4681 4679
4682 static void 4680 static void
4683 written_msg_update_ui_cb(PurpleAccount *account, const char *who, const char *message, 4681 written_msg_update_ui_cb(PurpleAccount *account, const char *who, const char *message,
4684 PurpleConversation *conv, PurpleMessageFlags flag, PurpleBlistNode *node) 4682 PurpleConversation *conv, PurpleMessageFlags flag, PurpleBlistNode *node)
4685 { 4683 {
4686 PidginBlistNode *ui = node->ui_data; 4684 PidginBlistNode *ui = purple_blist_node_get_ui_data(node);
4687 if (ui->conv.conv != conv || !pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)) || 4685 if (ui->conv.conv != conv || !pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)) ||
4688 !(flag & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV))) 4686 !(flag & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)))
4689 return; 4687 return;
4690 ui->conv.flags |= PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE; 4688 ui->conv.flags |= PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE;
4691 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT 4689 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT
4697 } 4695 }
4698 4696
4699 static void 4697 static void
4700 displayed_msg_update_ui_cb(PidginConversation *gtkconv, PurpleBlistNode *node) 4698 displayed_msg_update_ui_cb(PidginConversation *gtkconv, PurpleBlistNode *node)
4701 { 4699 {
4702 PidginBlistNode *ui = node->ui_data; 4700 PidginBlistNode *ui = purple_blist_node_get_ui_data(node);
4703 if (ui->conv.conv != gtkconv->active_conv) 4701 if (ui->conv.conv != gtkconv->active_conv)
4704 return; 4702 return;
4705 ui->conv.flags &= ~(PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE | 4703 ui->conv.flags &= ~(PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE |
4706 PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK); 4704 PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
4707 pidgin_blist_update(purple_get_blist(), node); 4705 pidgin_blist_update(purple_get_blist(), node);
4716 case PURPLE_CONV_TYPE_IM: 4714 case PURPLE_CONV_TYPE_IM:
4717 { 4715 {
4718 GSList *buddies = purple_find_buddies(account, purple_conversation_get_name(conv)); 4716 GSList *buddies = purple_find_buddies(account, purple_conversation_get_name(conv));
4719 while (buddies) { 4717 while (buddies) {
4720 PurpleBlistNode *buddy = buddies->data; 4718 PurpleBlistNode *buddy = buddies->data;
4721 struct _pidgin_blist_node *ui = buddy->ui_data; 4719 struct _pidgin_blist_node *ui = purple_blist_node_get_ui_data(buddy);
4722 buddies = g_slist_delete_link(buddies, buddies); 4720 buddies = g_slist_delete_link(buddies, buddies);
4723 if (!ui) 4721 if (!ui)
4724 continue; 4722 continue;
4725 ui->conv.conv = conv; 4723 ui->conv.conv = conv;
4726 ui->conv.flags = 0; 4724 ui->conv.flags = 0;
4738 { 4736 {
4739 PurpleChat *chat = purple_blist_find_chat(account, purple_conversation_get_name(conv)); 4737 PurpleChat *chat = purple_blist_find_chat(account, purple_conversation_get_name(conv));
4740 struct _pidgin_blist_node *ui; 4738 struct _pidgin_blist_node *ui;
4741 if (!chat) 4739 if (!chat)
4742 break; 4740 break;
4743 ui = chat->node.ui_data; 4741 ui = purple_blist_node_get_ui_data(&(chat->node));
4744 if (!ui) 4742 if (!ui)
4745 break; 4743 break;
4746 ui->conv.conv = conv; 4744 ui->conv.conv = conv;
4747 ui->conv.flags = 0; 4745 ui->conv.flags = 0;
4748 ui->conv.last_message = 0; 4746 ui->conv.last_message = 0;
4773 blist->ui_data = gtkblist; 4771 blist->ui_data = gtkblist;
4774 } 4772 }
4775 4773
4776 static void pidgin_blist_new_node(PurpleBlistNode *node) 4774 static void pidgin_blist_new_node(PurpleBlistNode *node)
4777 { 4775 {
4778 node->ui_data = g_new0(struct _pidgin_blist_node, 1); 4776 purple_blist_node_set_ui_data(node, g_new0(struct _pidgin_blist_node, 1));
4779 } 4777 }
4780 4778
4781 gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node) 4779 gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node)
4782 { 4780 {
4783 if (PURPLE_BLIST_NODE_IS_BUDDY(node)) { 4781 if (PURPLE_BLIST_NODE_IS_BUDDY(node)) {
4786 return FALSE; 4784 return FALSE;
4787 } 4785 }
4788 4786
4789 g_return_val_if_fail(PURPLE_BLIST_NODE_IS_CONTACT(node), FALSE); 4787 g_return_val_if_fail(PURPLE_BLIST_NODE_IS_CONTACT(node), FALSE);
4790 4788
4791 return ((struct _pidgin_blist_node *)node->ui_data)->contact_expanded; 4789 return ((struct _pidgin_blist_node *)purple_blist_node_get_ui_data(node))->contact_expanded;
4792 } 4790 }
4793 4791
4794 enum { 4792 enum {
4795 DRAG_BUDDY, 4793 DRAG_BUDDY,
4796 DRAG_ROW, 4794 DRAG_ROW,
4842 if (node) 4840 if (node)
4843 { 4841 {
4844 struct _pidgin_blist_node *gtknode; 4842 struct _pidgin_blist_node *gtknode;
4845 GtkTreePath *path; 4843 GtkTreePath *path;
4846 4844
4847 gtknode = node->ui_data; 4845 gtknode = purple_blist_node_get_ui_data(node);
4848 if (gtknode && gtknode->row) 4846 if (gtknode && gtknode->row)
4849 { 4847 {
4850 path = gtk_tree_row_reference_get_path(gtknode->row); 4848 path = gtk_tree_row_reference_get_path(gtknode->row);
4851 gtk_tree_selection_select_path(sel, path); 4849 gtk_tree_selection_select_path(sel, path);
4852 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(gtkblist->treeview), path, NULL, FALSE, 0, 0); 4850 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(gtkblist->treeview), path, NULL, FALSE, 0, 0);
6128 6126
6129 gtkblist->refresh_timer = purple_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, blist); 6127 gtkblist->refresh_timer = purple_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, blist);
6130 } 6128 }
6131 6129
6132 static gboolean get_iter_from_node(PurpleBlistNode *node, GtkTreeIter *iter) { 6130 static gboolean get_iter_from_node(PurpleBlistNode *node, GtkTreeIter *iter) {
6133 struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; 6131 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
6134 GtkTreePath *path; 6132 GtkTreePath *path;
6135 6133
6136 if (!gtknode) { 6134 if (!gtknode) {
6137 return FALSE; 6135 return FALSE;
6138 } 6136 }
6157 return TRUE; 6155 return TRUE;
6158 } 6156 }
6159 6157
6160 static void pidgin_blist_remove(PurpleBuddyList *list, PurpleBlistNode *node) 6158 static void pidgin_blist_remove(PurpleBuddyList *list, PurpleBlistNode *node)
6161 { 6159 {
6162 struct _pidgin_blist_node *gtknode = node->ui_data; 6160 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
6163 6161
6164 purple_request_close_with_handle(node); 6162 purple_request_close_with_handle(node);
6165 6163
6166 pidgin_blist_hide_node(list, node, TRUE); 6164 pidgin_blist_hide_node(list, node, TRUE);
6167 6165
6179 6177
6180 if(gtknode) { 6178 if(gtknode) {
6181 if(gtknode->recent_signonoff_timer > 0) 6179 if(gtknode->recent_signonoff_timer > 0)
6182 purple_timeout_remove(gtknode->recent_signonoff_timer); 6180 purple_timeout_remove(gtknode->recent_signonoff_timer);
6183 6181
6184 purple_signals_disconnect_by_handle(node->ui_data); 6182 purple_signals_disconnect_by_handle(gtknode);
6185 g_free(node->ui_data); 6183 g_free(gtknode);
6186 node->ui_data = NULL; 6184 purple_blist_node_set_ui_data(node, NULL);
6187 } 6185 }
6188 } 6186 }
6189 6187
6190 static gboolean do_selection_changed(PurpleBlistNode *new_selection) 6188 static gboolean do_selection_changed(PurpleBlistNode *new_selection)
6191 { 6189 {
6226 } 6224 }
6227 6225
6228 static gboolean insert_node(PurpleBuddyList *list, PurpleBlistNode *node, GtkTreeIter *iter) 6226 static gboolean insert_node(PurpleBuddyList *list, PurpleBlistNode *node, GtkTreeIter *iter)
6229 { 6227 {
6230 GtkTreeIter parent_iter, cur, *curptr = NULL; 6228 GtkTreeIter parent_iter, cur, *curptr = NULL;
6231 struct _pidgin_blist_node *gtknode = node->ui_data; 6229 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
6232 GtkTreePath *newpath; 6230 GtkTreePath *newpath;
6233 6231
6234 if(!iter) 6232 if(!iter)
6235 return FALSE; 6233 return FALSE;
6236 6234
6248 6246
6249 if(gtknode != NULL) { 6247 if(gtknode != NULL) {
6250 gtk_tree_row_reference_free(gtknode->row); 6248 gtk_tree_row_reference_free(gtknode->row);
6251 } else { 6249 } else {
6252 pidgin_blist_new_node(node); 6250 pidgin_blist_new_node(node);
6253 gtknode = (struct _pidgin_blist_node *)node->ui_data; 6251 gtknode = purple_blist_node_get_ui_data(node);
6254 } 6252 }
6255 6253
6256 newpath = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), 6254 newpath = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel),
6257 iter); 6255 iter);
6258 gtknode->row = 6256 gtknode->row =
6266 NODE_COLUMN, node, 6264 NODE_COLUMN, node,
6267 -1); 6265 -1);
6268 6266
6269 if(node->parent) { 6267 if(node->parent) {
6270 GtkTreePath *expand = NULL; 6268 GtkTreePath *expand = NULL;
6271 struct _pidgin_blist_node *gtkparentnode = node->parent->ui_data; 6269 struct _pidgin_blist_node *gtkparentnode = purple_blist_node_get_ui_data(node->parent);
6272 6270
6273 if(PURPLE_BLIST_NODE_IS_GROUP(node->parent)) { 6271 if(PURPLE_BLIST_NODE_IS_GROUP(node->parent)) {
6274 if(!purple_blist_node_get_bool(node->parent, "collapsed")) 6272 if(!purple_blist_node_get_bool(node->parent, "collapsed"))
6275 expand = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &parent_iter); 6273 expand = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &parent_iter);
6276 } else if(PURPLE_BLIST_NODE_IS_CONTACT(node->parent) && 6274 } else if(PURPLE_BLIST_NODE_IS_CONTACT(node->parent) &&
6288 6286
6289 static gboolean pidgin_blist_group_has_show_offline_buddy(PurpleGroup *group) 6287 static gboolean pidgin_blist_group_has_show_offline_buddy(PurpleGroup *group)
6290 { 6288 {
6291 PurpleBlistNode *gnode, *cnode, *bnode; 6289 PurpleBlistNode *gnode, *cnode, *bnode;
6292 6290
6293 gnode = (PurpleBlistNode *)group; 6291 gnode = PURPLE_BLIST_NODE(group);
6294 for(cnode = gnode->child; cnode; cnode = cnode->next) { 6292 for(cnode = gnode->child; cnode; cnode = cnode->next) {
6295 if(PURPLE_BLIST_NODE_IS_CONTACT(cnode)) { 6293 if(PURPLE_BLIST_NODE_IS_CONTACT(cnode)) {
6296 for(bnode = cnode->child; bnode; bnode = bnode->next) { 6294 for(bnode = cnode->child; bnode; bnode = bnode->next) {
6297 PurpleBuddy *buddy = (PurpleBuddy *)bnode; 6295 PurpleBuddy *buddy = (PurpleBuddy *)bnode;
6298 if (purple_account_is_connected(purple_buddy_get_account(buddy)) && 6296 if (purple_account_is_connected(purple_buddy_get_account(buddy)) &&
6460 PurplePresence *presence = purple_buddy_get_presence(buddy); 6458 PurplePresence *presence = purple_buddy_get_presence(buddy);
6461 GdkPixbuf *status, *avatar, *emblem, *prpl_icon; 6459 GdkPixbuf *status, *avatar, *emblem, *prpl_icon;
6462 GdkColor *color = NULL; 6460 GdkColor *color = NULL;
6463 char *mark; 6461 char *mark;
6464 char *idle = NULL; 6462 char *idle = NULL;
6465 gboolean expanded = ((struct _pidgin_blist_node *)(node->parent->ui_data))->contact_expanded; 6463 gboolean expanded = ((struct _pidgin_blist_node *)purple_blist_node_get_ui_data(node->parent))->contact_expanded;
6466 gboolean selected = (gtkblist->selected_node == node); 6464 gboolean selected = (gtkblist->selected_node == node);
6467 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); 6465 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
6468 PidginBlistTheme *theme; 6466 PidginBlistTheme *theme;
6469 6467
6470 if (editing_blist) 6468 if (editing_blist)
6471 return; 6469 return;
6472 6470
6473 status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy, 6471 status = pidgin_blist_get_status_icon(PURPLE_BLIST_NODE(buddy),
6474 biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL); 6472 biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL);
6475 6473
6476 /* Speed it up if we don't want buddy icons. */ 6474 /* Speed it up if we don't want buddy icons. */
6477 if(biglist) 6475 if(biglist)
6478 avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE); 6476 avatar = pidgin_blist_get_buddy_icon(PURPLE_BLIST_NODE(buddy), TRUE, TRUE);
6479 else 6477 else
6480 avatar = NULL; 6478 avatar = NULL;
6481 6479
6482 if (!avatar) { 6480 if (!avatar) {
6483 g_object_ref(G_OBJECT(gtkblist->empty_avatar)); 6481 g_object_ref(G_OBJECT(gtkblist->empty_avatar));
6484 avatar = gtkblist->empty_avatar; 6482 avatar = gtkblist->empty_avatar;
6485 } else if ((!PURPLE_BUDDY_IS_ONLINE(buddy) || purple_presence_is_idle(presence))) { 6483 } else if ((!PURPLE_BUDDY_IS_ONLINE(buddy) || purple_presence_is_idle(presence))) {
6486 do_alphashift(avatar, 77); 6484 do_alphashift(avatar, 77);
6487 } 6485 }
6488 6486
6489 emblem = pidgin_blist_get_emblem((PurpleBlistNode*) buddy); 6487 emblem = pidgin_blist_get_emblem(PURPLE_BLIST_NODE(buddy));
6490 mark = pidgin_blist_get_name_markup(buddy, selected, TRUE); 6488 mark = pidgin_blist_get_name_markup(buddy, selected, TRUE);
6491 6489
6492 theme = pidgin_blist_get_theme(); 6490 theme = pidgin_blist_get_theme();
6493 6491
6494 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_idle_time") && 6492 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_idle_time") &&
6596 GtkTreeIter iter; 6594 GtkTreeIter iter;
6597 6595
6598 if(!insert_node(list, cnode, &iter)) 6596 if(!insert_node(list, cnode, &iter))
6599 return; 6597 return;
6600 6598
6601 gtknode = (struct _pidgin_blist_node *)cnode->ui_data; 6599 gtknode = purple_blist_node_get_ui_data(cnode);
6602 6600
6603 if(gtknode->contact_expanded) { 6601 if(gtknode->contact_expanded) {
6604 GdkPixbuf *status; 6602 GdkPixbuf *status;
6605 gchar *mark, *tmp; 6603 gchar *mark, *tmp;
6606 const gchar *fg_color, *font; 6604 const gchar *fg_color, *font;
6673 buddy = (PurpleBuddy*)node; 6671 buddy = (PurpleBuddy*)node;
6674 6672
6675 /* First things first, update the contact */ 6673 /* First things first, update the contact */
6676 pidgin_blist_update_contact(list, node); 6674 pidgin_blist_update_contact(list, node);
6677 6675
6678 gtkparentnode = (struct _pidgin_blist_node *)node->parent->ui_data; 6676 gtkparentnode = purple_blist_node_get_ui_data(node->parent);
6679 6677
6680 if (gtkparentnode->contact_expanded && buddy_is_displayable(buddy)) 6678 if (gtkparentnode->contact_expanded && buddy_is_displayable(buddy))
6681 { 6679 {
6682 GtkTreeIter iter; 6680 GtkTreeIter iter;
6683 6681
6723 gboolean nick_said = FALSE; 6721 gboolean nick_said = FALSE;
6724 6722
6725 if (!insert_node(list, node, &iter)) 6723 if (!insert_node(list, node, &iter))
6726 return; 6724 return;
6727 6725
6728 ui = node->ui_data; 6726 ui = purple_blist_node_get_ui_data(node);
6729 conv = ui->conv.conv; 6727 conv = ui->conv.conv;
6730 if (conv && pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv))) { 6728 if (conv && pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv))) {
6731 hidden = (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE); 6729 hidden = (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE);
6732 nick_said = (ui->conv.flags & PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK); 6730 nick_said = (ui->conv.flags & PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
6733 } 6731 }
6809 if (list) 6807 if (list)
6810 gtkblist = PIDGIN_BLIST(list); 6808 gtkblist = PIDGIN_BLIST(list);
6811 if(!gtkblist || !gtkblist->treeview || !node) 6809 if(!gtkblist || !gtkblist->treeview || !node)
6812 return; 6810 return;
6813 6811
6814 if (node->ui_data == NULL) 6812 if (purple_blist_node_get_ui_data(node) == NULL)
6815 pidgin_blist_new_node(node); 6813 pidgin_blist_new_node(node);
6816 6814
6817 switch(node->type) { 6815 switch(node->type) {
6818 case PURPLE_BLIST_GROUP_NODE: 6816 case PURPLE_BLIST_GROUP_NODE:
6819 pidgin_blist_update_group(list, node); 6817 pidgin_blist_update_group(list, node);
7013 7011
7014 purple_account_add_buddy(account, b, invite); 7012 purple_account_add_buddy(account, b, invite);
7015 7013
7016 /* Offer to merge people with the same alias. */ 7014 /* Offer to merge people with the same alias. */
7017 if (whoalias != NULL && g != NULL) 7015 if (whoalias != NULL && g != NULL)
7018 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); 7016 gtk_blist_auto_personize(PURPLE_BLIST_NODE(g), whoalias);
7019 7017
7020 /* 7018 /*
7021 * XXX 7019 * XXX
7022 * It really seems like it would be better if the call to 7020 * It really seems like it would be better if the call to
7023 * purple_account_add_buddy() and purple_conversation_update() were done in 7021 * purple_account_add_buddy() and purple_conversation_update() were done in
7161 } 7159 }
7162 7160
7163 purple_blist_add_chat(chat, group, NULL); 7161 purple_blist_add_chat(chat, group, NULL);
7164 7162
7165 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->autojoin))) 7163 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->autojoin)))
7166 purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-autojoin", TRUE); 7164 purple_blist_node_set_bool(PURPLE_BLIST_NODE(chat), "gtk-autojoin", TRUE);
7167 7165
7168 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->persistent))) 7166 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->persistent)))
7169 purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-persistent", TRUE); 7167 purple_blist_node_set_bool(PURPLE_BLIST_NODE(chat), "gtk-persistent", TRUE);
7170 } 7168 }
7171 7169
7172 gtk_widget_destroy(data->chat_data.rq_data.window); 7170 gtk_widget_destroy(data->chat_data.rq_data.window);
7173 g_free(data->chat_data.default_chat_name); 7171 g_free(data->chat_data.default_chat_name);
7174 g_list_free(data->chat_data.entries); 7172 g_list_free(data->chat_data.entries);
7421 chat = (PurpleChat *)cnode; 7419 chat = (PurpleChat *)cnode;
7422 7420
7423 if(purple_chat_get_account(chat) != account) 7421 if(purple_chat_get_account(chat) != account)
7424 continue; 7422 continue;
7425 7423
7426 if (purple_blist_node_get_bool((PurpleBlistNode*)chat, "gtk-autojoin")) 7424 if (purple_blist_node_get_bool(PURPLE_BLIST_NODE(chat), "gtk-autojoin"))
7427 serv_join_chat(gc, purple_chat_get_components(chat)); 7425 serv_join_chat(gc, purple_chat_get_components(chat));
7428 } 7426 }
7429 } 7427 }
7430 7428
7431 /* Stop processing; we handled the autojoins. */ 7429 /* Stop processing; we handled the autojoins. */
7439 return &handle; 7437 return &handle;
7440 } 7438 }
7441 7439
7442 static gboolean buddy_signonoff_timeout_cb(PurpleBuddy *buddy) 7440 static gboolean buddy_signonoff_timeout_cb(PurpleBuddy *buddy)
7443 { 7441 {
7444 struct _pidgin_blist_node *gtknode = ((PurpleBlistNode*)buddy)->ui_data; 7442 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
7445 7443
7446 gtknode->recent_signonoff = FALSE; 7444 gtknode->recent_signonoff = FALSE;
7447 gtknode->recent_signonoff_timer = 0; 7445 gtknode->recent_signonoff_timer = 0;
7448 7446
7449 pidgin_blist_update(NULL, (PurpleBlistNode*)buddy); 7447 pidgin_blist_update(NULL, PURPLE_BLIST_NODE(buddy));
7450 7448
7451 return FALSE; 7449 return FALSE;
7452 } 7450 }
7453 7451
7454 static void buddy_signonoff_cb(PurpleBuddy *buddy) 7452 static void buddy_signonoff_cb(PurpleBuddy *buddy)
7455 { 7453 {
7456 struct _pidgin_blist_node *gtknode; 7454 struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
7457 7455
7458 if(!((PurpleBlistNode*)buddy)->ui_data) { 7456 if(!gtknode) {
7459 pidgin_blist_new_node((PurpleBlistNode*)buddy); 7457 pidgin_blist_new_node(PURPLE_BLIST_NODE(buddy));
7460 } 7458 }
7461 7459
7462 gtknode = ((PurpleBlistNode*)buddy)->ui_data; 7460 gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
7463 7461
7464 gtknode->recent_signonoff = TRUE; 7462 gtknode->recent_signonoff = TRUE;
7465 7463
7466 if(gtknode->recent_signonoff_timer > 0) 7464 if(gtknode->recent_signonoff_timer > 0)
7467 purple_timeout_remove(gtknode->recent_signonoff_timer); 7465 purple_timeout_remove(gtknode->recent_signonoff_timer);

mercurial