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

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/weather
From:       Artur Duque de Souza <asouza () kde ! org>
Date:       2010-03-08 18:27:48
Message-ID: 1268072868.324300.10990.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1100820 by asouza:

Try a nicer icon if can't find a proper one

Just hide the icon if there is no way to get a nice icon.
We already have "today's weather icon" showing on the grid
so use that as it's much nicer and polished.

Hide the icon otherwise and avoid showing dummy icon that
covers the name of the city.

Polish++ :)


 M  +9 -1      weatherapplet.cpp  


--- trunk/KDE/kdeplasma-addons/applets/weather/weatherapplet.cpp #1100819:1100820
@@ -380,7 +380,15 @@
         data["Condition Icon"].toString() == "N/U" ||
         data["Condition Icon"].toString() == "N/A" ||
         data["Condition Icon"].toString() == "weather-none-available") {
-        m_currentIcon->hide();
+
+        if (fiveDayTokens.count() > 2) {
+            // if there is no specific icon, show the current weather
+            m_currentIcon->setIcon(KIcon(fiveDayTokens[1]));
+        } else {
+            // if we are inside here, we could not find any proper icon
+            // then just hide it
+            m_currentIcon->hide();
+        }
     } else {
         m_currentIcon->setIcon(KIcon(data["Condition Icon"].toString()));
         m_currentIcon->show();
[prev in list] [next in list] [prev in thread] [next in thread] 

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