When receiving close request event, main window should quit program
if there is no system tray available, and just like the close button
was clicked. The window close request event happens when user close
window by pressing alt-f4 (Gnome) or when receiving WM_DELETE_WINDOW
xwindow event. Current behavior is just close the window and let the
program keep running, and there is no way to quit program without
system tray.
* Add minimize button and change close button behavior
* close main window (minimize to tray) if system tray available,
quit application otherwise.
* show minimize button if system tray unavailable
* Move some codes from TrayMenuController to FxApplication, includes:
* Desktop integrations (shortcut, quit handlers...)
* vaults change listener for sudden termination
* public method showPreferenceWindow change to showPerferenceTab
due to name conflict
* public method quitApplication for both main window and system tray
* shutdown hook for unmounting vaults on shutdown
* Add a new i18n string: main.minimizeBtn.tooltip
The usesIndividualMountPath setting will be cleared if it bind to
an uninitialized radio button. This patch sets radio button with
current settings before binding the setting to the radio button.