diff options
author | Claudiu Olteanu <olteanu.claudiu@ymail.com> | 2015-09-06 23:59:28 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-07 07:29:15 -0700 |
commit | 9e97f124c6b5fe4f50ff188f8470c0a5c5cce6b7 (patch) | |
tree | 21b59c516c827a6cbfb2015b9b97e18b52aeff46 /divecomputer.cpp | |
parent | 384ab944f26351a64452852a5542ced9f620e261 (diff) | |
download | subsurface-9e97f124c6b5fe4f50ff188f8470c0a5c5cce6b7.tar.gz |
Save Bluetooth download mode settings
Save the dive computer download mode flag. In this way,
if the user used Bluetooth mode to download its dives on
his last session he doesn't need to open the Bth selection
dialog if he wants to use the same device.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divecomputer.cpp')
-rw-r--r-- | divecomputer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/divecomputer.cpp b/divecomputer.cpp index ac43bd00b..b45b74a44 100644 --- a/divecomputer.cpp +++ b/divecomputer.cpp @@ -6,6 +6,7 @@ const char *default_dive_computer_vendor; const char *default_dive_computer_product; const char *default_dive_computer_device; +int default_dive_computer_download_mode; DiveComputerList dcList; DiveComputerList::DiveComputerList() @@ -172,6 +173,16 @@ void set_default_dive_computer_device(const char *name) s.endGroup(); } +void set_default_dive_computer_download_mode(int download_mode) +{ + QSettings s; + + default_dive_computer_download_mode = download_mode; + s.beginGroup("DiveComputer"); + s.setValue("dive_computer_download_mode", download_mode); + s.endGroup(); +} + extern "C" void set_dc_nickname(struct dive *dive) { if (!dive) |