Main window: Minor optimisations of the document list

Signed-off-by: Jerome Flesch <jflesch@gmail.com>