summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/Options.cpp')
-rw-r--r--plugins/PluginUpdater/src/Options.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 5d54e559fe..38dd4d5802 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -33,7 +33,7 @@ static int GetUpdateMode()
// Check if there is url for custom mode
if (UpdateMode == UPDATE_MODE_CUSTOM) {
- ptrT url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL || !wcslen(url)) {
// No url for custom mode, reset that setting so it will be determined automatically
db_unset(NULL, MODNAME, DB_SETTING_UPDATE_MODE);
@@ -56,14 +56,14 @@ wchar_t* GetDefaultUrl()
wchar_t url[MAX_PATH];
switch (GetUpdateMode()) {
case UPDATE_MODE_STABLE:
- mir_sntprintf(url, DEFAULT_UPDATE_URL, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
- return mir_tstrdup(url);
+ mir_snwprintf(url, DEFAULT_UPDATE_URL, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ return mir_wstrdup(url);
case UPDATE_MODE_TRUNK:
- mir_sntprintf(url, DEFAULT_UPDATE_URL_TRUNK, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
- return mir_tstrdup(url);
+ mir_snwprintf(url, DEFAULT_UPDATE_URL_TRUNK, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ return mir_wstrdup(url);
case UPDATE_MODE_TRUNK_SYMBOLS:
- mir_sntprintf(url, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
- return mir_tstrdup(url);
+ mir_snwprintf(url, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ return mir_wstrdup(url);
default:
return db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL);
}
@@ -121,17 +121,17 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
switch (GetUpdateMode()) {
case UPDATE_MODE_STABLE:
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED);
break;
case UPDATE_MODE_TRUNK:
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_TRUNK, BST_CHECKED);
break;
case UPDATE_MODE_TRUNK_SYMBOLS:
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_TRUNK_SYMBOLS, BST_CHECKED);
break;
@@ -140,7 +140,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
- ptrT url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -181,7 +181,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
case IDC_TRUNK_SYMBOLS:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -189,7 +189,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
case IDC_TRUNK:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -197,7 +197,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
case IDC_STABLE:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -206,7 +206,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
{
- ptrT url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -227,15 +227,15 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
case IDC_CHANGE_PLATFORM:
if (IsDlgButtonChecked(hwndDlg, IDC_STABLE)) {
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK_SYMBOLS)) {
- mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);