# HG changeset patch # User Sadrul Habib Chowdhury # Date 1155104598 0 # Node ID 81648c6aa918259098fa17bb66e2644046dc5a61 # Parent 2d1b41e3cf0d02b0b571fb838e397927df259b63 [gaim-migrate @ 16678] Show timestamps (or not) in conversations. committer: Tailor Script diff -r 2d1b41e3cf0d -r 81648c6aa918 console/gntconv.c --- a/console/gntconv.c Wed Aug 09 03:41:45 2006 +0000 +++ b/console/gntconv.c Wed Aug 09 06:23:18 2006 +0000 @@ -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); diff -r 2d1b41e3cf0d -r 81648c6aa918 console/libgnt/gntutils.c --- a/console/libgnt/gntutils.c Wed Aug 09 03:41:45 2006 +0000 +++ b/console/libgnt/gntutils.c Wed Aug 09 06:23:18 2006 +0000 @@ -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)