From: <sa...@us...> - 2006-08-09 06:23:48
|
Revision: 16678 Author: sadrul Date: 2006-08-08 23:23:18 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16678&view=rev Log Message: ----------- Show timestamps (or not) in conversations. Modified Paths: -------------- trunk/console/gntconv.c trunk/console/libgnt/gntutils.c Modified: trunk/console/gntconv.c =================================================================== --- trunk/console/gntconv.c 2006-08-09 04:49:19 UTC (rev 16677) +++ trunk/console/gntconv.c 2006-08-09 06:23:18 UTC (rev 16678) @@ -229,6 +229,9 @@ g_return_if_fail(ggconv != NULL); + if (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))) { char * name = g_strdup_printf("%s: ", who); Modified: trunk/console/libgnt/gntutils.c =================================================================== --- trunk/console/libgnt/gntutils.c 2006-08-09 04:49:19 UTC (rev 16677) +++ trunk/console/libgnt/gntutils.c 2006-08-09 06:23:18 UTC (rev 16678) @@ -8,23 +8,26 @@ /* XXX: ew ... everyone look away */ last = s; - while (*s) + if (s) { - if (*s == '\n' || *s == '\r') + while (*s) { - count++; - len = g_utf8_pointer_to_offset(last, s); - if (max < len) - max = len; - last = s + 1; + if (*s == '\n' || *s == '\r') + { + count++; + len = g_utf8_pointer_to_offset(last, s); + if (max < len) + max = len; + last = s + 1; + } + s++; } - s++; + + len = g_utf8_pointer_to_offset(last, s); + if (max < len) + max = len; } - len = g_utf8_pointer_to_offset(last, s); - if (max < len) - max = len; - if (height) *height = count; if (width) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |