Merge lp:~roignac/ubuntu/oneiric/indicator-weather/lp_838369 into lp:ubuntu/oneiric/indicator-weather

Proposed by Vadim Rutkovsky
Status: Needs review
Proposed branch: lp:~roignac/ubuntu/oneiric/indicator-weather/lp_838369
Merge into: lp:ubuntu/oneiric/indicator-weather
Diff against target: 26 lines (+4/-3)
1 file modified
bin/indicator-weather (+4/-3)
To merge this branch: bzr merge lp:~roignac/ubuntu/oneiric/indicator-weather/lp_838369
Reviewer Review Type Date Requested Status
Andrew Starr-Bochicchio Pending
Review via email: mp+85220@code.launchpad.net

Description of the change

Backporting the fix for bug #838369 - show degrees when displaying wind direction where available

To post a comment you must log in.

Unmerged revisions

35. By Vadim Rutkovsky

Show degrees in wind direction for Yahoo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/indicator-weather'
--- bin/indicator-weather 2011-07-12 01:44:53 +0000
+++ bin/indicator-weather 2011-12-10 11:01:27 +0000
@@ -839,10 +839,10 @@
839839
840 if self.__weather_datasource == WeatherDataSource.YAHOO:840 if self.__weather_datasource == WeatherDataSource.YAHOO:
841 # Create a similar to Google wind_info structure from Yahoo data841 # Create a similar to Google wind_info structure from Yahoo data
842 wind_direction = self.__localized_report['wind']['direction']842 wind_direction = "%s (%s˚)" % (self.get_wind_direction(self.__localized_report['wind']['direction']), self.__localized_report['wind']['direction'])
843 wind_speed = self.__localized_report['wind']['speed']843 wind_speed = self.__localized_report['wind']['speed']
844 wind_units = self.__localized_report['units']['speed']844 wind_units = self.__localized_report['units']['speed']
845 localized_wind_info = [_("Wind") + ":", self.get_wind_direction(wind_direction), ',', wind_speed, wind_units] 845 localized_wind_info = [_("Wind") + ":", wind_direction, wind_speed, wind_units]
846846
847 # Parse Wind_direction - convert to selected scale847 # Parse Wind_direction - convert to selected scale
848 if (self._wind_unit == WindUnits.MPH):848 if (self._wind_unit == WindUnits.MPH):
@@ -865,7 +865,8 @@
865 localized_wind_info[len(localized_wind_info)-1] = _unit865 localized_wind_info[len(localized_wind_info)-1] = _unit
866 localized_wind_info[len(localized_wind_info)-2] = \866 localized_wind_info[len(localized_wind_info)-2] = \
867 NumberFormatter.format_float(_value, 1)867 NumberFormatter.format_float(_value, 1)
868 return ' '.join(localized_wind_info)868 return "%s %s %s %s" % (localized_wind_info[0], localized_wind_info[1], \
869 localized_wind_info[2], localized_wind_info[3])
869870
870 # Get sunrise label871 # Get sunrise label
871 def get_sunrise_label(self):872 def get_sunrise_label(self):

Subscribers

People subscribed via source and target branches