[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/dataengines/weather/ions
From:       Shawn Starr <shawn.starr () rogers ! com>
Date:       2007-10-15 2:41:05
Message-ID: 1192416065.580728.20607.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 725238 by spstarr:

Also dont set the temperature and dewpoint units if temperature or dewpoint is N/A

 M  +7 -2      ion_noaa.cpp  


--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/ions/ion_noaa.cpp #725237:725238
@@ -383,8 +383,11 @@
     setData(source, "Current Conditions", this->condition(source));
     dataFields = this->temperature(source);
     setData(source, "Temperature", dataFields["temperature"]);
-    setData(source, "Temperature Unit", dataFields["temperatureUnit"]);
 
+    if (dataFields["temperature"] != "N/A") {
+        setData(source, "Temperature Unit", dataFields["temperatureUnit"]);
+    }
+
     // Do we have a comfort temperature? if so display it
     if (dataFields["comfortTemperature"] != "N/A") {
         if (d->m_weatherData[source].windchill_F != "NA") {
@@ -396,7 +399,9 @@
      }
 
      setData(source, "Dewpoint", this->dewpoint(source));
-     setData(source, "Dewpoint Unit", dataFields["temperatureUnit"]);
+     if (this->dewpoint(source) != "N/A") {
+         setData(source, "Dewpoint Unit", dataFields["temperatureUnit"]);
+     }
  
      dataFields = this->pressure(source);
      setData(source, "Pressure", dataFields["pressure"]);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic