Mercurial > projects > package-update-indicator
view pui-about-dialog.ui @ 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 | 7172a0db97af |
children |
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.20.0 --> <interface> <requires lib="gtk+" version="3.20"/> <object class="GtkAboutDialog" id="about-dialog"> <property name="can_focus">False</property> <property name="title" translatable="yes">About Package Update Indicator</property> <property name="icon_name">system-software-update</property> <property name="type_hint">dialog</property> <property name="program_name">Package Update Indicator</property> <property name="copyright" translatable="yes">Copyright © 2018 Guido Berhörster</property> <property name="comments" translatable="yes">Notify about available software updates</property> <property name="website">http://code.guido-berhoerster.org/projects/package-update-indicator/</property> <property name="authors">Guido Berhörster</property> <property name="translator_credits" translatable="yes" comments="Place your name here.">Translator</property> <property name="logo_icon_name">system-software-update</property> <property name="wrap_license">True</property> <property name="license_type">mit-x11</property> <child internal-child="vbox"> <object class="GtkBox"> <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">2</property> <child internal-child="action_area"> <object class="GtkButtonBox"> <property name="can_focus">False</property> <property name="layout_style">end</property> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> <placeholder/> </child> </object> </child> </object> </interface>