[evolution-data-server] Use macros for CamelOperation timeouts.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Use macros for CamelOperation timeouts.
- Date: Thu, 30 Sep 2010 11:17:33 +0000 (UTC)
commit dcac76c902f823562c1cbdfb0cedd7c0c245fcd5
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Sep 30 07:16:51 2010 -0400
Use macros for CamelOperation timeouts.
So they can be tuned more easily.
camel/camel-operation.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 67cccda..860bf59 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -35,6 +35,9 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), CAMEL_TYPE_OPERATION, CamelOperationPrivate))
+#define PROGRESS_DELAY 250 /* milliseconds */
+#define TRANSIENT_DELAY 4 /* seconds */
+
typedef struct _StatusNode StatusNode;
struct _StatusNode {
@@ -400,7 +403,8 @@ camel_operation_push_message (GCancellable *cancellable,
(GSourceFunc) operation_emit_status_cb, node);
else
node->source_id = g_timeout_add_seconds (
- 4, (GSourceFunc) operation_emit_status_cb, node);
+ TRANSIENT_DELAY, (GSourceFunc)
+ operation_emit_status_cb, node);
g_queue_push_head (&operation->priv->status_stack, node);
@@ -488,7 +492,7 @@ camel_operation_progress (GCancellable *cancellable,
/* Rate limit progress updates. */
if (node->source_id == 0)
node->source_id = g_timeout_add (
- 250, (GSourceFunc)
+ PROGRESS_DELAY, (GSourceFunc)
operation_emit_status_cb, node);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]