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.
yahoo_weather
Mattia M. 12 years ago
parent f7c4aea4f3
commit 81020930e7
  1. 2
      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;

Loading…
Cancel
Save