From b51c0d2f7057d64b59a5eef209d5d7b693349cde Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 7 Aug 2003 18:19:23 +0000 Subject: [PATCH] Make the default priority for idle sources G_PRIORITY_DEFAULT_IDLE as Thu Aug 7 14:15:44 2003 Owen Taylor * glib/gmain.c (g_idle_source_new): Make the default priority for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would expect and document that. (#114461, reported by Andy Wingo) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gmain.c | 13 ++++++++++--- 7 files changed, 46 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6b8a6d..ceb47c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c6b8a6d..ceb47c3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index c6b8a6d..ceb47c3 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c6b8a6d..ceb47c3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c6b8a6d..ceb47c3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c6b8a6d..ceb47c3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Thu Aug 7 14:15:44 2003 Owen Taylor + + * glib/gmain.c (g_idle_source_new): Make the default priority + for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would + expect and document that. (#114461, reported by Andy Wingo) + 2003-08-06 Noah Levitt * tests/casemap.txt: diff --git a/glib/gmain.c b/glib/gmain.c index fccdae1..699c68b 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -3250,14 +3250,21 @@ g_idle_dispatch (GSource *source, * * The source will not initially be associated with any #GMainContext * and must be added to one with g_source_attach() before it will be - * executed. + * executed. Note that the default priority for idle sources is + * %G_PRIORITY_DEFAULT_IDLE, as compared to other sources which + * have a default priority of %G_PRIORITY_DEFAULT. * * Return value: the newly-created idle source **/ GSource * g_idle_source_new (void) { - return g_source_new (&g_idle_funcs, sizeof (GSource)); + GSource *source; + + source = g_source_new (&g_idle_funcs, sizeof (GSource)); + g_source_set_priority (source, G_PRIORITY_DEFAULT_IDLE); + + return source; } /** @@ -3287,7 +3294,7 @@ g_idle_add_full (gint priority, source = g_idle_source_new (); - if (priority != G_PRIORITY_DEFAULT) + if (priority != G_PRIORITY_DEFAULT_IDLE) g_source_set_priority (source, priority); g_source_set_callback (source, function, data, notify); -- 2.7.4