Refactore test_modified in sig_reload to use modified_save

review992002
Fix fallback value of get_preferences
Use global solution for iconify main window

Revert the changeset 47524e77438b
Using focus out event is wrong because it hides the window when opening an
other dialog box from the search box (like the date picker).
So now we watch the state of the main window and iconify or deiconify all
toplevel windows.

issue3116
review990002
Manage selection tree state

review823002