added draw_graph_borders
authorBrenden Matthews <brenden1@rty.ca>
Thu, 5 Jan 2006 23:23:51 +0000 (23:23 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Thu, 5 Jan 2006 23:23:51 +0000 (23:23 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@467 7f574dfc-610e-0410-a909-a81674777703

ChangeLog
README
doc/config_settings.xml
doc/conky.1
doc/conkyrc.sample
src/conky.c

index 3818c27..de6ba0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 # $Id$
 
+2006-01-05
+       * Added draw_graph_borders option
+
 2006-01-01
        * Conky 1.3.5 released
 
diff --git a/README b/README
index 25ce7e8..2bb34b9 100644 (file)
--- a/README
+++ b/README
@@ -189,6 +189,10 @@ CONFIGURATION SETTINGS
              Draw borders around text?
 
 
+       draw_graph_borders
+             Draw borders around graphs?
+
+
        draw_shades
              Draw shades?
 
index 58148e6..3b4f721 100644 (file)
 </varlistentry>
 
 <varlistentry>
+       <term><command><option>draw_graph_borders</option></command></term>
+       <listitem>
+               Draw borders around graphs?
+       <para></para></listitem>
+</varlistentry>
+
+<varlistentry>
        <term><command><option>draw_shades</option></command></term>
        <listitem>
                Draw shades?
index 2fe5f40..d3224e4 100644 (file)
@@ -171,6 +171,10 @@ Use the Xdbe extension? (eliminates flicker) It is highly recommended to use own
 Draw borders around text?
 
 .TP 
+\fBdraw_graph_borders\fR
+Draw borders around graphs?
+
+.TP 
 \fBdraw_shades\fR
 Draw shades?
 
index 66beb39..cc95b65 100644 (file)
@@ -74,6 +74,9 @@ draw_outline no
 # Draw borders around text
 draw_borders yes
 
+# Draw borders around graphs
+draw_graph_borders yes
+
 # Stippled borders?
 stippled_borders 8
 
index c8d3c39..802e0aa 100644 (file)
@@ -226,6 +226,7 @@ static int gap_x, gap_y;
 
 /* border */
 static int draw_borders;
+static int draw_graph_borders;
 static int stippled_borders;
 
 static int draw_shades, draw_outline;
@@ -3983,15 +3984,10 @@ static void draw_line(char *s)
                                                w = text_start_x + text_width - cur_x - 1;
                                        if (w < 0)
                                                w = 0;
-                                       XSetLineAttributes(display,
-                                                          window.gc, 1,
-                                                          LineSolid,
-                                                          CapButt,
-                                                          JoinMiter);
-                                       XDrawRectangle(display,
-                                                      window.drawable,
-                                                      window.gc, cur_x,
-                                                      by, w, h);
+                                       if (draw_graph_borders) {
+                                               XSetLineAttributes(display, window.gc, 1, LineSolid, CapButt, JoinMiter);
+                                               XDrawRectangle(display,window.drawable, window.gc, cur_x, by, w, h);
+                                       }
                                        XSetLineAttributes(display,
                                                           window.gc, 1,
                                                           LineSolid,
@@ -4672,8 +4668,9 @@ static void set_default_configurations(void)
        default_fg_color = WhitePixel(display, screen);
        default_bg_color = BlackPixel(display, screen);
        default_out_color = BlackPixel(display, screen);
-       draw_borders = 0;
        draw_shades = 1;
+       draw_borders = 0;
+       draw_graph_borders = 1;
        draw_outline = 0;
        set_first_font("6x10");
        gap_x = 5;
@@ -4897,6 +4894,9 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
                CONF("draw_borders") {
                        draw_borders = string_to_bool(value);
                }
+               CONF("draw_graph_borders") {
+                       draw_graph_borders = string_to_bool(value);
+               }
                CONF("draw_shades") {
                        draw_shades = string_to_bool(value);
                }