annotate pui-types.h.in @ 31:9905d4ae351c

Fix continuos loop of update checks if the refresh cache interval is 0 If the interval for refreshing the cache is set to 0 each check for available updates refreshes the cache and causes an "updates-changed" signal to be emitted after a short delay which in turn triggers another check for updates. The "updates-changed" signal does not actually mean that the number of available updates has changed but rather that the package metadata cache has been invalidated. Fix this by blocking the "updates-changed" signal handler from when a periodic or irregular check is started until 4 seconds after it has finished. This is necessary since the signal will be delivered with a delay after a transaction has been completed. In addition prevent checks for updates triggered by the "updates-changed" signal from refreshing the cache even the interval is 0 since the emission of the signal implies that the cache has just been refreshed.
author Guido Berhoerster <guido+pui@berhoerster.name>
date Thu, 29 Aug 2019 13:48:47 +0200
parents adba37525ee5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
1 /*** BEGIN file-header ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
2 #ifndef PUI_TYPES_H
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
3 #define PUI_TYPES_H
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
4
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
5 #include <glib-object.h>
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
6
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
7 G_BEGIN_DECLS
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
8 /*** END file-header ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
9
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
10 /*** BEGIN file-production ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
11
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
12 /* enumerations from "@filename@" */
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
13 /*** END file-production ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
14
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
15 /*** BEGIN value-header ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
16
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
17 #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
18 GType @enum_name@_get_type(void) G_GNUC_CONST;
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
19 /*** END value-header ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
20
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
21 /*** BEGIN file-tail ***/
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
22
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
23 gchar * pui_types_enum_to_string(GType, gint);
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
24
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
25 G_END_DECLS
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
26
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
27 #endif /* !PUI_TYPES_H */
adba37525ee5 Notify about required session or system restarts
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff changeset
28 /*** END file-tail ***/