diff options
-rw-r--r-- | plugins/PluginUpdater/res/Resource.rc | 20 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Options.cpp | 25 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/resource.h | 3 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/stdafx.h | 4 |
4 files changed, 41 insertions, 11 deletions
diff --git a/plugins/PluginUpdater/res/Resource.rc b/plugins/PluginUpdater/res/Resource.rc index d5cc6f3418..81063d9b7d 100644 --- a/plugins/PluginUpdater/res/Resource.rc +++ b/plugins/PluginUpdater/res/Resource.rc @@ -57,7 +57,7 @@ BEGIN PUSHBUTTON "Select &none",IDC_SELNONE,175,218,60,14,NOT WS_TABSTOP
END
-IDD_OPT_UPDATENOTIFY DIALOGEX 0, 0, 301, 237
+IDD_OPT_UPDATENOTIFY DIALOGEX 0, 0, 301, 251
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -75,15 +75,17 @@ BEGIN CONTROL "Silent mode",IDC_SILENTMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,72,267,10
CONTROL "Backup database before update (requires Db_autobackups plugin)",IDC_BACKUP,
"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,86,272,10
- GROUPBOX "Files source",IDC_STATIC,2,104,285,106
+ GROUPBOX "Files source",IDC_STATIC,2,104,285,121
CONTROL "Stable version",IDC_STABLE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,117,267,10
- CONTROL "Development version (less stable)",IDC_TRUNK,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,132,267,10
+ CONTROL "Stable version with debug symbols",IDC_STABLE_SYMBOLS,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,132,267,10
+ CONTROL "Development version (less stable)",IDC_TRUNK,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,147,267,10
CONTROL "Development version with debug symbols",IDC_TRUNK_SYMBOLS,
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,147,267,10
- CONTROL "Custom version",IDC_CUSTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,162,267,10
- EDITTEXT IDC_CUSTOMURL,12,176,267,16,ES_AUTOHSCROLL | WS_DISABLED
- CTEXT "Some component(s) was updated.\nYou need to restart your Miranda to apply installed updates.",IDC_NEEDRESTARTLABEL,11,214,267,15,NOT WS_VISIBLE
- CONTROL "Change platform to 32-bit",IDC_CHANGE_PLATFORM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,197,212,10
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,162,267,10
+ CONTROL "Custom version",IDC_CUSTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,177,267,10
+ EDITTEXT IDC_CUSTOMURL,12,190,267,16,ES_AUTOHSCROLL | WS_DISABLED
+ CONTROL "Change platform to 32-bit",IDC_CHANGE_PLATFORM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,211,212,10
+ CTEXT "Some component(s) was updated.\nYou need to restart your Miranda to apply installed updates.",IDC_NEEDRESTARTLABEL,11,228,267,15,NOT WS_VISIBLE
END
IDD_POPUP DIALOGEX 0, 0, 316, 174
@@ -184,7 +186,7 @@ BEGIN VERTGUIDE, 11
VERTGUIDE, 278
VERTGUIDE, 286
- BOTTOMMARGIN, 229
+ BOTTOMMARGIN, 243
END
IDD_POPUP, DIALOG
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 89e6b9cf60..d52406cf41 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -125,6 +125,11 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED);
break;
+ case UPDATE_MODE_STABLE_SYMBOLS:
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ CheckDlgButton(hwndDlg, IDC_STABLE_SYMBOLS, BST_CHECKED);
+ break;
case UPDATE_MODE_TRUNK:
mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
@@ -203,6 +208,14 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+ case IDC_STABLE_SYMBOLS:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
case IDC_CUSTOM:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
@@ -231,6 +244,10 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar mir_snwprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
+ else if (IsDlgButtonChecked(hwndDlg, IDC_STABLE_SYMBOLS)) {
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ }
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
@@ -273,6 +290,14 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar opts.bForceRedownload = 0;
db_unset(NULL, MODULENAME, DB_SETTING_REDOWNLOAD);
}
+ else if (IsDlgButtonChecked(hwndDlg, IDC_STABLE_SYMBOLS)) {
+ // Only set ForceRedownload if the previous UpdateMode was different
+ // to redownload all plugin with pdb files
+ if (db_get_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE) != UPDATE_MODE_STABLE_SYMBOLS) {
+ db_set_b(NULL, MODULENAME, DB_SETTING_REDOWNLOAD, opts.bForceRedownload = 1);
+ db_set_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE_SYMBOLS);
+ }
+ }
else if ( IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
db_set_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
if (!opts.bChangePlatform)
diff --git a/plugins/PluginUpdater/src/resource.h b/plugins/PluginUpdater/src/resource.h index 1c36dbb44e..26328ba77c 100644 --- a/plugins/PluginUpdater/src/resource.h +++ b/plugins/PluginUpdater/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by d:\Miranda_orig\plugins\PluginUpdater\res\Resource.rc
+// Used by D:\Miranda NG Git_orig_commit\miranda-ng\plugins\PluginUpdater\res\Resource.rc
//
#define IDD_UPDATE 101
#define IDD_OPT_UPDATENOTIFY 102
@@ -50,6 +50,7 @@ #define IDC_SILENTMODE 1047
#define IDC_NEEDRESTARTLABEL 1048
#define IDC_BACKUP 1049
+#define IDC_STABLE_SYMBOLS 1050
#define IDC_CHANGE_PLATFORM 1052
#define IDC_MSG_BOXES 40071
#define IDC_ERRORS 40072
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index b05403facf..b0b79345e8 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -101,6 +101,7 @@ extern struct PlugOptions #define DEFAULT_UPDATE_URL L"https://miranda-ng.org/distr/stable/x%d"
#define DEFAULT_UPDATE_URL_TRUNK L"https://miranda-ng.org/distr/x%d"
#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS L"https://miranda-ng.org/distr/pdb_x%d"
+#define DEFAULT_UPDATE_URL_STABLE_SYMBOLS L"https://miranda-ng.org/distr/stable/pdb_x%d"
#define FILENAME_X64 L"miranda64.exe"
@@ -128,7 +129,8 @@ extern struct PlugOptions #define UPDATE_MODE_STABLE 1
#define UPDATE_MODE_TRUNK 2
#define UPDATE_MODE_TRUNK_SYMBOLS 3
-#define UPDATE_MODE_MAX_VALUE 3 // when adding new mode, increment this number
+#define UPDATE_MODE_STABLE_SYMBOLS 4
+#define UPDATE_MODE_MAX_VALUE 4 // when adding new mode, increment this number
#define DB_SETTING_UPDATE_MODE "UpdateMode"
#define DB_SETTING_UPDATE_URL "UpdateURL"
|