changeset 32:b9c65915cc54

Reduce delay before checking for updates after an "updates-changed" signal
author Guido Berhoerster <guido+pui@berhoerster.name>
date Thu, 29 Aug 2019 17:41:06 +0200
parents 9905d4ae351c
children 8c5aee997afa
files pui-backend.c pui-common.h
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pui-backend.c	Thu Aug 29 13:48:47 2019 +0200
+++ b/pui-backend.c	Thu Aug 29 17:41:06 2019 +0200
@@ -557,7 +557,8 @@
 		if (self->check_id != 0) {
 			g_source_remove(self->check_id);
 		}
-		self->check_id = g_timeout_add_seconds(PUI_STARTUP_DELAY,
+		self->check_id =
+		    g_timeout_add_seconds(PUI_UPDATES_CHANGED_DELAY,
 		    irregular_check, self);
 	}
 }
--- a/pui-common.h	Thu Aug 29 13:48:47 2019 +0200
+++ b/pui-common.h	Thu Aug 29 17:41:06 2019 +0200
@@ -30,6 +30,10 @@
 #define	PUI_STARTUP_DELAY		(3 * 60)
 #endif /* !PUI_STARTUP_DELAY */
 
+#ifndef	PUI_UPDATES_CHANGED_DELAY
+#define	PUI_UPDATES_CHANGED_DELAY	(30)
+#endif /* !PUI_UPDATES_CHANGED_DELAY */
+
 #ifndef	PUI_CHECK_UPDATES_INTERVAL
 #define	PUI_CHECK_UPDATES_INTERVAL	(60 * 60)
 #endif /* !PUI_CHECK_UPDATES_INTERVAL */