[3068] in BarnOwl Developers
[PATCH 2/9] use new owl_select_post_task in owl_log_error instead of repeating the GSource dance
daemon@ATHENA.MIT.EDU (Adam Glasgall)
Wed May 25 18:15:15 2011
From: Adam Glasgall <glasgall@MIT.EDU>
To: barnowl-dev@mit.edu
Cc: Adam Glasgall <adam@crossproduct.net>
Date: Wed, 25 May 2011 18:14:48 -0400
In-Reply-To: <1306361695-13747-1-git-send-email-glasgall@mit.edu>
From: Adam Glasgall <adam@crossproduct.net>
---
logging.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/logging.c b/logging.c
index ff1b918..5564cf2 100644
--- a/logging.c
+++ b/logging.c
@@ -403,13 +403,7 @@ static gboolean owl_log_error_idle_func(gpointer data)
static void owl_log_error(char *message)
{
- GSource *source = NULL;
- source = g_idle_source_new();
- g_source_set_priority(source,G_PRIORITY_DEFAULT);
- g_source_set_callback(source, owl_log_error_idle_func,
- message, NULL);
- g_source_attach(source, g_main_context_default());
- g_source_unref(source);
+ owl_select_post_task(owl_log_error_idle_func,message,NULL);
}
static void owl_log_write_msg(GString *message, char *filename)
--
1.7.2.3