Mercurial > pidgin
comparison console/gntconv.c @ 13887:7d3256b253ec
[gaim-migrate @ 16368]
Minor tweaks to Makefile and some other things.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 28 Jun 2006 18:50:33 +0000 |
parents | 90eb736b4c26 |
children | a621329e8c85 |
comparison
equal
deleted
inserted
replaced
13886:90eb736b4c26 | 13887:7d3256b253ec |
---|---|
178 gg_write_conv(GaimConversation *conv, const char *who, const char *alias, | 178 gg_write_conv(GaimConversation *conv, const char *who, const char *alias, |
179 const char *message, GaimMessageFlags flags, time_t mtime) | 179 const char *message, GaimMessageFlags flags, time_t mtime) |
180 { | 180 { |
181 GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); | 181 GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); |
182 char *strip; | 182 char *strip; |
183 char *name; | |
184 | 183 |
185 g_return_if_fail(ggconv != NULL); | 184 g_return_if_fail(ggconv != NULL); |
186 | 185 |
187 strip = gaim_markup_strip_html(message); | 186 strip = gaim_markup_strip_html(message); |
188 if (alias && *alias) | 187 |
189 name = g_strdup_printf("%s: ", alias); | 188 if (flags & (GAIM_MESSAGE_SEND | GAIM_MESSAGE_RECV)) |
190 else if (who && *who) | 189 { |
191 name = g_strdup_printf("%s: ", who); | 190 char *name; |
192 else | 191 if (alias && *alias) |
193 name = g_strdup(""); | 192 name = g_strdup_printf("%s: ", alias); |
194 | 193 else if (who && *who) |
195 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), | 194 name = g_strdup_printf("%s: ", who); |
196 name, GNT_TEXT_FLAG_BOLD); | 195 else |
196 name = g_strdup(""); | |
197 | |
198 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), | |
199 name, GNT_TEXT_FLAG_BOLD); | |
200 g_free(name); | |
201 } | |
197 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), | 202 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), |
198 strip, 0); | 203 strip, 0); |
199 gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); | 204 gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); |
200 gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); | 205 gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); |
201 | 206 |
202 g_free(strip); | 207 g_free(strip); |
203 g_free(name); | |
204 } | 208 } |
205 | 209 |
206 static void | 210 static void |
207 gg_chat_add_users(GaimConversation *conv, GList *users, GList *flags, GList *aliases, gboolean new_arrivals) | 211 gg_chat_add_users(GaimConversation *conv, GList *users, GList *flags, GList *aliases, gboolean new_arrivals) |
208 {} | 212 {} |