diff options
author | Sergey Tatarinov <tatarinov.sergey@gmail.com> | 2013-11-11 17:16:42 +0000 |
---|---|---|
committer | Sergey Tatarinov <tatarinov.sergey@gmail.com> | 2013-11-11 17:16:42 +0000 |
commit | 729e1455178c6e5e83e9c6fcbc9deda2bec35a92 (patch) | |
tree | 6ea6e124a574826ff39821f9ab2529fd375ea5fe /plugins/Db_autobackups/src/options.cpp | |
parent | f82d7993aa423b0628a662f2d58bbf387cb48db8 (diff) |
Db_autobackups: added ability to compress the backups in the archive, version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@6867 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src/options.cpp')
-rw-r--r-- | plugins/Db_autobackups/src/options.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index e76707a904..e547b3f6c4 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -29,6 +29,7 @@ int LoadOptions(void) options.disable_progress = (BOOL)db_get_b(0, "AutoBackups", "NoProgress", 0);
options.disable_popups = (BOOL)db_get_b(0, "AutoBackups", "NoPopups", 0);
+ options.use_zip = (BOOL)db_get_b(0, "AutoBackups", "UseZip", 0);
SetBackupTimer();
return 0;
@@ -63,6 +64,7 @@ int SaveOptions(void) db_set_w(0, "AutoBackups", "NumBackups", (WORD)options.num_backups);
db_set_b(0, "AutoBackups", "NoProgress", (BYTE)options.disable_progress);
db_set_b(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
+ db_set_b(0, "AutoBackups", "UseZip", (BYTE)options.use_zip);
SetBackupTimer();
return 0;
@@ -83,6 +85,7 @@ int SetDlgState(HWND hwndDlg) EnableWindow(GetDlgItem(hwndDlg, IDC_LNK_FOLDERS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPROG), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_USEZIP), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PERIOD), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PT), FALSE);
@@ -97,6 +100,7 @@ int SetDlgState(HWND hwndDlg) EnableWindow(GetDlgItem(hwndDlg, IDC_LNK_FOLDERS), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPROG), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), TRUE);
+ 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);
@@ -116,6 +120,7 @@ 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);
if ( !ServiceExists(MS_POPUP_ADDPOPUP))
ShowWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), SW_HIDE);
@@ -264,6 +269,10 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP new_options.disable_popups = IsDlgButtonChecked(hwndDlg, IDC_CHK_NOPOPUP);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+ case IDC_CHK_USEZIP:
+ new_options.use_zip = IsDlgButtonChecked(hwndDlg, IDC_CHK_USEZIP);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
case IDC_LNK_FOLDERS:
{
OPENOPTIONSDIALOG ood = {0};
|