Fixed bug in time dialog and most of preferences dialog finished
Finished preferences