Move the import of .FIT files into the 'Import log files' menu item,
where most people will be looking for it. This also naturally opens a
file selection dialog, which is more intuitive than having to select
this in the dive computer import dialog.
Also fix a bug affecting file imports if the log files contain
coordinates - the dive log needs to be set in the import data structure.
And refactor the file dialog file filters to make it more natural to add
more entries.
Requires https://github.com/subsurface/libdc/pull/72 to work.
Signed-off-by: Michael Keller <github@ike.ch>
Import can be done from .script files generated by LogTrak software or
from .asd files generated by SmartTrak and LogTrak export option.
This code was writen in C, and has just been "ported" to some extent to
C++, so it can work with recent rework of Subsurface to C++.
I'm not a C++ guy, so this is mostly C with some make-up.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>