merge 3.980 into main (manually)

we are getting merge conflicts otherwhise and I don't want to override
the files we need for queries; attribution to hide goes to Romka;
attribution to changes in settings and main go to mouse; all other
commits are cherry-picked from main to 3.980 or vice versa and show
correctly in the history; the alternate hide, main and settings can be
found for now in the alpha branch as of the 26th of August 2014