diff --git a/src/bfu/leds.c b/src/bfu/leds.c index 4e4bd033..65d5bf08 100644 --- a/src/bfu/leds.c +++ b/src/bfu/leds.c @@ -177,6 +177,7 @@ init_led_panel(struct led_panel *leds) } } +#if 0 static int draw_timer(struct terminal *term, int xpos, int ypos, struct color_pair *color) { @@ -191,6 +192,7 @@ draw_timer(struct terminal *term, int xpos, int ypos, struct color_pair *color) return length; } +#endif static int draw_timer_node(struct terminal *term, int xpos, int ypos, unsigned int node_number) @@ -207,7 +209,7 @@ draw_timer_node(struct terminal *term, int xpos, int ypos, unsigned int node_num return length; } - +#if 0 static int draw_show_ip(struct session *ses, int xpos, int ypos, struct color_pair *color) { @@ -224,6 +226,7 @@ draw_show_ip(struct session *ses, int xpos, int ypos, struct color_pair *color) } return 0; } +#endif static int draw_show_ip_node(struct session *ses, int xpos, int ypos, unsigned int node_number) @@ -242,6 +245,7 @@ draw_show_ip_node(struct session *ses, int xpos, int ypos, unsigned int node_num return 0; } +#if 0 static int draw_temperature(struct session *ses, int xpos, int ypos, struct color_pair *color) { @@ -284,6 +288,7 @@ draw_temperature(struct session *ses, int xpos, int ypos, struct color_pair *col return length; } +#endif static int draw_temperature_node(struct session *ses, int xpos, int ypos, unsigned int node_number) @@ -329,6 +334,7 @@ draw_temperature_node(struct session *ses, int xpos, int ypos, unsigned int node } #ifdef HAVE_STRFTIME +#if 0 static int draw_clock(struct terminal *term, int xpos, int ypos, struct color_pair *color) { @@ -344,6 +350,7 @@ draw_clock(struct terminal *term, int xpos, int ypos, struct color_pair *color) return length; } +#endif static int draw_clock_node(struct terminal *term, int xpos, int ypos, unsigned int node_number) @@ -382,7 +389,6 @@ void draw_leds(struct session *ses) { struct terminal *term = ses->tab->term; -// struct color_pair *led_color = NULL; unsigned int node_number = 0; int i; int xpos = term->width - LEDS_COUNT - 3; @@ -394,21 +400,13 @@ draw_leds(struct session *ses) * could do that easily. */ if (get_opt_int("ui.timer.enable", NULL) == 2) { node_number = get_bfu_color_node(term, "status.status-text"); -// led_color = get_bfu_color(term, "status.status-text"); -// if (!led_color) goto end; if (!node_number) goto end; -// term->leds_length += draw_timer(term, xpos, ypos, led_color); term->leds_length += draw_timer_node(term, xpos, ypos, node_number); } if (!get_leds_panel_enable()) return; -// if (!led_color) { -// led_color = get_bfu_color(term, "status.status-text"); -// if (!led_color) goto end; -// } - if (!node_number) { node_number = get_bfu_color_node(term, "status.status-text"); if (!node_number) goto end; @@ -416,42 +414,34 @@ draw_leds(struct session *ses) #ifdef HAVE_STRFTIME if (get_leds_clock_enable()) { -// term->leds_length += draw_clock(term, xpos - term->leds_length, ypos, led_color); term->leds_length += draw_clock_node(term, xpos - term->leds_length, ypos, node_number); } #endif if (get_leds_temperature_enable()) { -// struct color_pair *color = get_bfu_color(term, "status.status-text"); unsigned int node_number = get_bfu_color_node(term, "status.status-text"); -// if (color) term->leds_length += draw_temperature(ses, xpos - term->leds_length, ypos, color); if (node_number) term->leds_length += draw_temperature_node(ses, xpos - term->leds_length, ypos, node_number); } if (get_leds_show_ip_enable()) { -// struct color_pair *color = get_bfu_color(term, "status.showip-text"); unsigned int node_number = get_bfu_color_node(term, "status.showip-text"); -// if (color) term->leds_length += draw_show_ip(ses, xpos - term->leds_length, ypos, color); if (node_number) term->leds_length += draw_show_ip_node(ses, xpos - term->leds_length, ypos, node_number); } /* We must shift the whole thing by one char to left, because we don't * draft the char in the right-down corner :(. */ -// draw_char(term, xpos, ypos, '[', 0, led_color); draw_char_node(term, xpos, ypos, '[', 0, node_number); for (i = 0; i < LEDS_COUNT; i++) { struct led *led = &ses->status.leds.leds[i]; -// draw_char(term, xpos + i + 1, ypos, led->value__, 0, led_color); draw_char_node(term, xpos + i + 1, ypos, led->value__, 0, node_number); led->value_changed__ = 0; } -// draw_char(term, xpos + LEDS_COUNT + 1, ypos, ']', 0, led_color); draw_char_node(term, xpos + LEDS_COUNT + 1, ypos, ']', 0, node_number); term->leds_length += LEDS_COUNT + 2;