Mercurial > pidgin
comparison console/plugins/gnthistory.c @ 14787:584da235633e
[gaim-migrate @ 17551]
Do not print an extra newline for HTML logs.
(20:17:27) seanegan: sadrul: are you checking the flags from gaim_log_read?
(20:18:18) elb: sadrul: for HTML logs, it should strip 0x0a and turn <br> into 0x0a
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 20 Oct 2006 00:19:41 +0000 |
parents | 9de2963a8184 |
children | c7651586e27b |
comparison
equal
deleted
inserted
replaced
14786:6d0ca3a1d464 | 14787:584da235633e |
---|---|
43 GaimAccount *account = gaim_conversation_get_account(c); | 43 GaimAccount *account = gaim_conversation_get_account(c); |
44 const char *name = gaim_conversation_get_name(c); | 44 const char *name = gaim_conversation_get_name(c); |
45 GaimConversationType convtype; | 45 GaimConversationType convtype; |
46 GList *logs = NULL; | 46 GList *logs = NULL; |
47 const char *alias = name; | 47 const char *alias = name; |
48 guint flags; | 48 GaimLogReadFlags flags; |
49 char *history; | 49 char *history; |
50 char *header; | 50 char *header; |
51 GaimMessageFlags mflag; | 51 GaimMessageFlags mflag; |
52 | 52 |
53 convtype = gaim_conversation_get_type(c); | 53 convtype = gaim_conversation_get_type(c); |
117 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias, | 117 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias, |
118 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); | 118 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); |
119 gaim_conversation_write(c, "", header, mflag, time(NULL)); | 119 gaim_conversation_write(c, "", header, mflag, time(NULL)); |
120 g_free(header); | 120 g_free(header); |
121 | 121 |
122 g_strchomp(history); | 122 if (flags & GAIM_LOG_READ_NO_NEWLINE) |
123 gaim_str_strip_char(history, '\n'); | |
123 gaim_conversation_write(c, "", history, mflag, time(NULL)); | 124 gaim_conversation_write(c, "", history, mflag, time(NULL)); |
124 g_free(history); | 125 g_free(history); |
125 | 126 |
126 gaim_conversation_write(c, "", "<hr>", mflag, time(NULL)); | 127 gaim_conversation_write(c, "", "<hr>", mflag, time(NULL)); |
127 | 128 |