After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526074 - add numerical functions to get weather info
add numerical functions to get weather info
Status: RESOLVED DUPLICATE of bug 538787
Product: libgweather
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: 2.24.0
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2008-04-03 22:23 UTC by Samuel Buffet
Modified: 2008-06-18 19:23 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
path to that report (8.36 KB, patch)
2008-04-11 20:06 UTC, Samuel Buffet
none Details | Review

Description Samuel Buffet 2008-04-03 22:23:08 UTC
In order to make the lib easy to use on other applications. It would be great to have access not only to gchar but directly to numerical values.

ex/

const GDate * weather_info_get_update_date(WeatherInfo *info);

const GTime * weather_info_get_update_hour(WeatherInfo *info);

const gdouble * weather_info_get_temp_value(WeatherInfo *info);

const gdouble *	weather_info_get_humidity_value(WeatherInfo *info);

const gdouble *	weather_info_get_double_wind_speed(WeatherInfo *info);

const guint *	weather_info_get_double_wind_direction(WeatherInfo *info);

etc ...
Comment 1 Samuel Buffet 2008-04-11 20:06:20 UTC
Created attachment 109081 [details] [review]
path to that report

hope this helps
Comment 2 Samuel Buffet 2008-04-11 20:07:25 UTC
First you have to consider that :

I am using GNU/Linux and GNOME for only 5 month. I only have only 2 months experience in C/GTK+ programming.

It is my first report and my first path so I apologize if I am doing something the wrong way (despite the hours I spent reading the gnome wiki).

But I try to help ...

So here is the patch wich basicaly doesn't change a single line of existing functions so that it should not add any new bug.

The modification is adding new functions to be able to get the numerical values of temperature, dewpoint, pressure etc...

This should avoid developpers to do horrible string parsing to get that.

FYI, I am testing that locally for 2 days on my server without pb in the clock an d  the weather applet. 

I use this lib in my one application to push those values in a mysql database 

Comment 3 Vincent Untz 2008-04-11 20:21:49 UTC
Thanks!

(In reply to comment #2)
> First you have to consider that :
> 
> I am using GNU/Linux and GNOME for only 5 month. I only have only 2 months
> experience in C/GTK+ programming.
> 
> It is my first report and my first path so I apologize if I am doing something
> the wrong way (despite the hours I spent reading the gnome wiki).

No need to apologize :-) And you did things the good way, don't worry. I won't have time to look at things in detail and we can't commit this for now (I need to branch for GNOME 2.22 first).

I can already tell you some small things to change: put some space before a parenthesis of a function "g_return_val_if_fail (". Also, put an empty line after g_return_val_if_fail. Looks good otherwise, but I didn't look closely enough yet ;-)
Comment 4 Dan Winship 2008-06-18 19:23:44 UTC
I'm going to dup this to 538787, even though this is the older bug, because that bug has another bug depending on it, and Milan is actively working on this Right Now... But I think some of the things are done better in the patch here than the patch there.


*** This bug has been marked as a duplicate of 538787 ***