[balsa] Use g_timeout_add_seconds, save the world
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] Use g_timeout_add_seconds, save the world
- Date: Wed, 20 Jan 2010 00:55:39 +0000 (UTC)
commit 1c11fce9392a45ee52a683a45ed0f64e635eaf30
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Jan 19 19:54:44 2010 -0500
Use g_timeout_add_seconds, save the world
* libbalsa/imap-server.c (libbalsa_imap_server_init):
use g_timeout_add_seconds, save the world.
* src/balsa-mime-widget-text.c: ditto.
* src/information-dialog.c (balsa_information_bar): ditto.
* src/main-window.c: ditto.
* src/main.c (main): ditto.
* src/sendmsg-window.c (sendmsg_window_new): ditto.
ChangeLog | 10 ++++++++++
libbalsa/imap-server.c | 4 ++--
src/balsa-mime-widget-text.c | 4 +++-
src/information-dialog.c | 2 +-
src/main-window.c | 2 +-
src/main.c | 2 +-
src/sendmsg-window.c | 2 +-
7 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3edd8a0..bb78308 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2010-01-19 Peter Bloomfield
+ * libbalsa/imap-server.c (libbalsa_imap_server_init):
+ use g_timeout_add_seconds, save the world.
+ * src/balsa-mime-widget-text.c: ditto.
+ * src/information-dialog.c (balsa_information_bar): ditto.
+ * src/main-window.c: ditto.
+ * src/main.c (main): ditto.
+ * src/sendmsg-window.c (sendmsg_window_new): ditto.
+
+2010-01-19 Peter Bloomfield
+
* libbalsa/information.c (libbalsa_information_varg): show note
before unreffing it(!).
diff --git a/libbalsa/imap-server.c b/libbalsa/imap-server.c
index 77b303e..a24c3b3 100644
--- a/libbalsa/imap-server.c
+++ b/libbalsa/imap-server.c
@@ -225,8 +225,8 @@ libbalsa_imap_server_init(LibBalsaImapServer * imap_server)
#endif /* ENABLE_TOUCH_UI */
imap_server->use_idle = TRUE;
imap_server->connection_cleanup_id =
- g_timeout_add(CONNECTION_CLEANUP_POLL_PERIOD*1000,
- connection_cleanup, imap_server);
+ g_timeout_add_seconds(CONNECTION_CLEANUP_POLL_PERIOD,
+ connection_cleanup, imap_server);
}
/* leave object in sane state (NULLified fields) */
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 3f45bc6..c246ac5 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -927,7 +927,9 @@ statusbar_pop(gpointer data)
gdk_threads_leave();
return FALSE;
}
-#define SCHEDULE_BAR_REFRESH() g_timeout_add(5000, statusbar_pop, NULL);
+
+#define SCHEDULE_BAR_REFRESH() \
+ g_timeout_add_seconds(5, statusbar_pop, NULL);
static void
handle_url(const gchar * url)
diff --git a/src/information-dialog.c b/src/information-dialog.c
index 7e14494..2dc6302 100644
--- a/src/information-dialog.c
+++ b/src/information-dialog.c
@@ -348,7 +348,7 @@ balsa_information_bar(GtkWindow *parent, LibBalsaInformationType type,
gtk_statusbar_push(statusbar, context_id, line);
g_free(line);
- bar_timeout_id = g_timeout_add(4000, status_bar_refresh, NULL);
+ bar_timeout_id = g_timeout_add_seconds(4, status_bar_refresh, NULL);
}
static void
diff --git a/src/main-window.c b/src/main-window.c
index 326604e..6e7e871 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -996,7 +996,7 @@ balsa_window_class_init(BalsaWindowClass * klass)
/* Signals */
klass->identities_changed = NULL;
- g_timeout_add(30000, (GSourceFunc) bw_close_mailbox_on_timer, NULL);
+ g_timeout_add_seconds(30, (GSourceFunc) bw_close_mailbox_on_timer, NULL);
}
diff --git a/src/main.c b/src/main.c
index 7f7be0c..2775f85 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1144,7 +1144,7 @@ main(int argc, char *argv[])
gtk_widget_show(window);
g_idle_add((GSourceFunc) scan_mailboxes_idle_cb, NULL);
- g_timeout_add(1801*1000, (GSourceFunc) periodic_expunge_cb, NULL);
+ g_timeout_add_seconds(1801, (GSourceFunc) periodic_expunge_cb, NULL);
if (cmd_check_mail_on_startup || balsa_app.check_mail_upon_startup)
g_idle_add((GSourceFunc) balsa_main_check_new_messages,
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 5bceb55..0d47cec 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -4564,7 +4564,7 @@ sendmsg_window_new()
#endif
bsmsg->wrap_timeout_id = 0;
bsmsg->autosave_timeout_id = /* autosave every 5 minutes */
- g_timeout_add(1000*60*5, (GSourceFunc)sw_autosave_timeout_cb, bsmsg);
+ g_timeout_add_seconds(60*5, (GSourceFunc)sw_autosave_timeout_cb, bsmsg);
bsmsg->draft_message = NULL;
bsmsg->parent_message = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]