Mercurial > pidgin.yaz
comparison console/plugins/gnthistory.c @ 14234:04bdbbefbd1d
[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 <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 20 Aug 2006 19:37:33 +0000 |
parents | 7c560c01b8f9 |
children | 9de2963a8184 |
comparison
equal
deleted
inserted
replaced
14233:4832623a6552 | 14234:04bdbbefbd1d |
---|---|
48 GList *logs = NULL; | 48 GList *logs = NULL; |
49 const char *alias = name; | 49 const char *alias = name; |
50 guint flags; | 50 guint flags; |
51 char *history; | 51 char *history; |
52 char *header; | 52 char *header; |
53 GaimMessageFlags mflag; | |
53 | 54 |
54 convtype = gaim_conversation_get_type(c); | 55 convtype = gaim_conversation_get_type(c); |
55 if (convtype == GAIM_CONV_TYPE_IM) | 56 if (convtype == GAIM_CONV_TYPE_IM) |
56 { | 57 { |
57 GSList *buddies; | 58 GSList *buddies; |
110 } | 111 } |
111 | 112 |
112 if (logs == NULL) | 113 if (logs == NULL) |
113 return; | 114 return; |
114 | 115 |
116 mflag = GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_DELAYED; | |
115 history = gaim_log_read((GaimLog*)logs->data, &flags); | 117 history = gaim_log_read((GaimLog*)logs->data, &flags); |
116 | 118 |
117 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias, | 119 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias, |
118 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); | 120 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time))); |
119 gaim_conversation_write(c, "", header, GAIM_MESSAGE_NO_LOG, time(NULL)); | 121 gaim_conversation_write(c, "", header, mflag, time(NULL)); |
120 g_free(header); | 122 g_free(header); |
121 | 123 |
122 g_strchomp(history); | 124 g_strchomp(history); |
123 gaim_conversation_write(c, "", history, GAIM_MESSAGE_NO_LOG, time(NULL)); | 125 gaim_conversation_write(c, "", history, mflag, time(NULL)); |
124 g_free(history); | 126 g_free(history); |
125 | 127 |
126 gaim_conversation_write(c, "", "\n---------------\n", GAIM_MESSAGE_NO_LOG, time(NULL)); | 128 gaim_conversation_write(c, "", "<hr>", mflag, time(NULL)); |
127 | 129 |
128 g_list_foreach(logs, (GFunc)gaim_log_free, NULL); | 130 g_list_foreach(logs, (GFunc)gaim_log_free, NULL); |
129 g_list_free(logs); | 131 g_list_free(logs); |
130 } | 132 } |
131 | 133 |