! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Imperial units are metric
Status:
CLOSED: FIXED
Product:
Xfce4-weather-plugin
Component:
General

Comments

Description Mack Stanley 2012-01-18 05:51:03 CET
After setting the Measurement Units to "Imperial" in the Properties dialog, the displayed units are still metric.  

~/.config/xfce4/panel/weather-21.rc does contain the line "celcius=false". 

I'm not fluent enough in C to see why this isn't working.  

Please accept my apologies if this is a duplicate bug.
Comment 1 Andrzej editbugs 2012-03-11 10:35:12 CET
Created attachment 4256 
Added support for imperial units (temperature only)

Existing version ignores the unit setting and uses units provided by the meteo service instead.

This patch forces local units and converts the remote units (currently temperature only) if necessary.

Technical data:
The function get_data takes additional argument "unit" to check the local settings. It returns a newly allocated string (because a conversion might be necessary) so all uses of this function have to explicitly g_free the result now.
Comment 2 Andrzej editbugs 2012-03-11 10:45:01 CET
Created attachment 4257 
Added support for imperial units (temperature only)

Fixes a memory leak in the get_units function (CHK_NULL macro now allocates memory).
Comment 3 Harald Judt 2012-07-04 18:32:18 CEST
Support for unit conversion/display is now in git master (http://git.xfce.org/panel-plugins/xfce4-weather-plugin). Thanks for reporting and the patch.

Bug #8356

Reported by:
Mack Stanley
Reported on: 2012-01-18
Last modified on: 2012-07-23

People

Assignee:
Harald Judt
CC List:
1 user

Version

Attachments

Additional information