Mercurial > hg
comparison mcabber/src/hbuf.c @ 1204:e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 28 Apr 2007 21:52:57 +0200 |
parents | 5be2408a6534 |
children | 2de8f8ba1f34 |
comparison
equal
deleted
inserted
replaced
1203:c96fef31ff96 | 1204:e802ec0c02d2 |
---|---|
292 // text pointers after use. | 292 // text pointers after use. |
293 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n) | 293 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n) |
294 { | 294 { |
295 unsigned int i; | 295 unsigned int i; |
296 hbuf_block *blk; | 296 hbuf_block *blk; |
297 guchar last_persist_prefixflags = 0; | 297 guint last_persist_prefixflags = 0; |
298 GList *last_persist; // last persistent flags | 298 GList *last_persist; // last persistent flags |
299 hbb_line **array, **array_elt; | 299 hbb_line **array, **array_elt; |
300 | 300 |
301 // To be able to correctly highlight multi-line messages, | 301 // To be able to correctly highlight multi-line messages, |
302 // we need to look at the last non-null prefix, which should be the first | 302 // we need to look at the last non-null prefix, which should be the first |
325 (*array_elt)->text = g_strndup(blk->ptr, maxlen); | 325 (*array_elt)->text = g_strndup(blk->ptr, maxlen); |
326 | 326 |
327 if ((blk->flags & HBB_FLAG_PERSISTENT) && blk->prefix.flags) { | 327 if ((blk->flags & HBB_FLAG_PERSISTENT) && blk->prefix.flags) { |
328 last_persist_prefixflags = blk->prefix.flags; | 328 last_persist_prefixflags = blk->prefix.flags; |
329 } else { | 329 } else { |
330 // Propagate highlighting flag | 330 // Propagate highlighting flags |
331 (*array_elt)->flags |= last_persist_prefixflags & HBB_PREFIX_HLIGHT; | 331 (*array_elt)->flags |= last_persist_prefixflags & |
332 (HBB_PREFIX_HLIGHT_OUT | HBB_PREFIX_HLIGHT); | |
332 } | 333 } |
333 | 334 |
334 hbuf = g_list_next(hbuf); | 335 hbuf = g_list_next(hbuf); |
335 } else | 336 } else |
336 break; | 337 break; |