From: <sa...@us...> - 2006-08-20 19:37:43
|
Revision: 16916 Author: sadrul Date: 2006-08-20 12:37:33 -0700 (Sun, 20 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16916&view=rev Log Message: ----------- Mark the messages from gnthistory as delayed, and don't print the timestamps for delayed messages (I think it makes sense). Modified Paths: -------------- trunk/console/gntconv.c trunk/console/plugins/gnthistory.c Modified: trunk/console/gntconv.c =================================================================== --- trunk/console/gntconv.c 2006-08-20 18:55:37 UTC (rev 16915) +++ trunk/console/gntconv.c 2006-08-20 19:37:33 UTC (rev 16916) @@ -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))) Modified: trunk/console/plugins/gnthistory.c =================================================================== --- trunk/console/plugins/gnthistory.c 2006-08-20 18:55:37 UTC (rev 16915) +++ trunk/console/plugins/gnthistory.c 2006-08-20 19:37:33 UTC (rev 16916) @@ -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(_("<b>Conversation with %s on %s:</b><br>"), 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, "", "<hr>", mflag, time(NULL)); g_list_foreach(logs, (GFunc)gaim_log_free, NULL); g_list_free(logs); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |