# HG changeset patch # User Sadrul Habib Chowdhury # Date 1189844470 0 # Node ID d9a6d6ac2537b9aac99c298e012a8195115cc243 # Parent 20c33683862957ea94839c6c50c067a785835ba9 We can do this without forcing a minor bump. diff -r 20c336838629 -r d9a6d6ac2537 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Sep 15 08:03:47 2007 +0000 +++ b/pidgin/gtkconv.c Sat Sep 15 08:21:10 2007 +0000 @@ -7363,12 +7363,14 @@ PidginConversation *gtkconv = data; int count = 0; int timer = gtkconv->attach.timer; + time_t when = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(gtkconv->entry), "attach-start-time")); + 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; + if (when && when < msg->when) { + gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "

", 0); + g_object_set_data(G_OBJECT(gtkconv->entry), "attach-start-time", NULL); } pidgin_conv_write_conv(gtkconv->active_conv, msg->who, msg->who, msg->what, msg->flags, msg->when); gtkconv->attach.current = gtkconv->attach.current->prev; @@ -7401,7 +7403,8 @@ list = purple_conversation_get_message_history(conv); if (list) { - gtkconv->attach.when = ((PurpleConvMessage*)(list->data))->when; + g_object_set_data(G_OBJECT(gtkconv->entry), "attach-start-time", + GINT_TO_POINTER(((PurpleConvMessage*)(list->data))->when)); gtkconv->attach.current = g_list_last(list); gtkconv->attach.timer = g_idle_add(add_message_history_to_gtkconv, gtkconv); } else { diff -r 20c336838629 -r d9a6d6ac2537 pidgin/gtkconv.h --- a/pidgin/gtkconv.h Sat Sep 15 08:03:47 2007 +0000 +++ b/pidgin/gtkconv.h Sat Sep 15 08:21:10 2007 +0000 @@ -168,7 +168,6 @@ struct { int timer; GList *current; - time_t when; } attach; };