[Goodies-commits] r7576 - in xfce4-weather-plugin/trunk: . panel-plugin
Colin Leroy
colin at xfce.org
Mon Jun 15 09:11:06 CEST 2009
Author: colin
Date: 2009-06-15 07:11:06 +0000 (Mon, 15 Jun 2009)
New Revision: 7576
Modified:
xfce4-weather-plugin/trunk/ChangeLog
xfce4-weather-plugin/trunk/panel-plugin/weather.c
Log:
2009-06-15 Colin Leroy <colin at colino.net>
* panel-plugin/weather.c: Use g_timeout_add_seconds when possible.
Modified: xfce4-weather-plugin/trunk/ChangeLog
===================================================================
--- xfce4-weather-plugin/trunk/ChangeLog 2009-06-15 06:49:47 UTC (rev 7575)
+++ xfce4-weather-plugin/trunk/ChangeLog 2009-06-15 07:11:06 UTC (rev 7576)
@@ -1,5 +1,9 @@
2009-06-15 Colin Leroy <colin at colino.net>
+ * panel-plugin/weather.c: Use g_timeout_add_seconds when possible.
+
+2009-06-15 Colin Leroy <colin at colino.net>
+
* panel-plugin/*: Fix bug #4219, "animation when switching between
2+ values is too distracting": Add a preference for label animation.
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-15 06:49:47 UTC (rev 7575)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-15 07:11:06 UTC (rev 7576)
@@ -42,6 +42,10 @@
#define UPDATE_TIME 1600
#define BORDER 8
+#if !GLIB_CHECK_VERSION(2,14,0)
+#define g_timeout_add_seconds(t,c,d) g_timeout_add((t)*1000,(c),(d))
+#endif
+
gboolean
check_envproxy (gchar **proxy_host,
gint *proxy_port)
@@ -564,7 +568,7 @@
update_weatherdata (data);
data->updatetimeout =
- gtk_timeout_add (UPDATE_TIME * 1000, (GSourceFunc) update_weatherdata, data);
+ g_timeout_add_seconds (UPDATE_TIME, (GSourceFunc) update_weatherdata, data);
}
@@ -808,7 +812,7 @@
gtk_scrollbox_clear (GTK_SCROLLBOX (data->scrollbox));
data->updatetimeout =
- gtk_timeout_add (UPDATE_TIME * 1000, (GSourceFunc) update_weatherdata, data);
+ g_timeout_add_seconds (UPDATE_TIME, (GSourceFunc) update_weatherdata, data);
return data;
}
More information about the Goodies-commits
mailing list