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>
This commit is contained in:
Claudiu Olteanu 2015-09-06 23:59:28 +03:00 committed by Dirk Hohndel
parent 384ab944f2
commit 9e97f124c6
5 changed files with 17 additions and 3 deletions

View file

@ -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)