[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons/applets/weather
From: Davide Bettio <davide.bettio () kdemail ! net>
Date: 2010-11-29 17:16:28
Message-ID: 20101129171628.8C95DAC8A3 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1202101 by bettio:
Reduce useless clutter: hide the temperature when it's not available (for example \
when the engine does not support it).
M +3 -1 weatherapplet.cpp
--- trunk/KDE/kdeplasma-addons/applets/weather/weatherapplet.cpp #1202100:1202101
@@ -361,6 +361,7 @@
// fiveDayTokens[4] = Low Temperature
if (fiveDayTokens[4] != "N/A" && fiveDayTokens[3] == "N/A") { // Low \
temperature
m_tempLabel->setText(convertTemperature(temperatureUnit(), \
data["Temperature"].toString(), data["Temperature Unit"].toInt(), false)); + \
m_tempLabel->show(); //m_tempLabel might be hidden if temperature was not available \
m_forecastTemps->setText(i18nc("Low temperature", "Low: %1", \
convertTemperature(temperatureUnit(), fiveDayTokens[4], data["Temperature \
Unit"].toInt(), true)));
} else if (fiveDayTokens[3] != "N/A" && fiveDayTokens[4] == "N/A") { // High \
temperature m_forecastTemps->setText(i18nc("High temperature", "High: %1", \
convertTemperature(temperatureUnit(), fiveDayTokens[3], data["Temperature \
Unit"].toInt(), true))); @@ -376,8 +377,9 @@
if (isValidData(data["Temperature"])) {
m_tempLabel->setText(convertTemperature(temperatureUnit(), \
data["Temperature"].toString(), data["Temperature Unit"].toInt(), false)); + \
m_tempLabel->show(); //m_tempLabel might be hidden if temperature was not available \
} else {
- m_tempLabel->setText(i18nc("Not available","N/A"));
+ m_tempLabel->hide(); //temperature is not available (probability the engine \
doesn't support it) }
m_courtesyLabel->setText(data["Credit"].toString());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic