diff options
Diffstat (limited to 'updater/options.cpp')
-rw-r--r-- | updater/options.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/updater/options.cpp b/updater/options.cpp index 8522b87..926fbdd 100644 --- a/updater/options.cpp +++ b/updater/options.cpp @@ -110,7 +110,10 @@ static BOOL CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
HWND hw = GetDlgItem(hwndDlg, IDC_CHK_POPUP);
EnableWindow(hw, ArePopupsEnabled() ? TRUE : FALSE);
+ hw = GetDlgItem(hwndDlg, IDC_CHK_NOUNZIP);
+ EnableWindow(hw, options.save_zips ? TRUE : FALSE);
}
+ CheckDlgButton(hwndDlg, IDC_CHK_NOUNZIP, options.no_unzip);
CheckDlgButton(hwndDlg, IDC_CHK_DLLSONLY, options.auto_dll_only);
// set up Version Requirement slider
@@ -230,10 +233,17 @@ static BOOL CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_CHK_POPUP:
case IDC_CHK_RESTART:
case IDC_CHK_UPDATEANDEXIT:
- case IDC_CHK_SAVEZIPS:
+ case IDC_CHK_NOUNZIP:
case IDC_CHK_DLLSONLY:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
return TRUE;
+ case IDC_CHK_SAVEZIPS:
+ {
+ HWND hw = GetDlgItem(hwndDlg, IDC_CHK_NOUNZIP);
+ EnableWindow(hw, (IsDlgButtonChecked(hwndDlg, IDC_CHK_SAVEZIPS) ? TRUE : FALSE));
+ }
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ return TRUE;
case IDC_BTN_CHECK:
CallService(MS_UPDATE_CHECKFORUPDATES, 0, 0);
return TRUE;
@@ -315,6 +325,7 @@ static BOOL CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM options.popup_notify = (IsDlgButtonChecked(hwndDlg, IDC_CHK_POPUP) ? true : false);
options.ver_req = (VersionRequirement)SendDlgItemMessage(hwndDlg, IDC_SLID_VERREQ, TBM_GETPOS, 0, 0);
options.save_zips = (IsDlgButtonChecked(hwndDlg, IDC_CHK_SAVEZIPS) ? true : false);
+ options.no_unzip = (IsDlgButtonChecked(hwndDlg, IDC_CHK_NOUNZIP) ? true : false);
options.auto_dll_only = (IsDlgButtonChecked(hwndDlg, IDC_CHK_DLLSONLY) ? true : false);
bool restart_menu_item = (IsDlgButtonChecked(hwndDlg, IDC_CHK_RESTART) ? true : false);
@@ -534,6 +545,7 @@ void LoadOptions() { options.restart_menu_item = (DBGetContactSettingByte(0, MODULE, "RestartMenuItem", 0) == 1);
options.update_and_exit_menu_item = (DBGetContactSettingByte(0, MODULE, "UpdateAndExitMenuItem", 0) == 1);
options.save_zips = (DBGetContactSettingByte(0, MODULE, "SaveZips", 0) == 1);
+ options.no_unzip = (DBGetContactSettingByte(0, MODULE, "NoUnzip", 0) == 1);
options.set_colours = false; // = (DBGetContactSettingByte(0, MODULE, "PopupSetColours", 0) == 1); // popup colours - not implemented
options.bkCol = DBGetContactSettingDword(0, MODULE, "PopupBkCol", 0);
@@ -548,17 +560,17 @@ void LoadOptions() { #ifdef _UNICODE
fd.flags = FF_UNICODE;
#endif
- strncpy(fd.szSection, Translate("Updates"), 64);
+ strncpy(fd.szSection, "Updates", 64);
- strncpy(fd.szName, Translate("Backups"), 64);
+ strncpy(fd.szName, "Backups", 64);
fd.szFormatT = _T(MIRANDA_PATH) _T("\\updater\\backups");
hBackupPath = (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM)&fd);
- strncpy(fd.szName, Translate("Data"), 64);
+ strncpy(fd.szName, "Data", 64);
fd.szFormatT = _T(MIRANDA_PATH) _T("\\updater\\data");
hDataPath = (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM)&fd);
- strncpy(fd.szName, Translate("Saved Archives"), 64);
+ strncpy(fd.szName, "Saved Archives", 64);
fd.szFormatT = _T(MIRANDA_PATH) _T("\\updater\\archives");
hArchivePath = (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM)&fd);
@@ -640,6 +652,7 @@ void SaveOptions() { DBWriteContactSettingByte(0, MODULE, "UpdateAndExitMenuItem", options.update_and_exit_menu_item ? 1 : 0);
DBWriteContactSettingByte(0, MODULE, "VersionRequirement", (int)options.ver_req);
DBWriteContactSettingByte(0, MODULE, "SaveZips", (int)options.save_zips);
+ DBWriteContactSettingByte(0, MODULE, "NoUnzip", (int)options.no_unzip);
DBWriteContactSettingByte(0, MODULE, "AutoDLLOnly", options.auto_dll_only ? 1 : 0);
TCHAR mir_path[MAX_PATH];
|