projects/package-update-indicator

changeset 32:b9c65915cc54

Reduce delay before checking for updates after an "updates-changed" signal
author Guido Berhoerster <guido+pui@berhoerster.name>
date Thu Aug 29 17:41:06 2019 +0200 (9 months ago)
parents 9905d4ae351c
children 8c5aee997afa
files pui-backend.c pui-common.h
line diff
     1.1 --- a/pui-backend.c	Thu Aug 29 13:48:47 2019 +0200
     1.2 +++ b/pui-backend.c	Thu Aug 29 17:41:06 2019 +0200
     1.3 @@ -557,7 +557,8 @@
     1.4  		if (self->check_id != 0) {
     1.5  			g_source_remove(self->check_id);
     1.6  		}
     1.7 -		self->check_id = g_timeout_add_seconds(PUI_STARTUP_DELAY,
     1.8 +		self->check_id =
     1.9 +		    g_timeout_add_seconds(PUI_UPDATES_CHANGED_DELAY,
    1.10  		    irregular_check, self);
    1.11  	}
    1.12  }
     2.1 --- a/pui-common.h	Thu Aug 29 13:48:47 2019 +0200
     2.2 +++ b/pui-common.h	Thu Aug 29 17:41:06 2019 +0200
     2.3 @@ -30,6 +30,10 @@
     2.4  #define	PUI_STARTUP_DELAY		(3 * 60)
     2.5  #endif /* !PUI_STARTUP_DELAY */
     2.6  
     2.7 +#ifndef	PUI_UPDATES_CHANGED_DELAY
     2.8 +#define	PUI_UPDATES_CHANGED_DELAY	(30)
     2.9 +#endif /* !PUI_UPDATES_CHANGED_DELAY */
    2.10 +
    2.11  #ifndef	PUI_CHECK_UPDATES_INTERVAL
    2.12  #define	PUI_CHECK_UPDATES_INTERVAL	(60 * 60)
    2.13  #endif /* !PUI_CHECK_UPDATES_INTERVAL */