gnome-panel r10992 - trunk/applets/clock
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r10992 - trunk/applets/clock
- Date: Mon, 7 Apr 2008 19:15:00 +0100 (BST)
Author: vuntz
Date: Mon Apr 7 19:15:00 2008
New Revision: 10992
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=10992&view=rev
Log:
2008-04-07 Vincent Untz <vuntz gnome org>
* clock-location-tile.c: (weather_info_setup_tooltip): strdup the
various temperatures we get, since else we end up with the same
string which makes it useless to compare the strings.
Also display the non-rounded temperature.
Fix bug #526171.
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/clock-location-tile.c
Modified: trunk/applets/clock/clock-location-tile.c
==============================================================================
--- trunk/applets/clock/clock-location-tile.c (original)
+++ trunk/applets/clock/clock-location-tile.c Mon Apr 7 19:15:00 2008
@@ -563,7 +563,8 @@
{
GdkPixbuf *pixbuf = NULL;
GtkIconTheme *theme = NULL;
- const gchar *conditions, *temp, *apparent, *wind;
+ const gchar *conditions, *wind;
+ gchar *temp, *apparent;
gchar *line1, *line2, *line3, *line4, *tip;
const gchar *icon_name;
const gchar *sys_timezone;
@@ -582,14 +583,18 @@
else
line1 = g_strdup (weather_info_get_sky (info));
- temp = weather_info_get_temp_summary (info);
- apparent = weather_info_get_apparent (info);
+ /* we need to g_strdup() since both functions return the same address
+ * of a static buffer */
+ temp = g_strdup (weather_info_get_temp (info));
+ apparent = g_strdup (weather_info_get_apparent (info));
if (strcmp (apparent, temp) != 0 &&
/* FMQ: it's broken to read from another module's translations; add some API to libgweather. */
strcmp (apparent, dgettext ("gnome-applets-2.0", "Unknown")) != 0)
line2 = g_strdup_printf (_("%s, feels like %s"), temp, apparent);
else
line2 = g_strdup (temp);
+ g_free (temp);
+ g_free (apparent);
wind = weather_info_get_wind (info);
if (strcmp (apparent, dgettext ("gnome-applets-2.0", "Unknown")) != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]