/[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.85 by flashcode, Sat Mar 5 22:42:31 2005 UTC revision 1.86 by flashcode, Tue Mar 15 21:15:36 2005 UTC
# Line 1027  gui_draw_buffer_status (t_gui_buffer *bu Line 1027  gui_draw_buffer_status (t_gui_buffer *bu
1027  {  {
1028      t_gui_window *ptr_win;      t_gui_window *ptr_win;
1029      t_weechat_hotlist *ptr_hotlist;      t_weechat_hotlist *ptr_hotlist;
1030      char format_more[32], *string;      char format_more[32], str_nicks[32], *string;
1031      int i, first_mode;      int i, first_mode, x;
1032            
1033      /* make gcc happy */      /* make gcc happy */
1034      (void) buffer;      (void) buffer;
# Line 1262  gui_draw_buffer_status (t_gui_buffer *bu Line 1262  gui_draw_buffer_status (t_gui_buffer *bu
1262              }              }
1263          }          }
1264                    
1265          /* display "-MORE-" if last line is not displayed */          /* display "-MORE-" (if last line is not displayed) & nicks count */
1266          gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE);          if (gui_buffer_has_nicklist (ptr_win->buffer))
1267            {
1268                snprintf (str_nicks, sizeof (str_nicks) - 1, "%d", CHANNEL(ptr_win->buffer)->nicks_count);
1269                x = ptr_win->win_width - strlen (str_nicks) - 4;
1270            }
1271            else
1272                x = ptr_win->win_width;
1273          string = weechat_convert_encoding (cfg_look_charset_decode,          string = weechat_convert_encoding (cfg_look_charset_decode,
1274                                             (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?                                             (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
1275                                             cfg_look_charset_internal : local_charset,                                             cfg_look_charset_internal : local_charset,
1276                                             _("-MORE-"));                                             _("-MORE-"));
1277            x -= strlen (string) - 1;
1278            if (x < 0)
1279                x = 0;
1280            gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE);
1281          if (ptr_win->sub_lines > 0)          if (ptr_win->sub_lines > 0)
1282              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,              mvwprintw (ptr_win->win_status, 0, x, "%s", string);
                        "%s", string);  
1283          else          else
1284          {          {
1285              snprintf (format_more, 32, "%%-%ds", strlen (string));              snprintf (format_more, sizeof (format_more) - 1, "%%-%ds", strlen (string));
1286              mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7,              mvwprintw (ptr_win->win_status, 0, x, format_more, " ");
1287                         format_more, " ");          }
1288            if (gui_buffer_has_nicklist (ptr_win->buffer))
1289            {
1290                gui_window_set_color (ptr_win->win_status,
1291                                      COLOR_WIN_STATUS_DELIMITERS);
1292                wprintw (ptr_win->win_status, " [");
1293                gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS);
1294                wprintw (ptr_win->win_status, "%s", str_nicks);
1295                gui_window_set_color (ptr_win->win_status,
1296                                      COLOR_WIN_STATUS_DELIMITERS);
1297                wprintw (ptr_win->win_status, "]");
1298          }          }
1299          free (string);          free (string);
1300                    

Legend:
Removed from v.1.85  
changed lines
  Added in v.1.86

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