mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Setting lag_min_show to -1 disables displaying lag entirely.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@390 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d4f8ad2c3f
commit
dc22d8830d
@ -527,7 +527,7 @@ static void statusbar_lag(SBAR_ITEM_REC *item, int ypos)
|
||||
lag_unknown = now-server->lag_last_check >
|
||||
MAX_LAG_UNKNOWN_TIME+settings_get_int("lag_check_time");
|
||||
|
||||
if (server->lag < lag_min_show && !lag_unknown)
|
||||
if (lag_min_show < 0 || (server->lag < lag_min_show && !lag_unknown))
|
||||
size_needed = 0; /* small lag, don't display */
|
||||
else {
|
||||
g_string_sprintf(str, "%d.%02d", server->lag/1000, (server->lag % 1000)/10);
|
||||
@ -541,16 +541,14 @@ static void statusbar_lag(SBAR_ITEM_REC *item, int ypos)
|
||||
size_needed = str->len+7;
|
||||
}
|
||||
|
||||
if (item->size != size_needed)
|
||||
{
|
||||
if (item->size != size_needed) {
|
||||
/* we need more (or less..) space! */
|
||||
statusbar_item_resize(item, size_needed);
|
||||
g_string_free(str, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->size != 0)
|
||||
{
|
||||
if (item->size != 0) {
|
||||
lag_last_draw = now;
|
||||
move(ypos, item->xpos);
|
||||
set_color((1 << 4)+3); addch('[');
|
||||
|
Loading…
Reference in New Issue
Block a user