Add or remove all in a treeview

In gpk-update-viewer, the user can select with checkboxes which updates should be applied. This is fine, until you want to uncheck or check them all at once, where for 300 updates, unclicking each box seems tiresome. Matthias suggested a checkbox in the treeview header (but can't remember where he had seen that) and I quite like a right-click context menu. The open bug is here. Ideas welcome. Thanks!