/[weechat]/weechat/src/gui/curses/gui-display.c
ViewVC logotype

Diff of /weechat/src/gui/curses/gui-display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.124 by flashcode, Fri Nov 4 16:14:28 2005 UTC revision 1.125 by flashcode, Sat Nov 5 11:34:53 2005 UTC
# Line 298  gui_color_encode (unsigned char *string) Line 298  gui_color_encode (unsigned char *string)
298                  string++;                  string++;
299                  switch (string[0])                  switch (string[0])
300                  {                  {
301                        case '%': /* double '%' replaced by single '%' */
302                            out[out_pos++] = string[0];
303                            string++;
304                            break;
305                      case 'B': /* bold */                      case 'B': /* bold */
306                          out[out_pos++] = GUI_ATTR_BOLD_CHAR;                          out[out_pos++] = GUI_ATTR_BOLD_CHAR;
307                          string++;                          string++;
# Line 727  void Line 731  void
731  gui_draw_buffer_title (t_gui_buffer *buffer, int erase)  gui_draw_buffer_title (t_gui_buffer *buffer, int erase)
732  {  {
733      t_gui_window *ptr_win;      t_gui_window *ptr_win;
734      char format[32], *buf;      char format[32], *buf, *buf2;
735            
736      if (!gui_ok)      if (!gui_ok)
737          return;          return;
# Line 745  gui_draw_buffer_title (t_gui_buffer *buf Line 749  gui_draw_buffer_title (t_gui_buffer *buf
749              {              {
750                  if (CHANNEL(buffer)->topic)                  if (CHANNEL(buffer)->topic)
751                  {                  {
752                      buf = weechat_convert_encoding ((local_utf8) ?                      buf = (char *)gui_color_decode ((unsigned char *)(CHANNEL(buffer)->topic), 0);
753                                                      cfg_look_charset_decode_iso : cfg_look_charset_decode_utf,                      buf2 = weechat_convert_encoding ((local_utf8) ?
754                                                      (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?                                                       cfg_look_charset_decode_iso : cfg_look_charset_decode_utf,
755                                                      cfg_look_charset_internal : local_charset,                                                       (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
756                                                      CHANNEL(buffer)->topic);                                                       cfg_look_charset_internal : local_charset,
757                      mvwprintw (ptr_win->win_title, 0, 0, format, buf);                                                       (buf) ? buf : CHANNEL(buffer)->topic);
758                      free (buf);                      mvwprintw (ptr_win->win_title, 0, 0, format, (buf2) ? buf2 : CHANNEL(buffer)->topic);
759                        if (buf)
760                            free (buf);
761                        if (buf2)
762                            free (buf2);
763                  }                  }
764                  else                  else
765                      mvwprintw (ptr_win->win_title, 0, 0, format, " ");                      mvwprintw (ptr_win->win_title, 0, 0, format, " ");

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26