GNOME Bugzilla – Bug 526074
add numerical functions to get weather info
Last modified: 2008-06-18 19:23:44 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 ...
Created attachment 109081 [details] [review] path to that report hope this helps
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
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 ;-)
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 ***