# HG changeset patch # User Sadrul Habib Chowdhury # Date 1189145175 0 # Node ID c45e06d1901cd37c00c6db44813a73c72f7e822a # Parent 4fb981e14f64ea163bfe38e1382568d8bc3b3c48 Add a "
" after the message history after redisplaying a hidden conversation. Without this, it gets a little confusing when a new window pops up with a bunch of text in it. diff -r 4fb981e14f64 -r c45e06d1901c pidgin/gtkconv.c --- a/pidgin/gtkconv.c Fri Sep 07 05:28:35 2007 +0000 +++ b/pidgin/gtkconv.c Fri Sep 07 06:06:15 2007 +0000 @@ -7340,6 +7340,10 @@ gtkconv->attach.timer = 0; while (gtkconv->attach.current && count < 100) { /* XXX: 100 is a random value here */ PurpleConvMessage *msg = gtkconv->attach.current->data; + if (gtkconv->attach.when && gtkconv->attach.when < msg->when) { + gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "
", 0); + gtkconv->attach.when = 0; + } pidgin_conv_write_conv(gtkconv->active_conv, msg->who, msg->who, msg->what, msg->flags, msg->when); gtkconv->attach.current = gtkconv->attach.current->prev; count++; @@ -7371,8 +7375,8 @@ list = purple_conversation_get_message_history(conv); if (list) { - list = g_list_last(list); - gtkconv->attach.current = list; + gtkconv->attach.when = ((PurpleConvMessage*)(list->data))->when; + gtkconv->attach.current = g_list_last(list); gtkconv->attach.timer = g_idle_add(add_message_history_to_gtkconv, gtkconv); } else { purple_signal_emit(pidgin_conversations_get_handle(), diff -r 4fb981e14f64 -r c45e06d1901c pidgin/gtkconv.h --- a/pidgin/gtkconv.h Fri Sep 07 05:28:35 2007 +0000 +++ b/pidgin/gtkconv.h Fri Sep 07 06:06:15 2007 +0000 @@ -168,6 +168,7 @@ struct { int timer; GList *current; + time_t when; } attach; };