diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compose.c | 27 | ||||
-rw-r--r-- | src/inc.c | 7 | ||||
-rw-r--r-- | src/passphrase.c | 3 | ||||
-rw-r--r-- | src/rpop3.c | 5 | ||||
-rw-r--r-- | src/sigstatus.c | 6 |
5 files changed, 27 insertions, 21 deletions
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); } } @@ -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); |