Switch from g_timeout_add to g_timeout_add_seconds
authorAlexandre Franke <alexandre.franke@gmail.com>
Thu, 14 Nov 2013 17:49:15 +0000 (18:49 +0100)
committerAlexandre Franke <alexandre.franke@gmail.com>
Thu, 14 Nov 2013 19:15:01 +0000 (20:15 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=712244

camel/camel-operation.c
tests/book-migration/setup-migration-test.c
tests/cursor-example/cursor-data.c
tests/libebook/client/test-client-refresh.c
tests/libebook/test-ebook-get-book-view.c
tests/libebook/test-ebook-get-supported-auth-methods.c
tests/test-server-utils/e-test-server-utils.c

index e07aab3..d3a7bc1 100644 (file)
@@ -34,7 +34,7 @@
 
 #define PROGRESS_DELAY         250  /* milliseconds */
 #define TRANSIENT_DELAY                250  /* milliseconds */
-#define POP_MESSAGE_DELAY      999  /* milliseconds */
+#define POP_MESSAGE_DELAY      1    /* seconds */
 
 typedef struct _StatusNode StatusNode;
 
@@ -339,7 +339,7 @@ camel_operation_pop_message (GCancellable *cancellable)
                if (node->source_id != 0)
                        g_source_remove (node->source_id);
 
-               node->source_id = g_timeout_add_full (
+               node->source_id = g_timeout_add_seconds_full (
                        G_PRIORITY_DEFAULT, POP_MESSAGE_DELAY,
                        operation_emit_status_cb,
                        status_node_ref (node),
index 1388853..cc1a318 100644 (file)
@@ -195,7 +195,7 @@ create_book (const gchar *book_id)
        g_object_unref (scratch);
 
        if (data.book == NULL) {
-               g_timeout_add (20 * 1000, create_source_timeout, NULL);
+               g_timeout_add_seconds (20, create_source_timeout, NULL);
                g_main_loop_run (data.loop);
 
                /* By now we aborted or we have an addressbook created */
index 7a4745c..f7b0996 100644 (file)
@@ -156,7 +156,7 @@ cursor_load_data (const gchar        *vcard_path,
        g_object_unref (scratch);
 
        if (address_book == NULL) {
-               g_timeout_add (20 * 1000, cursor_data_source_timeout, NULL);
+               g_timeout_add_seconds (20, cursor_data_source_timeout, NULL);
                g_main_loop_run (loop);
 
                /* By now we aborted or we have an addressbook created */
index b952566..57ee0b7 100644 (file)
@@ -68,7 +68,7 @@ test_refresh_async (ETestServerFixture *fixture,
                return;
 
        e_client_refresh (E_CLIENT (book_client), NULL, async_refresh_result_ready, fixture->loop);
-       g_timeout_add (5 * 1000, (GSourceFunc) main_loop_fail_timeout, NULL);
+       g_timeout_add_seconds (5, (GSourceFunc) main_loop_fail_timeout, NULL);
        g_main_loop_run (fixture->loop);
 }
 
index cd57d4f..9a34a7d 100644 (file)
@@ -134,7 +134,7 @@ test_get_book_view_async (ETestServerFixture *fixture,
                book, query,
                        (GSourceFunc) get_book_view_cb, fixture->loop);
 
-       g_timeout_add (5 * 1000, (GSourceFunc) main_loop_fail_timeout, NULL);
+       g_timeout_add_seconds (5, (GSourceFunc) main_loop_fail_timeout, NULL);
        g_main_loop_run (fixture->loop);
        e_book_query_unref (query);
 }
index cbf39db..f02e866 100644 (file)
@@ -88,7 +88,7 @@ test_get_supported_auth_methods_async (ETestServerFixture *fixture,
                                        gconstpointer user_data)
 {
        g_idle_add ((GSourceFunc) get_supported_auth_methods_async_in_idle, fixture);
-       g_timeout_add (5 * 1000, (GSourceFunc) main_loop_fail_timeout, NULL);
+       g_timeout_add_seconds (5, (GSourceFunc) main_loop_fail_timeout, NULL);
        g_main_loop_run (fixture->loop);
 }
 
index 82dd22e..deba78e 100644 (file)
@@ -379,7 +379,7 @@ e_test_server_utils_bootstrap_idle (FixturePair *pair)
 
        if (pair->closure->type != E_TEST_SERVER_NONE)
                pair->fixture->timeout_source_id =
-                       g_timeout_add (20 * 1000, (GSourceFunc) e_test_server_utils_bootstrap_timeout, pair);
+                       g_timeout_add_seconds (20, (GSourceFunc) e_test_server_utils_bootstrap_timeout, pair);
        else
                g_main_loop_quit (pair->fixture->loop);