Small refactoring in DatabaseWidget.