Until I added a property to XfdashboardApplicationsView to switch between list and icon mode and calling filter_changed signal handler explicitly I should move the code after the part which creates the layout manager for this view.