From 4e9f59bff8adc59fd8fde5bdee9879b8c3e4e55b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 25 Jan 2012 14:18:34 -0500 Subject: [PATCH] e G_SOURCE_CONTINUE/REMOVE internally Now that we have these macros, we should use them. This commit covers everything in gio/. --- gio/gapplication.c | 2 +- gio/gmountoperation.c | 2 +- gio/gpollfilemonitor.c | 2 +- gio/gregistrysettingsbackend.c | 2 +- gio/gunixmount.c | 2 +- gio/tests/contexts.c | 2 +- gio/tests/gapplication-example-cmdline3.c | 2 +- gio/tests/gapplication.c | 2 +- gio/tests/pollable.c | 8 ++++---- gio/tests/simple-async-result.c | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gio/gapplication.c b/gio/gapplication.c index 7644ceb..4e4c26d 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -1243,7 +1243,7 @@ inactivity_timeout_expired (gpointer data) application->priv->inactivity_timeout_id = 0; - return FALSE; + return G_SOURCE_REMOVE; } diff --git a/gio/gmountoperation.c b/gio/gmountoperation.c index 2f091cf..5b29bbb 100644 --- a/gio/gmountoperation.c +++ b/gio/gmountoperation.c @@ -200,7 +200,7 @@ reply_non_handled_in_idle (gpointer data) GMountOperation *op = data; g_mount_operation_reply (op, G_MOUNT_OPERATION_UNHANDLED); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/gio/gpollfilemonitor.c b/gio/gpollfilemonitor.c index c516bbd..a3b1306 100644 --- a/gio/gpollfilemonitor.c +++ b/gio/gpollfilemonitor.c @@ -167,7 +167,7 @@ poll_file_timeout (gpointer data) g_file_query_info_async (poll_monitor->file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, 0, NULL, got_new_info, g_object_ref (poll_monitor)); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c index a9774f2..c3e5b08 100644 --- a/gio/gregistrysettingsbackend.c +++ b/gio/gregistrysettingsbackend.c @@ -1377,7 +1377,7 @@ watch_handler (RegistryEvent *event) g_object_unref (event->self); g_slice_free (RegistryEvent, event); - return FALSE; + return G_SOURCE_REMOVE; }; diff --git a/gio/gunixmount.c b/gio/gunixmount.c index 9da2474..d2eca7c 100644 --- a/gio/gunixmount.c +++ b/gio/gunixmount.c @@ -387,7 +387,7 @@ handle_error: g_free (data); } - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/gio/tests/contexts.c b/gio/tests/contexts.c index 4501631..aa8bdd4 100644 --- a/gio/tests/contexts.c +++ b/gio/tests/contexts.c @@ -87,7 +87,7 @@ idle_start_test1_thread (gpointer loop) g_mutex_unlock (&test1_mutex); g_main_loop_quit (loop); - return FALSE; + return G_SOURCE_REMOVE; } static gpointer diff --git a/gio/tests/gapplication-example-cmdline3.c b/gio/tests/gapplication-example-cmdline3.c index a573a4a..b95e0cb 100644 --- a/gio/tests/gapplication-example-cmdline3.c +++ b/gio/tests/gapplication-example-cmdline3.c @@ -67,7 +67,7 @@ my_cmdline_handler (gpointer data) /* we are done handling this commandline */ g_object_unref (cmdline); - return FALSE; + return G_SOURCE_REMOVE; } static int diff --git a/gio/tests/gapplication.c b/gio/tests/gapplication.c index 715e5f5..9f4942d 100644 --- a/gio/tests/gapplication.c +++ b/gio/tests/gapplication.c @@ -253,7 +253,7 @@ static gboolean release_app (gpointer user_data) { g_application_release (user_data); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/gio/tests/pollable.c b/gio/tests/pollable.c index f954bd8..dd63a04 100644 --- a/gio/tests/pollable.c +++ b/gio/tests/pollable.c @@ -44,7 +44,7 @@ poll_source_callback (GPollableInputStream *in, g_assert_cmpstr (buf, ==, "x"); *success = TRUE; - return FALSE; + return G_SOURCE_REMOVE; } static gboolean @@ -55,7 +55,7 @@ check_source_readability_callback (gpointer user_data) readable = g_pollable_input_stream_is_readable (in); g_assert_cmpint (readable, ==, expected); - return FALSE; + return G_SOURCE_REMOVE; } static gboolean @@ -71,7 +71,7 @@ write_callback (gpointer user_data) check_source_readability_callback (GINT_TO_POINTER (TRUE)); - return FALSE; + return G_SOURCE_REMOVE; } static gboolean @@ -79,7 +79,7 @@ check_source_and_quit_callback (gpointer user_data) { check_source_readability_callback (user_data); g_main_loop_quit (loop); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/gio/tests/simple-async-result.c b/gio/tests/simple-async-result.c index 841da02..8112057 100644 --- a/gio/tests/simple-async-result.c +++ b/gio/tests/simple-async-result.c @@ -88,7 +88,7 @@ test_simple_async_idle (gpointer user_data) ensure_destroyed (c); *ran = TRUE; - return FALSE; + return G_SOURCE_REMOVE; } static void -- 2.7.4