aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--libsylph/session.c4
-rw-r--r--src/compose.c27
-rw-r--r--src/inc.c7
-rw-r--r--src/passphrase.c3
-rw-r--r--src/rpop3.c5
-rw-r--r--src/sigstatus.c6
7 files changed, 40 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 83210d43..af0cf68e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-21
+
+ * libsylph/session.c
+ src/rpop3.c
+ src/compose.c
+ src/inc.c
+ src/passphrase.c
+ src/sigstatus.c: changed deprecated gtk_timeout_add() to
+ g_timeout_add(_full)(). Use G_PRIORITY_LOW for long timeout
+ interval (may fix slow receiving problem?).
+
2010-12-20
* libsylph/prefs_common.[ch]
diff --git a/libsylph/session.c b/libsylph/session.c
index 0b52d87e..31525d8b 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -264,7 +264,7 @@ static gint session_connect_cb(SockInfo *sock, gpointer data)
session);
#ifdef G_OS_WIN32
- session->ping_tag = g_timeout_add(1000, session_ping_cb, session);
+ session->ping_tag = g_timeout_add_full(G_PRIORITY_LOW, 1000, session_ping_cb, session, NULL);
#endif
return 0;
@@ -325,7 +325,7 @@ void session_set_timeout(Session *session, guint interval)
session->timeout_interval = interval;
if (interval > 0)
session->timeout_tag =
- g_timeout_add(interval, session_timeout_cb, session);
+ g_timeout_add_full(G_PRIORITY_LOW, interval, session_timeout_cb, session, NULL);
else
session->timeout_tag = 0;
}
diff --git a/src/compose.c b/src/compose.c
index 3cd7ab74..82e1ad8c 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -821,8 +821,9 @@ Compose *compose_new(PrefsAccount *account, FolderItem *item,
if (prefs_common.enable_autosave && prefs_common.autosave_itv > 0)
compose->autosave_tag =
- g_timeout_add(prefs_common.autosave_itv * 60 * 1000,
- autosave_timeout, compose);
+ g_timeout_add_full(G_PRIORITY_LOW,
+ prefs_common.autosave_itv * 60 * 1000,
+ autosave_timeout, compose, NULL);
if (prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
@@ -937,8 +938,9 @@ void compose_reply(MsgInfo *msginfo, FolderItem *item, ComposeMode mode,
if (prefs_common.enable_autosave && prefs_common.autosave_itv > 0)
compose->autosave_tag =
- g_timeout_add(prefs_common.autosave_itv * 60 * 1000,
- autosave_timeout, compose);
+ g_timeout_add_full(G_PRIORITY_LOW,
+ prefs_common.autosave_itv * 60 * 1000,
+ autosave_timeout, compose, NULL);
if (prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
}
@@ -1080,8 +1082,9 @@ void compose_forward(GSList *mlist, FolderItem *item, gboolean as_attach,
if (prefs_common.enable_autosave && prefs_common.autosave_itv > 0)
compose->autosave_tag =
- g_timeout_add(prefs_common.autosave_itv * 60 * 1000,
- autosave_timeout, compose);
+ g_timeout_add_full(G_PRIORITY_LOW,
+ prefs_common.autosave_itv * 60 * 1000,
+ autosave_timeout, compose, NULL);
if (prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
}
@@ -1259,8 +1262,9 @@ void compose_reedit(MsgInfo *msginfo)
if (prefs_common.enable_autosave && prefs_common.autosave_itv > 0)
compose->autosave_tag =
- g_timeout_add(prefs_common.autosave_itv * 60 * 1000,
- autosave_timeout, compose);
+ g_timeout_add_full(G_PRIORITY_LOW,
+ prefs_common.autosave_itv * 60 * 1000,
+ autosave_timeout, compose, NULL);
if (prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
}
@@ -6121,9 +6125,10 @@ void compose_reflect_prefs_all(void)
prefs_common.autosave_itv > 0 &&
compose->mode != COMPOSE_REDIRECT)
compose->autosave_tag =
- g_timeout_add
- (prefs_common.autosave_itv * 60 * 1000,
- autosave_timeout, compose);
+ g_timeout_add_full
+ (G_PRIORITY_LOW,
+ prefs_common.autosave_itv * 60 * 1000,
+ autosave_timeout, compose, NULL);
}
}
diff --git a/src/inc.c b/src/inc.c
index 759b6868..b62e2676 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -1629,8 +1629,9 @@ static void inc_autocheck_timer_set_interval(guint interval)
inc_autocheck_timer_remove();
if (prefs_common.autochk_newmail && autocheck_data) {
- autocheck_timer = gtk_timeout_add
- (interval, inc_autocheck_func, autocheck_data);
+ autocheck_timer = g_timeout_add_full
+ (G_PRIORITY_LOW, interval, inc_autocheck_func,
+ autocheck_data, NULL);
debug_print("added timer = %d\n", autocheck_timer);
}
}
@@ -1644,7 +1645,7 @@ void inc_autocheck_timer_remove(void)
{
if (autocheck_timer) {
debug_print("removed timer = %d\n", autocheck_timer);
- gtk_timeout_remove(autocheck_timer);
+ g_source_remove(autocheck_timer);
autocheck_timer = 0;
}
}
diff --git a/src/passphrase.c b/src/passphrase.c
index 3db5a3a3..f0630888 100644
--- a/src/passphrase.c
+++ b/src/passphrase.c
@@ -323,8 +323,7 @@ gpgmegtk_passphrase_cb(void *opaque, const char *uid_hint,
#endif
if (prefs_common.store_passphrase_timeout > 0) {
- gtk_timeout_add(prefs_common.store_passphrase_timeout*60*1000,
- free_passphrase, NULL);
+ g_timeout_add_full(G_PRIORITY_LOW, prefs_common.store_passphrase_timeout * 60 * 1000, free_passphrase, NULL, NULL);
}
}
debug_print ("%% sending passphrase\n");
diff --git a/src/rpop3.c b/src/rpop3.c
index 001b9702..eb8e7f74 100644
--- a/src/rpop3.c
+++ b/src/rpop3.c
@@ -640,8 +640,9 @@ static void rpop3_idle(gboolean is_idle)
rpop3_window.session->state = POP3_IDLE;
if (POP3_PING_ITV < prefs_common.io_timeout_secs)
rpop3_window.ping_tag =
- g_timeout_add(POP3_PING_ITV * 1000,
- rpop3_ping_cb, NULL);
+ g_timeout_add_full(G_PRIORITY_LOW,
+ POP3_PING_ITV * 1000,
+ rpop3_ping_cb, NULL, NULL);
}
}
diff --git a/src/sigstatus.c b/src/sigstatus.c
index d4d23723..4f777e7c 100644
--- a/src/sigstatus.c
+++ b/src/sigstatus.c
@@ -55,7 +55,7 @@ static void do_destroy(GpgmegtkSigStatus hd)
{
if (!hd->running) {
if (hd->timeout_id_valid) {
- gtk_timeout_remove(hd->timeout_id);
+ g_source_remove(hd->timeout_id);
hd->timeout_id_valid = 0;
}
if (hd->mainwindow) {
@@ -177,8 +177,8 @@ void gpgmegtk_sig_status_destroy(GpgmegtkSigStatus hd)
if (hd) {
hd->destroy_pending = 1;
if (hd->running && !hd->timeout_id_valid) {
- hd->timeout_id = gtk_timeout_add(MY_TIMEOUT,
- timeout_cb, hd);
+ hd->timeout_id = g_timeout_add(MY_TIMEOUT,
+ timeout_cb, hd);
hd->timeout_id_valid = 1;
}
do_destroy(hd);