gnome-applets r11390 - in trunk: battstat cpufreq cpufreq/src gweather modemlights stickynotes
- From: callum svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r11390 - in trunk: battstat cpufreq cpufreq/src gweather modemlights stickynotes
- Date: Thu, 19 Mar 2009 23:33:42 +0000 (UTC)
Author: callum
Date: Thu Mar 19 23:33:42 2009
New Revision: 11390
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11390&view=rev
Log:
Patch from gQuigs to replace g_timeout_add
with g_timeout_add_seconds where appropriate. Bug 57360.
Modified:
trunk/battstat/ChangeLog
trunk/battstat/battstat_applet.c
trunk/cpufreq/ChangeLog
trunk/cpufreq/src/cpufreq-monitor.c
trunk/gweather/ChangeLog
trunk/gweather/gweather-applet.c
trunk/gweather/gweather-pref.c
trunk/modemlights/ChangeLog
trunk/modemlights/modem-applet.c
trunk/stickynotes/ChangeLog
trunk/stickynotes/stickynotes.c
Modified: trunk/battstat/battstat_applet.c
==============================================================================
--- trunk/battstat/battstat_applet.c (original)
+++ trunk/battstat/battstat_applet.c Thu Mar 19 23:33:42 2009
@@ -1018,11 +1018,11 @@
{
int timeout;
- /* if on AC and not even driven scale back the polls to once every 10 */
+ /* if on AC and not event driven scale back the polls to once every 10 */
if (info.on_ac_power)
- timeout = 10000;
+ timeout = 10;
else
- timeout = 1000;
+ timeout = 2;
if (timeout != battstat->timeout)
{
@@ -1031,7 +1031,7 @@
if (battstat->timeout_id)
g_source_remove (battstat->timeout_id);
- battstat->timeout_id = g_timeout_add (battstat->timeout,
+ battstat->timeout_id = g_timeout_add_seconds (battstat->timeout,
check_for_updates,
battstat);
}
Modified: trunk/cpufreq/src/cpufreq-monitor.c
==============================================================================
--- trunk/cpufreq/src/cpufreq-monitor.c (original)
+++ trunk/cpufreq/src/cpufreq-monitor.c Thu Mar 19 23:33:42 2009
@@ -24,7 +24,7 @@
#define CPUFREQ_MONITOR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), CPUFREQ_TYPE_MONITOR, CPUFreqMonitorPrivate))
-#define CPUFREQ_MONITOR_INTERVAL 1000
+#define CPUFREQ_MONITOR_INTERVAL 1
/* Properties */
enum {
@@ -316,7 +316,7 @@
return;
monitor->priv->timeout_handler =
- g_timeout_add (CPUFREQ_MONITOR_INTERVAL,
+ g_timeout_add_seconds (CPUFREQ_MONITOR_INTERVAL,
(GSourceFunc) cpufreq_monitor_run_cb,
(gpointer) monitor);
}
Modified: trunk/gweather/gweather-applet.c
==============================================================================
--- trunk/gweather/gweather-applet.c (original)
+++ trunk/gweather/gweather-applet.c Thu Mar 19 23:33:42 2009
@@ -398,14 +398,14 @@
if (gw_applet->gweather_pref.update_enabled)
{
gw_applet->timeout_tag =
- g_timeout_add (
- gw_applet->gweather_pref.update_interval * 1000,
+ g_timeout_add_seconds (
+ gw_applet->gweather_pref.update_interval,
timeout_cb, gw_applet);
nxtSunEvent = weather_info_next_sun_event(gw_applet->gweather_info);
if (nxtSunEvent >= 0)
gw_applet->suncalc_timeout_tag =
- g_timeout_add (nxtSunEvent * 1000,
+ g_timeout_add_seconds (nxtSunEvent,
suncalc_timeout_cb, gw_applet);
}
Modified: trunk/gweather/gweather-pref.c
==============================================================================
--- trunk/gweather/gweather-pref.c (original)
+++ trunk/gweather/gweather-pref.c Thu Mar 19 23:33:42 2009
@@ -344,13 +344,13 @@
if (gw_applet->suncalc_timeout_tag > 0)
g_source_remove(gw_applet->suncalc_timeout_tag);
if (gw_applet->gweather_pref.update_enabled) {
- gw_applet->timeout_tag = g_timeout_add (
- gw_applet->gweather_pref.update_interval * 1000,
+ gw_applet->timeout_tag = g_timeout_add_seconds (
+ gw_applet->gweather_pref.update_interval,
timeout_cb, gw_applet);
nxtSunEvent = weather_info_next_sun_event(gw_applet->gweather_info);
if (nxtSunEvent >= 0)
- gw_applet->suncalc_timeout_tag = g_timeout_add (
- nxtSunEvent * 1000,
+ gw_applet->suncalc_timeout_tag = g_timeout_add_seconds (
+ nxtSunEvent,
suncalc_timeout_cb,
gw_applet);
}
@@ -548,7 +548,7 @@
g_source_remove(gw_applet->timeout_tag);
if (gw_applet->gweather_pref.update_enabled)
gw_applet->timeout_tag =
- g_timeout_add (gw_applet->gweather_pref.update_interval * 1000,
+ g_timeout_add_seconds (gw_applet->gweather_pref.update_interval,
timeout_cb, gw_applet);
}
Modified: trunk/modemlights/modem-applet.c
==============================================================================
--- trunk/modemlights/modem-applet.c (original)
+++ trunk/modemlights/modem-applet.c Thu Mar 19 23:33:42 2009
@@ -210,7 +210,7 @@
priv->directives = NULL;
priv->directives_id = g_timeout_add (250, (GSourceFunc) dispatch_directives, applet);
priv->directive_running = FALSE;
- priv->tooltip_id = g_timeout_add (1000, (GSourceFunc) update_tooltip, applet);
+ priv->tooltip_id = g_timeout_add_seconds (1, (GSourceFunc) update_tooltip, applet);
launch_backend (applet, FALSE);
gtk_container_add (GTK_CONTAINER (applet), priv->image);
@@ -878,8 +878,8 @@
close (p[1]);
priv->read_fd = p[0];
- priv->timeout_id = g_timeout_add (1000, (GSourceFunc) check_backend, applet);
- priv->info_id = g_timeout_add (2500, (GSourceFunc) update_info, applet);
+ priv->timeout_id = g_timeout_add_seconds (1, (GSourceFunc) check_backend, applet);
+ priv->info_id = g_timeout_add_seconds (3, (GSourceFunc) update_info, applet);
priv->read_stream = fdopen (priv->read_fd, "r");
priv->write_stream = fdopen (priv->write_fd, "w");
priv->has_root = root_auth;
Modified: trunk/stickynotes/stickynotes.c
==============================================================================
--- trunk/stickynotes/stickynotes.c (original)
+++ trunk/stickynotes/stickynotes.c Thu Mar 19 23:33:42 2009
@@ -79,7 +79,7 @@
the timer triggers, we will save the buffer if there have
been no subsequent changes. */
++stickynotes->last_timeout_data;
- g_timeout_add (1000 * 10, (GSourceFunc) timeout_happened,
+ g_timeout_add_seconds (10, (GSourceFunc) timeout_happened,
GUINT_TO_POINTER (stickynotes->last_timeout_data));
}
@@ -852,7 +852,7 @@
{
/* If a save isn't already schedules, save everything a minute from now. */
if (!save_scheduled) {
- g_timeout_add (60*1000, (GSourceFunc) stickynotes_save_now, NULL);
+ g_timeout_add_seconds (60, (GSourceFunc) stickynotes_save_now, NULL);
save_scheduled = TRUE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]