From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/AvatarDlg.cpp | 10 +++++----- plugins/AvatarHistory/src/AvatarHistory.cpp | 12 ++++++------ plugins/AvatarHistory/src/options.cpp | 4 ++-- plugins/AvatarHistory/src/utils.cpp | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'plugins/AvatarHistory') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index ebd5c219a7..c645d9f9fc 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -441,7 +441,7 @@ int FillAvatarListFromDB(HWND list, MCONTACT hContact) // Get file in disk wchar_t path[MAX_PATH]; ptrW tszStoredPath(mir_utf8decodeW((char*)dbei.pBlob)); - PathToAbsoluteT(tszStoredPath, path); + PathToAbsoluteW(tszStoredPath, path); // Add to list ListEntry *le = new ListEntry(); @@ -478,7 +478,7 @@ bool UpdateAvatarPic(HWND hwnd) } SetDlgItemText(hwnd,IDC_AVATARPATH,le->filename); - HBITMAP avpic = (HBITMAP) CallService(MS_IMG_LOAD, (WPARAM)le->filename, IMGL_TCHAR); + HBITMAP avpic = (HBITMAP) CallService(MS_IMG_LOAD, (WPARAM)le->filename, IMGL_WCHAR); bool found_image = (avpic != NULL); @@ -515,7 +515,7 @@ void InitMenuItem() CMenuItem mi; SET_UID(mi,0x2fb5c7eb, 0xa606, 0x4145, 0x9e, 0x86, 0x73, 0x88, 0x73, 0x1d, 0xe7, 0x5c); mi.name.w = LPGENW("View Avatar History"); - mi.flags = CMIF_TCHAR; + mi.flags = CMIF_UNICODE; mi.position = 1000090010; mi.hIcolibItem = createDefaultOverlayedIcon(FALSE); mi.pszService = MS_AVATARHISTORY_SHOWDIALOG; @@ -562,7 +562,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact) ofn.lpstrDefExt = wcsrchr(fn, '.')+1; DBVARIANT dbvInitDir = {0}; - if (!db_get_ts(hContact,MODULE_NAME,"SavedAvatarFolder",&dbvInitDir)) + if (!db_get_ws(hContact,MODULE_NAME,"SavedAvatarFolder",&dbvInitDir)) { ofn.lpstrInitialDir = dbvInitDir.ptszVal; db_free(&dbvInitDir); @@ -574,7 +574,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact) if (GetSaveFileName(&ofn)) { CopyFile(fn, file, FALSE); - db_set_ts(hContact,MODULE_NAME,"SavedAvatarFolder",file); + db_set_ws(hContact,MODULE_NAME,"SavedAvatarFolder",file); } return 0; } diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index a678580bcc..d6bb00dc21 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -116,7 +116,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) return 0; DBVARIANT dbvOldHash = {0}; - bool ret = (db_get_ts(hContact,MODULE_NAME,"AvatarHash",&dbvOldHash) == 0); + bool ret = (db_get_ws(hContact,MODULE_NAME,"AvatarHash",&dbvOldHash) == 0); CONTACTAVATARCHANGEDNOTIFICATION* avatar = (CONTACTAVATARCHANGEDNOTIFICATION*)lParam; if (avatar == NULL) { @@ -130,7 +130,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) SkinPlaySound("avatar_removed"); // Is a flash avatar or avs could not load it - db_set_ts(hContact, MODULE_NAME, "AvatarHash", L"-"); + db_set_ws(hContact, MODULE_NAME, "AvatarHash", L"-"); if (ContactEnabled(hContact, "AvatarPopups", AVH_DEF_AVPOPUPS) && opts.popup_show_removed) ShowPopup(hContact, NULL, opts.popup_removed); @@ -143,7 +143,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) return 0; } SkinPlaySound("avatar_changed"); - db_set_ts(hContact, "AvatarHistory", "AvatarHash", avatar->hash); + db_set_ws(hContact, "AvatarHistory", "AvatarHash", avatar->hash); wchar_t history_filename[MAX_PATH] = L""; @@ -343,11 +343,11 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_AVATARHISTORY_ENABLED, IsEnabled); CreateServiceFunction(MS_AVATARHISTORY_GET_CACHED_AVATAR, GetCachedAvatar); - if (CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath) != 0) + if (CallService(MS_DB_GETPROFILEPATHW, MAX_PATH, (LPARAM)profilePath) != 0) mir_wstrcpy(profilePath, L"."); // Failed, use current dir - SkinAddNewSoundExT("avatar_changed",LPGENW("Avatar History"),LPGENW("Contact changed avatar")); - SkinAddNewSoundExT("avatar_removed",LPGENW("Avatar History"),LPGENW("Contact removed avatar")); + SkinAddNewSoundExW("avatar_changed",LPGENW("Avatar History"),LPGENW("Contact changed avatar")); + SkinAddNewSoundExW("avatar_removed",LPGENW("Avatar History"),LPGENW("Contact removed avatar")); hAvatarWindowsList = WindowList_Create(); diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp index 976c9174cd..63e4680071 100644 --- a/plugins/AvatarHistory/src/options.cpp +++ b/plugins/AvatarHistory/src/options.cpp @@ -152,7 +152,7 @@ int OptInit(WPARAM wParam, LPARAM) odp.pwszTitle = LPGENW("Avatar"); // name of the item odp.pfnDlgProc = OptionsDlgProc; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; Options_AddPage(wParam, &odp); if (ServiceExists(MS_POPUP_ADDPOPUPT)) { @@ -160,7 +160,7 @@ int OptInit(WPARAM wParam, LPARAM) odp.pwszTitle = LPGENW("Avatar Change"); odp.pfnDlgProc = PopupsDlgProc; odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPS); - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; Options_AddPage(wParam, &odp); } return 0; diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index e3c7bbe109..2a97cf3d2f 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -93,7 +93,7 @@ wchar_t* GetHistoryFolder(wchar_t *fn) { if (fn == NULL) return NULL; FoldersGetCustomPathT(hFolder, fn, MAX_PATH, basedir); - CreateDirectoryTreeT(fn); + CreateDirectoryTreeW(fn); return fn; } @@ -105,7 +105,7 @@ wchar_t* GetProtocolFolder(wchar_t *fn, char *proto) proto = Translate("Unknown Protocol"); mir_snwprintf(fn, MAX_PATH, L"%s\\%S", fn, proto); - CreateDirectoryTreeT(fn); + CreateDirectoryTreeW(fn); return fn; } @@ -119,7 +119,7 @@ wchar_t* GetContactFolder(wchar_t *fn, MCONTACT hContact) wcsncpy_s(uin, (id == NULL) ? TranslateT("Unknown UIN") : id, _TRUNCATE); ConvertToFilename(uin, MAX_PATH); //added so that weather id's like "yw/CI0000" work mir_snwprintf(fn, MAX_PATH, L"%s\\%s", fn, uin); - CreateDirectoryTreeT(fn); + CreateDirectoryTreeW(fn); #ifdef DBGPOPUPS wchar_t log[1024]; -- cgit v1.2.3