mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
384ab944f2
commit
9e97f124c6
5 changed files with 17 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue