summaryrefslogtreecommitdiff
path: root/plugins/PackUpdater/Src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/PackUpdater/Src
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PackUpdater/Src')
-rw-r--r--plugins/PackUpdater/Src/Events.cpp6
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp4
-rw-r--r--plugins/PackUpdater/Src/Options.cpp6
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp4
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp22
5 files changed, 21 insertions, 21 deletions
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp
index bc12d5359b..9a196d721e 100644
--- a/plugins/PackUpdater/Src/Events.cpp
+++ b/plugins/PackUpdater/Src/Events.cpp
@@ -27,10 +27,10 @@ int ModulesLoaded(WPARAM, LPARAM)
Silent = true;
HOTKEYDESC hkd = { 0 };
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "Check for pack updates";
- hkd.ptszDescription = LPGENW("Check for pack updates");
- hkd.ptszSection = LPGENW("Pack Updater");
+ hkd.pwszDescription = LPGENW("Check for pack updates");
+ hkd.pwszSection = LPGENW("Pack Updater");
hkd.pszService = MODNAME"/CheckUpdates";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 9670d9e905..98633872c8 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -311,7 +311,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE);
else
EnableWindow(GetDlgItem(hDlg, IDC_INFO), FALSE);
- SetDlgItemText(hDlg, IDC_MESSAGE, TranslateTS(todo[lvI.iItem].tszMessage));
+ SetDlgItemText(hDlg, IDC_MESSAGE, TranslateW(todo[lvI.iItem].tszMessage));
}
}
break;
@@ -401,7 +401,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
}
mir_wstrncpy(todo[i].tszCurVer, todo[i].tszNewVer, _countof(todo[i].tszCurVer));
mir_snprintf(szKey, "File_%d_CurrentVersion", todo[i].FileNum);
- db_set_ts(NULL, MODNAME, szKey, todo[i].tszCurVer);
+ db_set_ws(NULL, MODNAME, szKey, todo[i].tszCurVer);
arFileType.push_back(todo[i].FileType);
arFilePath.push_back(todo[i].File.tszDiskPath);
arFileName.push_back(tszFileName);
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index ef4e41fd39..2738ae2034 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -196,8 +196,8 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
SetDlgItemInt(hdlg, IDC_TIMEOUT_VALUE, MyOptions.Timeout, TRUE);
//Mouse actions
for (i = 0; i < _countof(PopupActions); i++) {
- SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
- SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
}
SendDlgItemMessage(hdlg, IDC_LC, CB_SETCURSEL, MyOptions.LeftClickAction, 0);
SendDlgItemMessage(hdlg, IDC_RC, CB_SETCURSEL, MyOptions.RightClickAction, 0);
@@ -388,7 +388,7 @@ int OptInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_UPDATENOTIFY);
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = LPGENW("Pack Updater");
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index d4df5c677f..3f8ee10e8d 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -73,7 +73,7 @@ extern "C" __declspec(dllexport) int Load(void)
CMenuItem mi;
SET_UID(mi, 0x326495e8, 0xab0a, 0x47d2, 0xb2, 0x22, 0x2a, 0x8e, 0xa8, 0xae, 0x53, 0x1a);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = IcoLib_GetIcon("check_update");
mi.name.w = LPGENW("Check for pack updates");
mi.pszService = MODNAME"/CheckUpdates";
@@ -83,7 +83,7 @@ extern "C" __declspec(dllexport) int Load(void)
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xc3eea590, 0xaba3, 0x454f, 0x93, 0x93, 0xbc, 0x97, 0x15, 0x2c, 0x3b, 0x3d);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = IcoLib_GetIcon("empty_folder");
mi.name.w = LPGENW("Clear pack updates folder");
mi.pszService = MODNAME"/EmptyFolder";
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index b555e97d37..f041e4d91d 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -50,7 +50,7 @@ BOOL NetlibInit()
{
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
nlu.ptszDescriptiveName = TranslateT("Pack Updater HTTP connection");
nlu.szSettingsModule = MODNAME;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -190,7 +190,7 @@ static void CheckUpdates(void *)
FileCount = db_get_dw(NULL, MODNAME, "FileCount", DEFAULT_FILECOUNT);
// Load files info
- ptrW tszDownloadURL(db_get_tsa(NULL, MODNAME, "File_VersionURL"));
+ ptrW tszDownloadURL(db_get_wsa(NULL, MODNAME, "File_VersionURL"));
if (!tszDownloadURL) { // URL is not set
Title = TranslateT("Pack Updater");
Text = TranslateT("URL for checking updates not found.");
@@ -222,14 +222,14 @@ static void CheckUpdates(void *)
FILEINFO FileInfo = { L"", L"", L"", L"", L"", L"", L"", { L"", L"" } };
mir_snprintf(szKey, "File_%d_CurrentVersion", CurrentFile + 1);
- ptrW tszCurVer(db_get_tsa(NULL, MODNAME, szKey));
+ ptrW tszCurVer(db_get_wsa(NULL, MODNAME, szKey));
if (tszCurVer)
mir_wstrncpy(FileInfo.tszCurVer, tszCurVer, _countof(FileInfo.tszCurVer));
else
mir_wstrncpy(FileInfo.tszCurVer, L"", _countof(FileInfo.tszCurVer));
mir_snprintf(szKey, "File_%d_LastVersion", CurrentFile + 1);
- ptrW tszLastVer(db_get_tsa(NULL, MODNAME, szKey));
+ ptrW tszLastVer(db_get_wsa(NULL, MODNAME, szKey));
if (tszLastVer)
mir_wstrncpy(FileInfo.tszLastVer, tszLastVer, _countof(FileInfo.tszLastVer));
else
@@ -269,14 +269,14 @@ static void CheckUpdates(void *)
else
mir_snwprintf(tszBuff, L"Plugins\\%s\\%s", Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
wchar_t pluginFolderName[MAX_PATH];
- PathToAbsoluteT(tszBuff, pluginFolderName);
+ PathToAbsoluteW(tszBuff, pluginFolderName);
if (!Files[CurrentFile].Force && (IsPluginDisabled(Files[CurrentFile].File.tszDiskPath) || !Exists(pluginFolderName))) //check if plugin disabled or not exists
continue;
}
// Compare versions
if (getVer(Files[CurrentFile].tszCurVer) < getVer(Files[CurrentFile].tszNewVer)) { // Yeah, we've got new version.
- VARST tszSysRoot(L"%SystemRoot%");
- VARST tszProgFiles(L"%ProgramFiles%");
+ VARSW tszSysRoot(L"%SystemRoot%");
+ VARSW tszProgFiles(L"%ProgramFiles%");
if (Files[CurrentFile].FileType != 1 && !IsUserAnAdmin() && (wcsstr(tszRoot, tszSysRoot) || wcsstr(tszRoot, tszProgFiles))) {
MessageBox(NULL, TranslateT("Update is not possible!\nYou have no Administrator's rights.\nPlease run Miranda NG with Administrator's rights."), Title, MB_ICONINFORMATION);
@@ -292,7 +292,7 @@ static void CheckUpdates(void *)
case 1:
break;
case 2: {
- VARST tszUtilRootPlug(L"%miranda_path%\\Plugins");
+ VARSW tszUtilRootPlug(L"%miranda_path%\\Plugins");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath);
else
@@ -300,7 +300,7 @@ static void CheckUpdates(void *)
}
break;
case 3: {
- VARST tszUtilRootIco(L"%miranda_path%\\Icons");
+ VARSW tszUtilRootIco(L"%miranda_path%\\Icons");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRootIco, Files[CurrentFile].File.tszDiskPath);
else
@@ -309,7 +309,7 @@ static void CheckUpdates(void *)
break;
case 4:
case 5: {
- wchar_t *tszUtilRoot = VARST(L"%miranda_path%");
+ wchar_t *tszUtilRoot = VARSW(L"%miranda_path%");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRoot, Files[CurrentFile].File.tszDiskPath);
else
@@ -323,7 +323,7 @@ static void CheckUpdates(void *)
// Save last version
mir_wstrncpy(Files[CurrentFile].tszLastVer, Files[CurrentFile].tszNewVer, _countof(Files[CurrentFile].tszLastVer));
mir_snprintf(szKey, "File_%d_LastVersion", CurrentFile + 1);
- db_set_ts(NULL, MODNAME, szKey, Files[CurrentFile].tszLastVer);
+ db_set_ws(NULL, MODNAME, szKey, Files[CurrentFile].tszLastVer);
} // end compare versions
} //end checking all files in for ()