Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets Weather applet needs more units
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
[Locked] Weather applet needs more units
Guest English 3 fabounet [Read]
11 January 2011 à 13:42

Guest, Thursday 23 December 2010 à 19:06

People from different countries use different units. It's important, because if you used Celsius for temperature every day it's hard to understand Fahrenheit scale even if you know how to convert. The same problem with other units.

Let's see on weather applet for Gnome (gnome-panel). It lets you to choose any units:
Temperature: Kelvin, Celsius, Fahrenheit
Wind speed: m/s, km/h, mph, knots, Beaufort scale.
Pressure: kPa, hPa, mb, mmHg, inHg, atm.
Visibility: meters, km, miles.

Of course this applet have shortcomings, for example, it haven't forecast.
CD's weather applet have forecast, but haven't some units.
So... what you think?

fabounet, Monday 03 January 2011 à 13:59


Subscription date : 30 November 2007
Messages : 17118
at the moment the applet merely displays the output of weather.com, where you can choose between C and F, but nothing more.
the applet could convert the other unit but it should do it itself then.
I'm ok for km/NM and km/h/knots
I add a task on it, thanks for the idea

Guest, Tuesday 11 January 2011 à 12:46

fabounet :
I'm ok for km/NM and km/h/knots

Does it mean that you're not ok for other units? and what is NM?

fabounet :
I add a task on it

Great! But still, as i understand it is written in C/C++, eh? If so, maybe there is sense to rewrite it in Python then people could easily add those units which they need (i'm just asking).

Also as i understand gweather-applet (gnome-panel) have a correlation with current language (and maybe location), i.e. if you add this applet to panel at first time, it chooses units, mostly, correctly in depends what language you use in current session.
I dunno how it does, but it's cool feature, isn't it?
I suppose that it takes this information from locale ("locales" package in Ubuntu).

fabounet, Tuesday 11 January 2011 à 13:42


Subscription date : 30 November 2007
Messages : 17118
well you can try to write it in Python, it's probably easy to do.
http://www.glx-dock.org/ww_page.php?p=Documentation&lang=en#4-Write%20simply%20an%20applet%20in%20your%20favorite%20language
I'll keep it in C since I don't have the time to rewrite what works already
NM = Nautic Miles, but actually I don't think we have any distance in the results.

Edit: actually I didn't notice that weather.com already provides units for all the values (speed, temperature, etc)
you get
<ut>F</ut>
<ud>mi</ud>
<us>mph</us>
<up>in</up>
<ur>in</ur>

in their XML, so km/h is replaced by mph

I don't think we really need more units that that, the main point is to have 2 sets of units (1 for Americans, and another for the rest of the world )

Applets | Applets

Subjects Author Language Messages Last message
[Locked] Weather applet needs more units
Guest English 3 fabounet [Read]
11 January 2011 à 13:42


Glx-Dock / Cairo-Dock List of forums Applets | Applets Weather applet needs more units Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.