diff options
-rw-r--r-- | updater/conf_dialog.cpp | 24 | ||||
-rw-r--r-- | updater/options.cpp | 23 | ||||
-rw-r--r-- | updater/options.h | 1 | ||||
-rw-r--r-- | updater/resource.h | 2 | ||||
-rw-r--r-- | updater/socket.cpp | 12 | ||||
-rw-r--r-- | updater/updater.rc | 32 | ||||
-rw-r--r-- | updater/version.h | 4 |
7 files changed, 63 insertions, 35 deletions
diff --git a/updater/conf_dialog.cpp b/updater/conf_dialog.cpp index b12d8b0..8830086 100644 --- a/updater/conf_dialog.cpp +++ b/updater/conf_dialog.cpp @@ -9,13 +9,23 @@ BOOL CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SetWindowLong(hwndDlg, GWL_USERDATA, 0);
SendMessage(GetDlgItem(hwndDlg, IDC_LIST_UPDATES),LVM_SETEXTENDEDLISTVIEWSTYLE, 0,LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
- if(DBGetContactSettingByte(0, "Updater", "DefaultConfAll", 0)) {
- CheckDlgButton(hwndDlg, IDC_CHK_CONFALL, TRUE);
- HWND hw = GetDlgItem(hwndDlg, IDC_CHK_NOINSTALL);
- EnableWindow(hw, FALSE);
- } else if(DBGetContactSettingByte(0, "Updater", "NoInstall", 0)) {
- CheckDlgButton(hwndDlg, IDC_CHK_NOINSTALL, TRUE);
- SetWindowText(GetDlgItem(hwndDlg, IDOK), TranslateT("Download"));
+ if(options.save_zips && options.no_unzip) {
+ CheckDlgButton(hwndDlg, IDC_CHK_CONFALL, FALSE);
+ HWND hw = GetDlgItem(hwndDlg, IDC_CHK_CONFALL);
+ EnableWindow(hw, FALSE);
+ hw = GetDlgItem(hwndDlg, IDC_CHK_NOINSTALL);
+ EnableWindow(hw, FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHK_NOINSTALL, TRUE);
+ SetWindowText(GetDlgItem(hwndDlg, IDOK), TranslateT("Download"));
+ } else {
+ if(DBGetContactSettingByte(0, "Updater", "DefaultConfAll", 0)) {
+ CheckDlgButton(hwndDlg, IDC_CHK_CONFALL, TRUE);
+ HWND hw = GetDlgItem(hwndDlg, IDC_CHK_NOINSTALL);
+ EnableWindow(hw, FALSE);
+ } else if(DBGetContactSettingByte(0, "Updater", "NoInstall", 0)) {
+ CheckDlgButton(hwndDlg, IDC_CHK_NOINSTALL, TRUE);
+ SetWindowText(GetDlgItem(hwndDlg, IDOK), TranslateT("Download"));
+ }
}
{
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];
diff --git a/updater/options.h b/updater/options.h index be6ef6a..ccaaacf 100644 --- a/updater/options.h +++ b/updater/options.h @@ -25,6 +25,7 @@ typedef struct Options_tag { COLORREF textCol;
VersionRequirement ver_req;
bool save_zips;
+ bool no_unzip;
bool auto_dll_only;
TCHAR zip_folder[MAX_PATH];
} Options;
diff --git a/updater/resource.h b/updater/resource.h index 4796e8a..d8252f5 100644 --- a/updater/resource.h +++ b/updater/resource.h @@ -43,6 +43,8 @@ #define IDC_ST_VERREQ 1025
#define IDC_CHK_SAVEZIPS 1026
#define IDC_ANIMATE1 1027
+#define IDC_CHK_SAVEZIPS2 1027
+#define IDC_CHK_NOUNZIP 1027
#define IDC_BTN_CHANGELOG 1028
#define IDC_BTN_SELECTDLLS 1029
#define IDC_BTN_SELECTDLLS2 1030
diff --git a/updater/socket.cpp b/updater/socket.cpp index 233c458..d066a9d 100644 --- a/updater/socket.cpp +++ b/updater/socket.cpp @@ -102,11 +102,13 @@ bool GetFile(char *url, TCHAR *temp_folder, char *plugin_name, char *version, bo if(ext && *ext && strcmp(ext, ".zip") == 0) {
- char *ans_save_file = GetAString(save_file), *ans_temp_folder = GetAString(temp_folder);
- //MessageBoxA(0, ans_temp_folder, ans_save_file, MB_OK);
- unzip_file(ans_save_file, ans_temp_folder);
- free(ans_save_file);
- free(ans_temp_folder);
+ if(!options.no_unzip) {
+ char *ans_save_file = GetAString(save_file), *ans_temp_folder = GetAString(temp_folder);
+ //MessageBoxA(0, ans_temp_folder, ans_save_file, MB_OK);
+ unzip_file(ans_save_file, ans_temp_folder);
+ free(ans_save_file);
+ free(ans_temp_folder);
+ }
if(options.save_zips) {
TCHAR save_archive[MAX_PATH];
diff --git a/updater/updater.rc b/updater/updater.rc index 8ca3b22..2f036ad 100644 --- a/updater/updater.rc +++ b/updater/updater.rc @@ -7,7 +7,7 @@ //
// Generated from the TEXTINCLUDE 2 resource.
//
-#include <windows.h>
+#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -81,28 +81,29 @@ IDD_OPT1 DIALOGEX 0, 0, 293, 228 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- CONTROL "Check for updates on startup",IDC_CHK_ONSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,105,138,10
+ CONTROL "Check for updates on startup",IDC_CHK_ONSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,97,138,10
PUSHBUTTON "Check for updates",IDC_BTN_CHECK,156,211,91,17
- CONTROL "List1",IDC_LST_REGISTERED,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,0,293,79
- CONTROL "(But only once per day)",IDC_CHK_ONCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,118,128,10
- CONTROL "Check daily",IDC_CHK_DAILY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,131,136,10
+ CONTROL "List1",IDC_LST_REGISTERED,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,0,293,70
+ CONTROL "(But only once per day)",IDC_CHK_ONCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,110,128,10
+ CONTROL "Check daily",IDC_CHK_DAILY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,123,136,10
CONTROL "Install without confirmation if idle",IDC_CHK_NOCONFIDLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,144,128,10
- CONTROL "Backup updated files",IDC_CHK_BACKUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,105,127,10
- GROUPBOX "General Settings",IDC_STATIC,0,81,293,93
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,136,128,10
+ CONTROL "Backup updated files",IDC_CHK_BACKUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,97,127,10
+ GROUPBOX "General Settings",IDC_STATIC,0,72,293,103
GROUPBOX "Global Status Control",IDC_STATIC,0,178,293,30
CONTROL "Start offline, restore after update check",IDC_CHK_STARTOFFLINE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,191,215,10
- CONTROL "Use popups for progress info",IDC_CHK_POPUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,118,127,10
- CONTROL "Show 'Restart' menu item",IDC_CHK_RESTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,131,127,10
+ CONTROL "Use popups for progress info",IDC_CHK_POPUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,110,127,10
+ CONTROL "Show 'Restart' menu item",IDC_CHK_RESTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,123,127,10
PUSHBUTTON "Update and Exit",IDC_BTN_CHECKNORESTART,58,211,91,17
CONTROL "Show 'Update and Exit' menu item",IDC_CHK_UPDATEANDEXIT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,144,127,10
- CONTROL "Slider1",IDC_SLID_VERREQ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,14,91,100,12
- LTEXT "Static",IDC_ST_VERREQ,130,93,146,8
- CONTROL "Keep downloaded archives",IDC_CHK_SAVEZIPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,157,127,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,136,127,10
+ CONTROL "Slider1",IDC_SLID_VERREQ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,14,83,100,12
+ LTEXT "Static",IDC_ST_VERREQ,130,85,146,8
+ CONTROL "Keep downloaded archives",IDC_CHK_SAVEZIPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,149,127,10
CONTROL "Only install DLLs automatically",IDC_CHK_DLLSONLY,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,157,128,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,149,128,10
+ CONTROL "Don't unzip",IDC_CHK_NOUNZIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,161,127,10
END
IDD_CONFIRMUPDATES DIALOGEX 0, 0, 241, 209
@@ -232,4 +233,3 @@ IDI_UPDATEANDEXIT ICON "ue.ico" /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
-
diff --git a/updater/version.h b/updater/version.h index 5019dd4..5d7d0eb 100644 --- a/updater/version.h +++ b/updater/version.h @@ -4,8 +4,8 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 5
-#define __RELEASE_NUM 3
-#define __BUILD_NUM 1
+#define __RELEASE_NUM 4
+#define __BUILD_NUM 0
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|