| 4373 PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); |
4373 PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); |
| 4374 if (prpl_info->options & OPT_PROTO_CHAT_TOPIC) |
4374 if (prpl_info->options & OPT_PROTO_CHAT_TOPIC) |
| 4375 { |
4375 { |
| 4376 GtkWidget *hbox, *label; |
4376 GtkWidget *hbox, *label; |
| 4377 PidginChatPane *gtkchat = gtkconv->u.chat; |
4377 PidginChatPane *gtkchat = gtkconv->u.chat; |
| 4378 |
4378 |
| 4379 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
4379 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
| 4380 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
4380 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 4381 |
4381 |
| 4382 label = gtk_label_new(_("Topic:")); |
4382 label = gtk_label_new(_("Topic:")); |
| 4383 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
4383 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
| 4522 g_return_val_if_fail (tooltip.gtkconv == gtkconv, FALSE); |
4522 g_return_val_if_fail (tooltip.gtkconv == gtkconv, FALSE); |
| 4523 |
4523 |
| 4524 conv = gtkconv->active_conv; |
4524 conv = gtkconv->active_conv; |
| 4525 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { |
4525 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { |
| 4526 node = (PurpleBlistNode*)(purple_blist_find_chat(conv->account, conv->name)); |
4526 node = (PurpleBlistNode*)(purple_blist_find_chat(conv->account, conv->name)); |
| |
4527 #if 0 |
| |
4528 /* Using the transient blist nodes to show the tooltip doesn't quite work yet. */ |
| |
4529 if (!node) |
| |
4530 node = g_object_get_data(G_OBJECT(gtkconv->imhtml), "transient_chat"); |
| |
4531 #endif |
| 4527 } else { |
4532 } else { |
| 4528 node = (PurpleBlistNode*)(purple_find_buddy(conv->account, conv->name)); |
4533 node = (PurpleBlistNode*)(purple_find_buddy(conv->account, conv->name)); |
| 4529 } |
4534 #if 0 |
| 4530 |
4535 if (!node) |
| 4531 if (node) |
4536 node = g_object_get_data(G_OBJECT(gtkconv->imhtml), "transient_buddy"); |
| |
4537 #endif |
| |
4538 } |
| |
4539 |
| |
4540 if (node) |
| 4532 pidgin_blist_draw_tooltip(node, gtkconv->infopane); |
4541 pidgin_blist_draw_tooltip(node, gtkconv->infopane); |
| 4533 return FALSE; |
4542 return FALSE; |
| 4534 } |
4543 } |
| 4535 |
4544 |
| 4536 static void |
4545 static void |
| 4537 pidgin_conv_leave_cb (GtkWidget *w, GdkEventCrossing *e, PidginConversation *gtkconv) |
4546 pidgin_conv_leave_cb (GtkWidget *w, GdkEventCrossing *e, PidginConversation *gtkconv) |
| 4538 { |
4547 { |
| 4539 pidgin_blist_tooltip_destroy(); |
4548 pidgin_blist_tooltip_destroy(); |
| 4540 reset_tooltip(); |
4549 reset_tooltip(); |
| 4541 } |
4550 } |
| 7475 { |
7484 { |
| 7476 int timer; |
7485 int timer; |
| 7477 purple_conversation_set_data(conv, "unseen-count", NULL); |
7486 purple_conversation_set_data(conv, "unseen-count", NULL); |
| 7478 purple_conversation_set_data(conv, "unseen-state", NULL); |
7487 purple_conversation_set_data(conv, "unseen-state", NULL); |
| 7479 purple_conversation_set_ui_ops(conv, pidgin_conversations_get_conv_ui_ops()); |
7488 purple_conversation_set_ui_ops(conv, pidgin_conversations_get_conv_ui_ops()); |
| 7480 private_gtkconv_new(conv, FALSE); |
7489 if (!PIDGIN_CONVERSATION(conv)) |
| |
7490 private_gtkconv_new(conv, FALSE); |
| 7481 timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer")); |
7491 timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer")); |
| 7482 if (timer) |
7492 if (timer) { |
| 7483 purple_timeout_remove(timer); |
7493 purple_timeout_remove(timer); |
| |
7494 purple_conversation_set_data(conv, "close-timer", NULL); |
| |
7495 } |
| 7484 } |
7496 } |
| 7485 |
7497 |
| 7486 gboolean pidgin_conv_attach_to_conversation(PurpleConversation *conv) |
7498 gboolean pidgin_conv_attach_to_conversation(PurpleConversation *conv) |
| 7487 { |
7499 { |
| 7488 GList *list; |
7500 GList *list; |
| 7489 PidginConversation *gtkconv; |
7501 PidginConversation *gtkconv; |
| 7490 |
7502 |
| 7491 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) { |
7503 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) { |
| |
7504 /* This is pretty much always the case now. */ |
| 7492 gtkconv = PIDGIN_CONVERSATION(conv); |
7505 gtkconv = PIDGIN_CONVERSATION(conv); |
| 7493 if (gtkconv->win != hidden_convwin) |
7506 if (gtkconv->win != hidden_convwin) |
| 7494 return FALSE; |
7507 return FALSE; |
| 7495 pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
7508 pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
| 7496 pidgin_conv_placement_place(gtkconv); |
7509 pidgin_conv_placement_place(gtkconv); |
| 7497 purple_signal_emit(pidgin_conversations_get_handle(), |
7510 purple_signal_emit(pidgin_conversations_get_handle(), |
| 7498 "conversation-displayed", gtkconv); |
7511 "conversation-displayed", gtkconv); |
| |
7512 list = gtkconv->convs; |
| |
7513 while (list) { |
| |
7514 pidgin_conv_attach(list->data); |
| |
7515 list = list->next; |
| |
7516 } |
| 7499 return TRUE; |
7517 return TRUE; |
| 7500 } |
7518 } |
| 7501 |
7519 |
| 7502 pidgin_conv_attach(conv); |
7520 pidgin_conv_attach(conv); |
| 7503 gtkconv = PIDGIN_CONVERSATION(conv); |
7521 gtkconv = PIDGIN_CONVERSATION(conv); |