From 81020930e7e0a87f7c49b7cf9d9d81f4e39e421b Mon Sep 17 00:00:00 2001 From: "Mattia M." Date: Fri, 2 Nov 2012 09:21:23 +0100 Subject: [PATCH] Small change to the string on the panel Now, the weather conditions string on the top panel is followed by a comma if and only if also the temperature is displayed. --- src/extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.js b/src/extension.js index c6c25ee..c0cfa24 100644 --- a/src/extension.js +++ b/src/extension.js @@ -1196,7 +1196,7 @@ const WeatherMenuButton = new Lang.Class({ if (this._text_in_panel) weatherInfoT = parseFloat(temperature).toLocaleString() + ' ' + this.unit_to_unicode(); - this._weatherInfo.text = weatherInfoC + ((weatherInfoC)?", ":"") + weatherInfoT; + this._weatherInfo.text = weatherInfoC + ((weatherInfoC && weatherInfoT) ? ", " : "") + weatherInfoT; this._currentWeatherSummary.text = comment + ", " + parseFloat(temperature).toLocaleString() + ' ' + this.unit_to_unicode(); this._currentWeatherLocation.text = location;