From d46bcb094501627cc0d2e1a3a9c20f900fdd33ef Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Wed, 2 Apr 2008 18:29:08 +0000 Subject: [PATCH] * Added patch to use mail_spool correctly (thanks Kapil) git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1099 7f574dfc-610e-0410-a909-a81674777703 --- AUTHORS | 1 + ChangeLog | 3 +++ src/conky.c | 14 ++++++++++++-- src/x11.c | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 35d1009..be68f0e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -152,6 +152,7 @@ Kapil Hari Paranjape kFreeBSD support patch realtime clock patch sysfs battery patch + mail_spool patch Kevin Lyles add long options patch diff --git a/ChangeLog b/ChangeLog index d08be55..a287410 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ # $Id$ +2008-04-02 + * Added patch to use mail_spool correctly (thanks Kapil) + 2008-04-01 * Fixed segfault when configuration doesn't contain TEXT block (thanks Pippijn). diff --git a/src/conky.c b/src/conky.c index 7612d17..c262219 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3330,7 +3330,12 @@ static struct text_object *construct_text_object(const char *s, if (!arg) { n1 = 9.5; - strncpy(box, MAIL_FILE, sizeof(box)); + /* Kapil: Changed from MAIL_FILE to + current_mail_spool since the latter + is a copy of the former if undefined + but the latter should take precedence + if defined */ + strncpy(box, current_mail_spool, sizeof(box)); } else { if (sscanf(arg, "%s %f", box, &n1) != 2) { n1 = 9.5; @@ -3380,7 +3385,12 @@ static struct text_object *construct_text_object(const char *s, if (!arg) { n1 = 9.5; - strncpy(box, MAIL_FILE, sizeof(box)); + /* Kapil: Changed from MAIL_FILE to + current_mail_spool since the latter + is a copy of the former if undefined + but the latter should take precedence + if defined */ + strncpy(box, current_mail_spool, sizeof(box)); } else { if (sscanf(arg, "%s %f", box, &n1) != 2) { n1 = 9.5; diff --git a/src/x11.c b/src/x11.c index 5a18791..5b3bae9 100644 --- a/src/x11.c +++ b/src/x11.c @@ -403,7 +403,7 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour, } } /* else { window.type != TYPE_OVERRIDE */ - fprintf(stderr, "Conky: drawing to created window (%lx)\n", + fprintf(stderr, "Conky: drawing to created window (0x%lx)\n", window.window); fflush(stderr); -- 1.7.9.5