Thanks!
On 01/07/2014 08:27 AM, Scott Geiger wrote:
> Hi, first thanks, great applet.
>
> Being that I live in the North-Eastern US we often times get Wind Chill
> values (when the temp is below 40F and their is wind it can feel
> colder). So I wanted to add that in to the current weather. Here is a
> diff of the code. Feel free to adapt it as you wish.
>
> |
> ---applet.js.orig 2014-01-0707:57:50.539014296-0500
> +++applet.js 2014-01-0708:16:43.199610176-0500
> @@-371,6+371,7@@
> let temperature =weather_c.get_string_member('temp')
>
> let wind
> =weather.get_object_member('wind').get_string_member('speed')
> + let wind_chill
> =weather.get_object_member('wind').get_string_member('chill')
> let wind_direction
> =this.compassDirection(weather.get_object_member('wind').get_string_member('direction'))
> let wind_unit
> =weather.get_object_member('units').get_string_member('speed')
>
> @@-433,6+434,7@@
> break
> }
> this._currentWeatherWind.text =(wind_direction ?wind_direction
> +' ':'')+wind +' '+wind_unit
> + this._currentWeatherWindChill.text =wind_chill +'
> '+this.unitToUnicode()
>
> // location is a button
> this._currentWeatherLocation.style_class =STYLE_LOCATION_LINK
> @@-562,6+564,7@@
> this._currentWeatherHumidity =newSt.Label(textOb)
> this._currentWeatherPressure =newSt.Label(textOb)
> this._currentWeatherWind =newSt.Label(textOb)
> + this._currentWeatherWindChill =newSt.Label(textOb)
>
> let rb =newSt.BoxLayout({
> style_class:STYLE_DATABOX
> @@-585,6+588,8@@
> rb_values.add_actor(this._currentWeatherPressure)
> rb_captions.add_actor(newSt.Label({text:_('Wind:')}))
> rb_values.add_actor(this._currentWeatherWind)
> + rb_captions.add_actor(newSt.Label({text:_('Wind Chill:')}))
> + rb_values.add_actor(this._currentWeatherWindChill)
>
> let xb =newSt.BoxLayout()
> xb.add_actor(bb)
>
> |
>
> Here's a screen shot of the output (yes, it really is that cold here today!)
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Cinnamon Weather" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
cinnamon-weath...@googlegroups.com.
> To post to this group, send email to
cinnamon...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/cinnamon-weather.
> For more options, visit
https://groups.google.com/groups/opt_out.