diff options
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r-- | plugins/PluginUpdater/src/DlgListNew.cpp | 6 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 18 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Events.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Options.cpp | 16 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 6 |
6 files changed, 25 insertions, 25 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index 7f28faab29..5d30a3a4b3 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -61,7 +61,7 @@ static void ApplyDownloads(void *param) mir_snwprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); ++i) {
@@ -393,7 +393,7 @@ static void GetList(void *) }
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(L"%miranda_path%");
+ VARSW dirname(L"%miranda_path%");
for (int i=0; i < hashes.getCount(); i++) {
ServListEntry &hash = hashes[i];
@@ -480,7 +480,7 @@ static INT_PTR ParseUriService(WPARAM, LPARAM lParam) if (hash == NULL)
return 0;
- VARST dirName(L"%miranda_path%");
+ VARSW dirName(L"%miranda_path%");
wchar_t tszPath[MAX_PATH];
mir_snwprintf(tszPath, L"%s\\%s", dirName, hash->m_name);
FILEINFO *fileInfo = ServerEntryToFileInfo(*hash, baseUrl, tszPath);
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 9f02de304d..06a9badcf1 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -96,7 +96,7 @@ static void ApplyUpdates(void *param) Netlib_CloseHandle(nlc);
// 3) Unpack all zips
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < todo.getCount(); i++) {
FILEINFO& p = todo[i];
if (p.bEnabled) {
@@ -125,9 +125,9 @@ static void ApplyUpdates(void *param) #if MIRANDA_VER < 0x0A00
// 4) Change title of clist
- ptrW title(db_get_tsa(NULL, "CList", "TitleText"));
+ ptrW title(db_get_wsa(NULL, "CList", "TitleText"));
if (!lstrcmpi(title, L"Miranda IM"))
- db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
+ db_set_ws(NULL, "CList", "TitleText", L"Miranda NG");
#endif
db_set_b(NULL, MODNAME, DB_SETTING_RESTART_COUNT, 5);
@@ -138,12 +138,12 @@ static void ApplyUpdates(void *param) if (opts.bChangePlatform) {
wchar_t mirandaPath[MAX_PATH];
GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
- db_set_ts(NULL, MODNAME, "OldBin2", mirandaPath);
+ db_set_ws(NULL, MODNAME, "OldBin2", mirandaPath);
db_unset(NULL, MODNAME, DB_SETTING_CHANGEPLATFORM);
}
else {
- ptrW oldbin(db_get_tsa(NULL, MODNAME, "OldBin2"));
+ ptrW oldbin(db_get_wsa(NULL, MODNAME, "OldBin2"));
if (oldbin) {
SafeDeleteFile(oldbin);
db_unset(NULL, MODNAME, "OldBin2");
@@ -446,7 +446,7 @@ static void DlgUpdateSilent(void *param) }
// 3) Unpack all zips
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < UpdateFiles.getCount(); i++) {
FILEINFO& p = UpdateFiles[i];
if (p.bEnabled) {
@@ -477,9 +477,9 @@ static void DlgUpdateSilent(void *param) #if MIRANDA_VER < 0x0A00
// 4) Change title of clist
- ptrW title = db_get_tsa(NULL, "CList", "TitleText");
+ ptrW title = db_get_wsa(NULL, "CList", "TitleText");
if (!wcsicmp(title, L"Miranda IM"))
- db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
+ db_set_ws(NULL, "CList", "TitleText", L"Miranda NG");
#endif
opts.bForceRedownload = false;
@@ -802,7 +802,7 @@ static void CheckUpdates(void *) bool success = ParseHashes(updateUrl, baseUrl, hashes);
if (success) {
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(L"%miranda_path%");
+ VARSW dirname(L"%miranda_path%");
int count = ScanFolder(dirname, lstrlen(dirname) + 1, baseUrl, hashes, UpdateFiles);
// Show dialog
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp index ea4c6e8ddf..f048d10a5a 100644 --- a/plugins/PluginUpdater/src/Events.cpp +++ b/plugins/PluginUpdater/src/Events.cpp @@ -50,7 +50,7 @@ int ModulesLoaded(WPARAM, LPARAM) HookEvent(ME_FOLDERS_PATH_CHANGED, OnFoldersChanged);
OnFoldersChanged(0, 0);
}
- else lstrcpyn(g_tszRoot, VARST(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
+ else lstrcpyn(g_tszRoot, VARSW(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
#if MIRANDA_VER >= 0x0A00
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 38dd4d5802..9a01d64af8 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) {
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(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);
@@ -65,7 +65,7 @@ wchar_t* GetDefaultUrl() 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);
+ return db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL);
}
}
@@ -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);
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -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);
{
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -295,7 +295,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar else {
wchar_t tszUrl[100];
GetDlgItemText(hwndDlg, IDC_CUSTOMURL, tszUrl, _countof(tszUrl));
- db_set_ts(NULL, MODNAME, DB_SETTING_UPDATE_URL, tszUrl);
+ db_set_ws(NULL, MODNAME, DB_SETTING_UPDATE_URL, tszUrl);
db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_CUSTOM);
opts.bForceRedownload = 0;
db_unset(NULL, MODNAME, DB_SETTING_REDOWNLOAD);
@@ -340,8 +340,8 @@ static INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemInt(hdlg, IDC_TIMEOUT_VALUE, PopupOptions.Timeout, TRUE);
//Mouse actions
for (int 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, PopupOptions.LeftClickAction, 0);
SendDlgItemMessage(hdlg, IDC_RC, CB_SETCURSEL, PopupOptions.RightClickAction, 0);
@@ -510,7 +510,7 @@ static 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("Plugin Updater");
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 3a2a2fdb1d..204f167cbf 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -132,7 +132,7 @@ extern "C" __declspec(dllexport) int Load(void) #if MIRANDA_VER >= 0x0A00
// Upgrade old settings
if (-1 == db_get_b(0, MODNAME, DB_SETTING_UPDATE_MODE, -1)) {
- ptrW dbvUpdateURL(db_get_tsa(0, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW dbvUpdateURL(db_get_wsa(0, MODNAME, DB_SETTING_UPDATE_URL));
if (dbvUpdateURL) {
if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_OLD))) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 26b395a1c4..6e88d85783 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -58,7 +58,7 @@ void InitNetlib() {
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("Plugin Updater HTTP connections");
nlu.szSettingsModule = MODNAME;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -599,7 +599,7 @@ int SafeDeleteFile(const wchar_t *pFile) int SafeCreateDirectory(const wchar_t *pFolder)
{
if (hPipe == NULL)
- return CreateDirectoryTreeT(pFolder);
+ return CreateDirectoryTreeW(pFolder);
return TransactPipe(4, pFolder, NULL);
}
@@ -607,7 +607,7 @@ int SafeCreateDirectory(const wchar_t *pFolder) int SafeCreateFilePath(wchar_t *pFolder)
{
if (hPipe == NULL) {
- CreatePathToFileT(pFolder);
+ CreatePathToFileW(pFolder);
return 0;
}
|