# HG changeset patch # User Sadrul Habib Chowdhury # Date 1156102653 0 # Node ID 04bdbbefbd1dd57140ab7fc5d3031ed7bc380fc9 # Parent 4832623a6552b864f5fd78ed5758db593a4712d5 [gaim-migrate @ 16916] Mark the messages from gnthistory as delayed, and don't print the timestamps for delayed messages (I think it makes sense). committer: Tailor Script diff -r 4832623a6552 -r 04bdbbefbd1d console/gntconv.c --- a/console/gntconv.c Sun Aug 20 18:55:37 2006 +0000 +++ b/console/gntconv.c Sun Aug 20 19:37:33 2006 +0000 @@ -240,7 +240,9 @@ gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); - if (gaim_prefs_get_bool("/gaim/gnt/conversations/timestamps")) + /* Unnecessary to print the timestamp for delayed message */ + if (!(flags & GAIM_MESSAGE_DELAYED) && + gaim_prefs_get_bool("/gaim/gnt/conversations/timestamps")) gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), gaim_utf8_strftime("(%H:%M:%S) ", localtime(&mtime)), GNT_TEXT_FLAG_DIM); if (who && *who && (flags & (GAIM_MESSAGE_SEND | GAIM_MESSAGE_RECV))) diff -r 4832623a6552 -r 04bdbbefbd1d console/plugins/gnthistory.c --- a/console/plugins/gnthistory.c Sun Aug 20 18:55:37 2006 +0000 +++ b/console/plugins/gnthistory.c Sun Aug 20 19:37:33 2006 +0000 @@ -50,6 +50,7 @@ guint flags; char *history; char *header; + GaimMessageFlags mflag; convtype = gaim_conversation_get_type(c); if (convtype == GAIM_CONV_TYPE_IM) @@ -112,18 +113,19 @@ if (logs == NULL) return; + mflag = GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_DELAYED; history = gaim_log_read((GaimLog*)logs->data, &flags); header = g_strdup_printf(_("Conversation with %s on %s:
"), alias, gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); - gaim_conversation_write(c, "", header, GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conversation_write(c, "", header, mflag, time(NULL)); g_free(header); g_strchomp(history); - gaim_conversation_write(c, "", history, GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conversation_write(c, "", history, mflag, time(NULL)); g_free(history); - gaim_conversation_write(c, "", "\n---------------\n", GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conversation_write(c, "", "
", mflag, time(NULL)); g_list_foreach(logs, (GFunc)gaim_log_free, NULL); g_list_free(logs);