Code cleaning related to search
Some changes I did a while ago but did not push yet.
First commit changes the layout of the result tab in the search dialog a
bit. E.g. the "Search text:" field is only shown the user specified text to
search for.
The second commit is only code cleaning and should not change any
functionality.