[Pkg-wmaker-commits] [wmforecast] 19/63: bug fix: icon now correctly displayed for one-digit codes

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 17 11:20:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmforecast.

commit fd56e5ee3331a158bb1a0954df07e96649e00742
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Apr 21 17:40:31 2014 -0500

    bug fix: icon now correctly displayed for one-digit codes
---
 ChangeLog    | 8 ++++++--
 wmforecast.c | 3 +++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b04256a..5bcf976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,9 +13,13 @@
 	* ChangeLog: corrected year in all entries (it's not 2015 yet...)
 	* NEWS, README: updated with version 0.3 info
 	* configure.ac: set version 0.3
+
+	* the following changes took place after the v0.3 release:
+
 	* Makefile.am: wmforecast.1 target now depends on config.h; this will
-	  cause manpage to reflect changes in version and bug report email (this
-	  change occured after the v0.3 release)
+	  cause manpage to reflect changes in version and bug report email
+	* wmforecast.c (setConditions): append a "0" to one-digit codes so that
+	  the icon is correctly displayed
 
 2014-04-19  Doug Torrance <dtorrance at monmouthcollege.edu>
 	* switched timer handler from pthread to WING's native WMAddPersistent-
diff --git a/wmforecast.c b/wmforecast.c
index 5d99fd3..1c1f0be 100755
--- a/wmforecast.c
+++ b/wmforecast.c
@@ -166,6 +166,9 @@ void setConditions(Weather *weather,
 	weather->text = wrealloc(weather->text, strlen(text) + 1);
 	strcpy(weather->text, text);
 
+	if (strlen(code) == 1)
+		code = wstrconcat("0", code);
+
 	context = WMScreenRContext(screen);
 	filename = wstrconcat(wstrconcat(DATADIR"/",code),".png");
 	weather->icon = RLoadImage(context,filename,0);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmforecast.git



More information about the Pkg-wmaker-commits mailing list