/[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.66 by flashcode, Sun Feb 6 10:34:51 2005 UTC revision 1.67 by flashcode, Sun Feb 6 13:15:48 2005 UTC
# Line 354  gui_draw_buffer_title (t_gui_buffer *buf Line 354  gui_draw_buffer_title (t_gui_buffer *buf
354                  if (CHANNEL(buffer)->topic)                  if (CHANNEL(buffer)->topic)
355                  {                  {
356                      buf = weechat_convert_encoding (cfg_look_charset_decode,                      buf = weechat_convert_encoding (cfg_look_charset_decode,
357                                                      local_charset,                                                      (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
358                                                        cfg_look_charset_internal : local_charset,
359                                                      CHANNEL(buffer)->topic);                                                      CHANNEL(buffer)->topic);
360                      mvwprintw (ptr_win->win_title, 0, 0, format, buf);                      mvwprintw (ptr_win->win_title, 0, 0, format, buf);
361                      free (buf);                      free (buf);
# Line 915  gui_draw_buffer_status (t_gui_buffer *bu Line 916  gui_draw_buffer_status (t_gui_buffer *bu
916  {  {
917      t_gui_window *ptr_win;      t_gui_window *ptr_win;
918      t_weechat_hotlist *ptr_hotlist;      t_weechat_hotlist *ptr_hotlist;
919      char format_more[32];      char format_more[32], *string;
920      int i, first_mode;      int i, first_mode;
921            
922      /* make gcc happy */      /* make gcc happy */
# Line 957  gui_draw_buffer_status (t_gui_buffer *bu Line 958  gui_draw_buffer_status (t_gui_buffer *bu
958                                    COLOR_WIN_STATUS);                                    COLOR_WIN_STATUS);
959              wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name);              wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name);
960              if (SERVER(ptr_win->buffer)->is_away)              if (SERVER(ptr_win->buffer)->is_away)
961                  wprintw (ptr_win->win_status, _("(away)"));              {
962                    string = weechat_convert_encoding (cfg_look_charset_decode,
963                                                      (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
964                                                      cfg_look_charset_internal : local_charset,
965                                                      _("(away)"));
966                    wprintw (ptr_win->win_status, string);
967                    free (string);
968                }
969              gui_window_set_color (ptr_win->win_status,              gui_window_set_color (ptr_win->win_status,
970                                COLOR_WIN_STATUS_DELIMITERS);                                COLOR_WIN_STATUS_DELIMITERS);
971              wprintw (ptr_win->win_status, "] ");              wprintw (ptr_win->win_status, "] ");
# Line 1035  gui_draw_buffer_status (t_gui_buffer *bu Line 1043  gui_draw_buffer_status (t_gui_buffer *bu
1043                  wprintw (ptr_win->win_status, "%d:<DCC> ",                  wprintw (ptr_win->win_status, "%d:<DCC> ",
1044                           ptr_win->buffer->number);                           ptr_win->buffer->number);
1045              else              else
1046                  wprintw (ptr_win->win_status, _("%d:[not connected] "),              {
1047                    string = weechat_convert_encoding (cfg_look_charset_decode,
1048                                                      (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
1049                                                      cfg_look_charset_internal : local_charset,
1050                                                      _("%d:[not connected] "));
1051                    wprintw (ptr_win->win_status, string,
1052                           ptr_win->buffer->number);                           ptr_win->buffer->number);
1053                    free (string);
1054                }
1055          }          }
1056                    
1057          /* display list of other active windows (if any) with numbers */          /* display list of other active windows (if any) with numbers */
# Line 1046  gui_draw_buffer_status (t_gui_buffer *bu Line 1061  gui_draw_buffer_status (t_gui_buffer *bu
1061                                    COLOR_WIN_STATUS_DELIMITERS);                                    COLOR_WIN_STATUS_DELIMITERS);
1062              wprintw (ptr_win->win_status, "[");              wprintw (ptr_win->win_status, "[");
1063              gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS);              gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS);
1064              wprintw (ptr_win->win_status, _("Act: "));              string = weechat_convert_encoding (cfg_look_charset_decode,
1065                                                   (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
1066                                                   cfg_look_charset_internal : local_charset,
1067                                                   _("Act: "));
1068                wprintw (ptr_win->win_status, string);
1069                free (string);
1070              for (ptr_hotlist = hotlist; ptr_hotlist;              for (ptr_hotlist = hotlist; ptr_hotlist;
1071                   ptr_hotlist = ptr_hotlist->next_hotlist)                   ptr_hotlist = ptr_hotlist->next_hotlist)
1072              {              {
# Line 1090  gui_draw_buffer_status (t_gui_buffer *bu Line 1110  gui_draw_buffer_status (t_gui_buffer *bu
1110                                        COLOR_WIN_STATUS_DELIMITERS);                                        COLOR_WIN_STATUS_DELIMITERS);
1111                  wprintw (ptr_win->win_status, "[");                  wprintw (ptr_win->win_status, "[");
1112                  gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS);                  gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS);
1113                  wprintw (ptr_win->win_status, _("Lag: %.1f"),                  string = weechat_convert_encoding (cfg_look_charset_decode,
1114                                                      (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
1115                                                      cfg_look_charset_internal : local_charset,
1116                                                      _("Lag: %.1f"));
1117                    wprintw (ptr_win->win_status, string,
1118                           ((float)(SERVER(ptr_win->buffer)->lag)) / 1000);                           ((float)(SERVER(ptr_win->buffer)->lag)) / 1000);
1119                    free (string);
1120                  gui_window_set_color (ptr_win->win_status,                  gui_window_set_color (ptr_win->win_status,
1121                                        COLOR_WIN_STATUS_DELIMITERS);                                        COLOR_WIN_STATUS_DELIMITERS);
1122                  wprintw (ptr_win->win_status, "]");                  wprintw (ptr_win->win_status, "]");
# Line 1100  gui_draw_buffer_status (t_gui_buffer *bu Line 1125  gui_draw_buffer_status (t_gui_buffer *bu
1125                    
1126          /* display "-MORE-" if last line is not displayed */          /* display "-MORE-" if last line is not displayed */
1127          gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE);          gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE);
1128            string = weechat_convert_encoding (cfg_look_charset_decode,
1129                                               (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
1130                                               cfg_look_charset_internal : local_charset,
1131                                               _("-MORE-"));
1132          if (ptr_win->sub_lines > 0)          if (ptr_win->sub_lines > 0)
1133              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,
1134                         _("-MORE-"));                         "%s", string);
1135          else          else
1136          {          {
1137              snprintf (format_more, 32, "%%-%ds", strlen (_("-MORE-")));              snprintf (format_more, 32, "%%-%ds", strlen (string));
1138              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,
1139                         format_more, " ");                         format_more, " ");
1140          }          }
1141            free (string);
1142                    
1143          wrefresh (ptr_win->win_status);          wrefresh (ptr_win->win_status);
1144          refresh ();          refresh ();
# Line 2289  gui_printf_color_type (t_gui_buffer *buf Line 2319  gui_printf_color_type (t_gui_buffer *buf
2319      else      else
2320          buf2 = strdup (buf);          buf2 = strdup (buf);
2321            
2322      buf3 = weechat_convert_encoding (cfg_look_charset_decode, local_charset, buf2);      buf3 = weechat_convert_encoding (cfg_look_charset_decode,
2323                                         (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
2324                                         cfg_look_charset_internal : local_charset,
2325                                         buf2);
2326            
2327      if (gui_init_ok)      if (gui_init_ok)
2328      {      {

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

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