[balsa/gtk3] Use GSlice and g_idle_add
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Use GSlice and g_idle_add
- Date: Sun, 10 Jun 2012 01:44:25 +0000 (UTC)
commit c874942d4848ed2846856f7519d27e27c9130486
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Jun 8 14:40:02 2012 -0400
Use GSlice and g_idle_add
* libbalsa/mailbox.c (lbm_msgno_removed_idle_cb),
(libbalsa_mailbox_msgno_removed): use GSlice instead of g_new();
use g_idle_add instead of gdk_threads_add_idle.
ChangeLog | 6 ++++++
libbalsa/mailbox.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 11629cb..9c0ed71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-06-08 Peter Bloomfield
+ * libbalsa/mailbox.c (lbm_msgno_removed_idle_cb),
+ (libbalsa_mailbox_msgno_removed): use GSlice instead of g_new();
+ use g_idle_add instead of gdk_threads_add_idle.
+
+2012-06-08 Peter Bloomfield
+
* libbalsa/mailbox.c (lbm_check_and_sort),
(lbm_set_threading_idle_cb), (lbm_set_threading): sort in an
idle callback instead of subthread.
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index ea48acc..d5de5e2 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -1605,7 +1605,7 @@ lbm_msgno_removed_idle_cb(LbmMsgnoRemovedInfo * info)
{
lbm_msgno_removed(info->mailbox, info->seqno);
g_object_unref(info->mailbox);
- g_free(info);
+ g_slice_free(LbmMsgnoRemovedInfo, info);
return FALSE;
}
#endif /* BALSA_USE_THREADS */
@@ -1615,10 +1615,10 @@ libbalsa_mailbox_msgno_removed(LibBalsaMailbox * mailbox, guint seqno)
{
#ifdef BALSA_USE_THREADS
if (libbalsa_am_i_subthread()) {
- LbmMsgnoRemovedInfo *info = g_new(LbmMsgnoRemovedInfo, 1);
+ LbmMsgnoRemovedInfo *info = g_slice_new(LbmMsgnoRemovedInfo);
info->mailbox = g_object_ref(mailbox);
info->seqno = seqno;
- gdk_threads_add_idle((GSourceFunc) lbm_msgno_removed_idle_cb,
+ g_idle_add((GSourceFunc) lbm_msgno_removed_idle_cb,
info);
} else {
lbm_msgno_removed(mailbox, seqno);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]