summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum McKenzie <callum@src.gnome.org>2009-03-19 23:33:42 +0000
committerCallum McKenzie <callum@src.gnome.org>2009-03-19 23:33:42 +0000
commit4f399666321a8fb4e0a9b871e76e50be07af253e (patch)
tree68ffbe96e67ac1bc72879bd0e6cfdc36123f9478
parent2e6a6aa8afde5365579a0a2053948249ed5cab22 (diff)
Patch from gQuigs to replace g_timeout_add
with g_timeout_add_seconds where appropriate. Bug 57360. svn path=/trunk/; revision=11390
-rw-r--r--battstat/ChangeLog5
-rw-r--r--battstat/battstat_applet.c8
-rw-r--r--cpufreq/ChangeLog6
-rw-r--r--cpufreq/src/cpufreq-monitor.c4
-rw-r--r--gweather/ChangeLog6
-rw-r--r--gweather/gweather-applet.c6
-rw-r--r--gweather/gweather-pref.c10
-rw-r--r--modemlights/ChangeLog5
-rw-r--r--modemlights/modem-applet.c6
-rw-r--r--stickynotes/ChangeLog5
-rw-r--r--stickynotes/stickynotes.c4
11 files changed, 46 insertions, 19 deletions
diff --git a/battstat/ChangeLog b/battstat/ChangeLog
index 83136dd4b..664ab692c 100644
--- a/battstat/ChangeLog
+++ b/battstat/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-20 Callum McKenzie <callum@spooky-possum.org>
+
+ * battstat_applet.c: Patch from gQuigs to replace g_timeout_add
+ with g_timeout_add_seconds where appropriate. Bug 57360.
+
==================== 2.26.0 ======================
2009-03-06 Philip Withnall <philip@tecnocode.co.uk>
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index c4c567254..2a31d7628 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -1018,11 +1018,11 @@ check_for_updates( gpointer data )
{
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 @@ check_for_updates( gpointer data )
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);
}
diff --git a/cpufreq/ChangeLog b/cpufreq/ChangeLog
index 261450a27..d59b59cf7 100644
--- a/cpufreq/ChangeLog
+++ b/cpufreq/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-20 Callum McKenzie <callum@spooky-possum.org>
+
+ * src/cpufreq-monitor.c: Patch from gQuigs to replace
+ g_timeout_add with g_timeout_add_seconds where appropriate. Bug
+ 57360.
+
==================== 2.26.0 ======================
2009-03-08 Albert Damen <albrt@gmx.net>
diff --git a/cpufreq/src/cpufreq-monitor.c b/cpufreq/src/cpufreq-monitor.c
index c5dbc069d..150fbfce3 100644
--- a/cpufreq/src/cpufreq-monitor.c
+++ b/cpufreq/src/cpufreq-monitor.c
@@ -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 @@ cpufreq_monitor_run (CPUFreqMonitor *monitor)
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);
}
diff --git a/gweather/ChangeLog b/gweather/ChangeLog
index 5f5139e02..e15ebb8dd 100644
--- a/gweather/ChangeLog
+++ b/gweather/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-20 Callum McKenzie <callum@spooky-possum.org>
+
+ * gweather-pref.c:
+ * gweather-applet.c: Patch from gQuigs to replace g_timeout_add
+ with g_timeout_add_seconds where appropriate. Bug 57360.
+
==================== 2.26.0 ======================
2009-03-06 Philip Withnall <philip@tecnocode.co.uk>
diff --git a/gweather/gweather-applet.c b/gweather/gweather-applet.c
index 4e38b0e85..101d64fb2 100644
--- a/gweather/gweather-applet.c
+++ b/gweather/gweather-applet.c
@@ -398,14 +398,14 @@ update_finish (WeatherInfo *info, gpointer data)
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);
}
diff --git a/gweather/gweather-pref.c b/gweather/gweather-pref.c
index 844170b06..d0e20fc7b 100644
--- a/gweather/gweather-pref.c
+++ b/gweather/gweather-pref.c
@@ -344,13 +344,13 @@ auto_update_toggled (GtkToggleButton *button, GWeatherPref *pref)
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 @@ update_interval_changed (GtkSpinButton *button, GWeatherPref *pref)
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);
}
diff --git a/modemlights/ChangeLog b/modemlights/ChangeLog
index 8dcb32d22..eddf76b40 100644
--- a/modemlights/ChangeLog
+++ b/modemlights/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-20 Callum McKenzie <callum@spooky-possum.org>
+
+ * modem-applet.c: Patch from gQuigs to replace g_timeout_add with
+ g_timeout_add_seconds where appropriate. Bug 57360.
+
==================== 2.26.0 ======================
==================== 2.25.92 ======================
diff --git a/modemlights/modem-applet.c b/modemlights/modem-applet.c
index af781239c..4acf203c9 100644
--- a/modemlights/modem-applet.c
+++ b/modemlights/modem-applet.c
@@ -210,7 +210,7 @@ modem_applet_init (ModemApplet *applet)
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 @@ launch_backend (ModemApplet *applet, gboolean root_auth)
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;
diff --git a/stickynotes/ChangeLog b/stickynotes/ChangeLog
index 199ed861e..634325ba6 100644
--- a/stickynotes/ChangeLog
+++ b/stickynotes/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-20 Callum McKenzie <callum@spooky-possum.org>
+
+ * stickynotes.c: Patch from gQuigs to replace g_timeout_add with
+ g_timeout_add_seconds where appropriate. Bug 57360.
+
==================== 2.26.0 ======================
==================== 2.25.92 ======================
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 860d0f74e..bd7e9a9cc 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -79,7 +79,7 @@ buffer_changed (GtkTextBuffer *buffer, gpointer data)
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 @@ stickynotes_save (void)
{
/* 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;
}
}