From b713536dadd543f818b229fe60923f452c59e00d Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 5 Mar 2010 14:10:47 +0100 Subject: [PATCH] make draw_shades/outline lua settings --- src/conky.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/conky.cc b/src/conky.cc index f9d59285..3ca45d5f 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -353,7 +353,8 @@ int get_stippled_borders(void) return stippled_borders; } -static int draw_shades, draw_outline; +static conky::simple_config_setting draw_shades("draw_shades", true, false); +static conky::simple_config_setting draw_outline("draw_outline", false, false); long default_fg_color, default_bg_color, default_out_color; @@ -1764,7 +1765,7 @@ static void draw_stuff(void) #ifdef BUILD_X11 if (out_to_x.get(*state)) { selected_font = 0; - if (draw_shades && !draw_outline) { + if (draw_shades.get(*state) && !draw_outline.get(*state)) { text_start_x++; text_start_y++; set_foreground_color(default_bg_color); @@ -1774,7 +1775,7 @@ static void draw_stuff(void) text_start_y--; } - if (draw_outline) { + if (draw_outline.get(*state)) { int i, j; selected_font = 0; @@ -2546,8 +2547,6 @@ static void set_default_configurations(void) output_methods = TO_STDOUT; #endif #ifdef BUILD_X11 - draw_shades = 1; - draw_outline = 0; set_first_font("6x10"); gap_x = 5; gap_y = 60; @@ -2981,12 +2980,6 @@ char load_config_file(const char *f) CONF("override_utf8_locale") { utf8_mode = string_to_bool(value); } - CONF("draw_shades") { - draw_shades = string_to_bool(value); - } - CONF("draw_outline") { - draw_outline = string_to_bool(value); - } #endif /* BUILD_X11 */ CONF("times_in_seconds") { set_times_in_seconds(string_to_bool(value));