summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src/options.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-09 18:14:27 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-09 18:14:27 +0000
commit7200ed0e6db65ef17549004af7ed12b06b99d13a (patch)
tree9ecc312ca34ecfa9a28b678e08c6602fc1c814f5 /plugins/Db_autobackups/src/options.cpp
parentd49739f87dd347d6a560dd834788b74cf520b931 (diff)
db_autobackups: support backuping profile folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@16252 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src/options.cpp')
-rw-r--r--plugins/Db_autobackups/src/options.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index 90e2fa5fdc..bb5175de23 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -61,6 +61,7 @@ int LoadOptions(void)
options.disable_popups = (BOOL)db_get_b(0, "AutoBackups", "NoPopups", 0);
options.use_zip = (BOOL)db_get_b(0, "AutoBackups", "UseZip", 0);
options.use_dropbox = (BOOL)(db_get_b(0, "AutoBackups", "UseDropbox", 0) && ServiceExists(MS_DROPBOX_SEND_FILE));
+ options.backup_profile = (BOOL)db_get_b(0, "AutoBackups", "BackupProfile", 0);
SetBackupTimer();
return 0;
@@ -97,6 +98,7 @@ int SaveOptions(void)
db_set_b(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
db_set_b(0, "AutoBackups", "UseZip", (BYTE)options.use_zip);
db_set_b(0, "AutoBackups", "UseDropbox", (BYTE)options.use_dropbox);
+ db_set_b(0, "AutoBackups", "BackupProfile", (BYTE)options.backup_profile);
SetBackupTimer();
return 0;
@@ -136,6 +138,8 @@ int SetDlgState(HWND hwndDlg)
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_USEZIP), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PERIOD), new_options.backup_types & BT_PERIODIC);
EnableWindow(GetDlgItem(hwndDlg, IDC_PT), new_options.backup_types & BT_PERIODIC);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DROPBOX), ServiceExists(MS_DROPBOX_SEND_FILE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BACKUPPROFILE), new_options.use_zip);
CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_RAD_START, new_options.backup_types & BT_START ? BST_CHECKED : BST_UNCHECKED);
@@ -154,7 +158,8 @@ int SetDlgState(HWND hwndDlg)
CheckDlgButton(hwndDlg, IDC_CHK_NOPROG, new_options.disable_progress ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_NOPOPUP, new_options.disable_popups ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_USEZIP, new_options.use_zip ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DROPBOX, new_options.use_dropbox ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPBOX, new_options.use_dropbox && ServiceExists(MS_DROPBOX_SEND_FILE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BACKUPPROFILE, new_options.backup_profile && new_options.use_zip ? BST_CHECKED : BST_UNCHECKED);
if (!ServiceExists(MS_POPUP_ADDPOPUPT))
ShowWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), SW_HIDE);
@@ -306,11 +311,16 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case IDC_CHK_USEZIP:
new_options.use_zip = IsDlgButtonChecked(hwndDlg, IDC_CHK_USEZIP);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BACKUPPROFILE), new_options.use_zip);
break;
case IDC_DROPBOX:
new_options.use_dropbox = IsDlgButtonChecked(hwndDlg, IDC_DROPBOX);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+ case IDC_BACKUPPROFILE:
+ new_options.backup_profile = IsDlgButtonChecked(hwndDlg, IDC_BACKUPPROFILE) && IsDlgButtonChecked(hwndDlg, IDC_CHK_USEZIP);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
case IDC_LNK_FOLDERS:
{
OPENOPTIONSDIALOG ood = { 0 };