[evolution-data-server] Switch from g_timeout_add to g_timeout_add_seconds



commit b6befe4a6ca167b0d19e6a7e310c0423e18679ab
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Thu Nov 14 18:49:15 2013 +0100

    Switch from g_timeout_add to g_timeout_add_seconds
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712244

 camel/camel-operation.c                            |    4 ++--
 tests/book-migration/setup-migration-test.c        |    2 +-
 tests/cursor-example/cursor-data.c                 |    2 +-
 tests/libebook/client/test-client-refresh.c        |    2 +-
 tests/libebook/test-ebook-get-book-view.c          |    2 +-
 .../test-ebook-get-supported-auth-methods.c        |    2 +-
 tests/test-server-utils/e-test-server-utils.c      |    2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index e07aab3..d3a7bc1 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -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),
diff --git a/tests/book-migration/setup-migration-test.c b/tests/book-migration/setup-migration-test.c
index 1388853..cc1a318 100644
--- a/tests/book-migration/setup-migration-test.c
+++ b/tests/book-migration/setup-migration-test.c
@@ -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 */
diff --git a/tests/cursor-example/cursor-data.c b/tests/cursor-example/cursor-data.c
index 7a4745c..f7b0996 100644
--- a/tests/cursor-example/cursor-data.c
+++ b/tests/cursor-example/cursor-data.c
@@ -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 */
diff --git a/tests/libebook/client/test-client-refresh.c b/tests/libebook/client/test-client-refresh.c
index b952566..57ee0b7 100644
--- a/tests/libebook/client/test-client-refresh.c
+++ b/tests/libebook/client/test-client-refresh.c
@@ -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);
 }
 
diff --git a/tests/libebook/test-ebook-get-book-view.c b/tests/libebook/test-ebook-get-book-view.c
index cd57d4f..9a34a7d 100644
--- a/tests/libebook/test-ebook-get-book-view.c
+++ b/tests/libebook/test-ebook-get-book-view.c
@@ -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);
 }
diff --git a/tests/libebook/test-ebook-get-supported-auth-methods.c 
b/tests/libebook/test-ebook-get-supported-auth-methods.c
index cbf39db..f02e866 100644
--- a/tests/libebook/test-ebook-get-supported-auth-methods.c
+++ b/tests/libebook/test-ebook-get-supported-auth-methods.c
@@ -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);
 }
 
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 82dd22e..deba78e 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]