| 5275 cn = PURPLE_BLIST_NODE(c); |
5275 cn = PURPLE_BLIST_NODE(c); |
| 5276 for (bn = purple_blist_node_get_first_child(cn); bn; bn = purple_blist_node_get_sibling_next(bn)) { |
5276 for (bn = purple_blist_node_get_first_child(cn); bn; bn = purple_blist_node_get_sibling_next(bn)) { |
| 5277 PurpleBuddy *b = PURPLE_BUDDY(bn); |
5277 PurpleBuddy *b = PURPLE_BUDDY(bn); |
| 5278 PurpleConversation *conv; |
5278 PurpleConversation *conv; |
| 5279 if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account))) { |
5279 if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account))) { |
| 5280 if (conv->ui_data) |
5280 if (PIDGIN_CONVERSATION(conv)) |
| 5281 return conv->ui_data; |
5281 return PIDGIN_CONVERSATION(conv); |
| 5282 } |
5282 } |
| 5283 } |
5283 } |
| 5284 |
5284 |
| 5285 return NULL; |
5285 return NULL; |
| 5286 } |
5286 } |
| 5364 GtkWidget *tab_cont; |
5364 GtkWidget *tab_cont; |
| 5365 PurpleBlistNode *convnode; |
5365 PurpleBlistNode *convnode; |
| 5366 PurpleValue *value; |
5366 PurpleValue *value; |
| 5367 |
5367 |
| 5368 if (conv_type == PURPLE_CONV_TYPE_IM && (gtkconv = pidgin_conv_find_gtkconv(conv))) { |
5368 if (conv_type == PURPLE_CONV_TYPE_IM && (gtkconv = pidgin_conv_find_gtkconv(conv))) { |
| 5369 conv->ui_data = gtkconv; |
5369 purple_conversation_set_ui_data(conv, gtkconv); |
| 5370 if (!g_list_find(gtkconv->convs, conv)) |
5370 if (!g_list_find(gtkconv->convs, conv)) |
| 5371 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); |
5371 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); |
| 5372 pidgin_conv_switch_active_conversation(conv); |
5372 pidgin_conv_switch_active_conversation(conv); |
| 5373 return; |
5373 return; |
| 5374 } |
5374 } |
| 5375 |
5375 |
| 5376 gtkconv = g_new0(PidginConversation, 1); |
5376 gtkconv = g_new0(PidginConversation, 1); |
| 5377 conv->ui_data = gtkconv; |
5377 purple_conversation_set_ui_data(conv, gtkconv); |
| 5378 gtkconv->active_conv = conv; |
5378 gtkconv->active_conv = conv; |
| 5379 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); |
5379 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); |
| 5380 gtkconv->send_history = g_list_append(NULL, NULL); |
5380 gtkconv->send_history = g_list_append(NULL, NULL); |
| 5381 |
5381 |
| 5382 /* Setup some initial variables. */ |
5382 /* Setup some initial variables. */ |
| 5399 g_free(gtkconv->u.chat); |
5399 g_free(gtkconv->u.chat); |
| 5400 else if (conv_type == PURPLE_CONV_TYPE_IM) |
5400 else if (conv_type == PURPLE_CONV_TYPE_IM) |
| 5401 g_free(gtkconv->u.im); |
5401 g_free(gtkconv->u.im); |
| 5402 |
5402 |
| 5403 g_free(gtkconv); |
5403 g_free(gtkconv); |
| 5404 conv->ui_data = NULL; |
5404 purple_conversation_set_ui_data(conv, NULL); |
| 5405 return; |
5405 return; |
| 5406 } |
5406 } |
| 5407 |
5407 |
| 5408 /* Setup drag-and-drop */ |
5408 /* Setup drag-and-drop */ |
| 5409 gtk_drag_dest_set(pane, |
5409 gtk_drag_dest_set(pane, |