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; |
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 |
|
|