summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/customsmiley.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SmileyAdd/src/customsmiley.cpp')
-rw-r--r--plugins/SmileyAdd/src/customsmiley.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp
index 97480911f6..a61a014e9c 100644
--- a/plugins/SmileyAdd/src/customsmiley.cpp
+++ b/plugins/SmileyAdd/src/customsmiley.cpp
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
SmileyPackCListType g_SmileyPackCStore;
-bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR *dir)
+bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, wchar_t *dir)
{
bool res = true;
if (GetSmileyPack(hContact) == NULL) {
@@ -36,7 +36,7 @@ bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR *dir)
return res;
}
-bool SmileyPackCListType::AddSmiley(MCONTACT hContact, TCHAR *path)
+bool SmileyPackCListType::AddSmiley(MCONTACT hContact, wchar_t *path)
{
SmileyPackCType *smpack = GetSmileyPack(hContact);
if (smpack == NULL) {
@@ -59,7 +59,7 @@ SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id)
}
-SmileyCType::SmileyCType(const CMString &fullpath, const TCHAR *filepath)
+SmileyCType::SmileyCType(const CMString &fullpath, const wchar_t *filepath)
{
LoadFromResource(fullpath, 0);
CreateTriggerText(_T2A(filepath));
@@ -78,7 +78,7 @@ bool SmileyCType::CreateTriggerText(char *text)
return false;
char save = res[reslen]; res[reslen] = 0; // safe because of mir_alloc
- TCHAR *txt = mir_utf8decodeT(res);
+ wchar_t *txt = mir_utf8decodeT(res);
res[reslen] = save;
if (txt == NULL)
@@ -93,19 +93,19 @@ bool SmileyCType::CreateTriggerText(char *text)
// SmileyPackCType
//
-bool SmileyPackCType::LoadSmileyDir(TCHAR *dir)
+bool SmileyPackCType::LoadSmileyDir(wchar_t *dir)
{
CMString dirs = dir;
dirs += L"\\*.*";
- _tfinddata_t c_file;
- INT_PTR hFile = _tfindfirst((TCHAR*)dirs.c_str(), &c_file);
+ _wfinddata_t c_file;
+ INT_PTR hFile = _wfindfirst((wchar_t*)dirs.c_str(), &c_file);
if (hFile > -1L) {
do {
if (c_file.name[0] != '.') {
CMString fullpath = dir;
fullpath = fullpath + L"\\" + c_file.name;
- TCHAR *div = _tcsrchr(c_file.name, '.');
+ wchar_t *div = wcsrchr(c_file.name, '.');
if (div) {
*div = 0;
SmileyCType *smlc = new SmileyCType(fullpath, c_file.name);
@@ -115,7 +115,7 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR *dir)
m_SmileyList.insert(smlc);
}
}
- } while (_tfindnext(hFile, &c_file) == 0);
+ } while (_wfindnext(hFile, &c_file) == 0);
_findclose(hFile);
AddTriggersToSmileyLookup();
return true;
@@ -123,7 +123,7 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR *dir)
return false;
}
-bool SmileyPackCType::LoadSmiley(TCHAR *path)
+bool SmileyPackCType::LoadSmiley(wchar_t *path)
{
CMString dirs = path;
int slash = dirs.ReverseFind('\\');
@@ -137,7 +137,7 @@ bool SmileyPackCType::LoadSmiley(TCHAR *path)
return true;
}
- m_SmileyList.insert(new SmileyCType(dirs, (TCHAR*)name.c_str()));
+ m_SmileyList.insert(new SmileyCType(dirs, (wchar_t*)name.c_str()));
CMString empty;
m_SmileyLookup.insert(new SmileyLookup(