summaryrefslogtreecommitdiff
path: root/plugins/Folders
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Folders')
-rw-r--r--plugins/Folders/src/dlg_handlers.cpp6
-rw-r--r--plugins/Folders/src/folderItem.cpp14
-rw-r--r--plugins/Folders/src/folderItem.h2
-rw-r--r--plugins/Folders/src/services.cpp6
-rw-r--r--plugins/Folders/src/utils.cpp8
-rw-r--r--plugins/Folders/src/utils.h2
6 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp
index cc22e06423..ec64c90581 100644
--- a/plugins/Folders/src/dlg_handlers.cpp
+++ b/plugins/Folders/src/dlg_handlers.cpp
@@ -38,8 +38,8 @@ static void LoadRegisteredFolderSections(HWND hWnd)
for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &tmp = lstRegisteredFolders[i];
wchar_t *translated = mir_a2u(tmp.GetSection());
- if (!ContainsSection(hWnd, TranslateTS(translated))) {
- int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateTS(translated));
+ if (!ContainsSection(hWnd, TranslateW(translated))) {
+ int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateW(translated));
SendMessage(hwndList, LB_SETITEMDATA, idx, (LPARAM)tmp.GetSection());
}
@@ -61,7 +61,7 @@ static void LoadRegisteredFolderItems(HWND hWnd)
for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &item = lstRegisteredFolders[i];
if (!mir_strcmp(szSection, item.GetSection())) {
- idx = SendMessage(hwndItems, LB_ADDSTRING, 0, (LPARAM)TranslateTS(item.GetUserName()));
+ idx = SendMessage(hwndItems, LB_ADDSTRING, 0, (LPARAM)TranslateW(item.GetUserName()));
SendMessage(hwndItems, LB_SETITEMDATA, idx, (LPARAM)&item);
}
}
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp
index 4a47eb5c7d..f277a27ec3 100644
--- a/plugins/Folders/src/folderItem.cpp
+++ b/plugins/Folders/src/folderItem.cpp
@@ -62,7 +62,7 @@ int CFolderItem::IsEqual(const char *section, const wchar_t *name)
int CFolderItem::IsEqualTranslated(const char *trSection, const wchar_t *trName)
{
- return !mir_wstrcmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
+ return !mir_wstrcmp(TranslateW(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)
@@ -70,7 +70,7 @@ int CFolderItem::operator ==(const CFolderItem *other)
return IsEqual(other);
}
-CMString CFolderItem::Expand()
+CMStringW CFolderItem::Expand()
{
return ExpandPath(m_tszFormat);
}
@@ -87,8 +87,8 @@ int CFolderItem::FolderCreateDirectory(int showFolder)
if (m_tszFormat == NULL)
return FOLDER_SUCCESS;
- CMString buffer(ExpandPath(m_tszFormat));
- CreateDirectoryTreeT(buffer);
+ CMStringW buffer(ExpandPath(m_tszFormat));
+ CreateDirectoryTreeW(buffer);
if (showFolder)
ShellExecute(NULL, L"explore", buffer, NULL, NULL, SW_SHOW);
@@ -103,7 +103,7 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder)
if (!mir_wstrcmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
return FOLDER_SUCCESS;
- CMString buffer(ExpandPath(m_tszOldFormat));
+ CMStringW buffer(ExpandPath(m_tszOldFormat));
RemoveDirectories(buffer);
int res = (DirectoryExists(buffer)) ? FOLDER_FAILURE : FOLDER_SUCCESS;
if ((res == FOLDER_FAILURE) && (showFolder))
@@ -117,7 +117,7 @@ void CFolderItem::GetDataFromDatabase(const wchar_t *szNotFound)
strcpy_s(szSettingName, _countof(szSettingName), m_szSection);
strcat_s(szSettingName, _countof(szSettingName), m_szName);
- ptrW tszValue(db_get_tsa(NULL, ModuleName, szSettingName));
+ ptrW tszValue(db_get_wsa(NULL, ModuleName, szSettingName));
SetFormat(tszValue != NULL ? tszValue : szNotFound);
}
@@ -128,5 +128,5 @@ void CFolderItem::WriteDataToDatabase()
strcat_s(szSettingName, sizeof(szSettingName), m_szName);
if (m_tszFormat)
- db_set_ts(NULL, ModuleName, szSettingName, m_tszFormat);
+ db_set_ws(NULL, ModuleName, szSettingName, m_tszFormat);
}
diff --git a/plugins/Folders/src/folderItem.h b/plugins/Folders/src/folderItem.h
index ad02db6d12..385037b0d2 100644
--- a/plugins/Folders/src/folderItem.h
+++ b/plugins/Folders/src/folderItem.h
@@ -43,7 +43,7 @@ public:
CFolderItem(const char *sectionName, const char *name, const wchar_t *format, const wchar_t *userName);
virtual ~CFolderItem();
- CMString Expand();
+ CMStringW Expand();
void Save();
int IsEqual(const CFolderItem *other);
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp
index c05f4ee007..619723ec1b 100644
--- a/plugins/Folders/src/services.cpp
+++ b/plugins/Folders/src/services.cpp
@@ -67,7 +67,7 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
if (data->cbSize != sizeof(FOLDERSGETDATA))
return 1;
- CMString buf(p->Expand());
+ CMStringW buf(p->Expand());
if (data->flags & FF_UNICODE)
wcsncpy_s(data->szPathT, data->nMaxPathSize, buf, _TRUNCATE);
else
@@ -79,8 +79,8 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
int InitServices()
{
- CallService(MS_DB_GETPROFILEPATHT, _countof(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
- CallService(MS_DB_GETPROFILENAMET, _countof(szCurrentProfile), (LPARAM)szCurrentProfile);
+ CallService(MS_DB_GETPROFILEPATHW, _countof(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
+ CallService(MS_DB_GETPROFILENAMEW, _countof(szCurrentProfile), (LPARAM)szCurrentProfile);
wchar_t *pos = wcsrchr(szCurrentProfile, '.'); if (pos) *pos = 0;
GetModuleFileName(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
diff --git a/plugins/Folders/src/utils.cpp b/plugins/Folders/src/utils.cpp
index f2fb0087af..61b445b5c6 100644
--- a/plugins/Folders/src/utils.cpp
+++ b/plugins/Folders/src/utils.cpp
@@ -20,14 +20,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CMString ExpandPath(const wchar_t *format)
+CMStringW ExpandPath(const wchar_t *format)
{
- CMString res;
+ CMStringW res;
if (ServiceExists(MS_VARS_FORMATSTRING))
- res = VARST(ptrW(variables_parse((wchar_t*)format, NULL, NULL)));
+ res = VARSW(ptrW(variables_parse((wchar_t*)format, NULL, NULL)));
else
- res = VARST(format);
+ res = VARSW(format);
res.Replace(PROFILE_PATHT, szCurrentProfilePath);
res.Replace(CURRENT_PROFILET, szCurrentProfile);
diff --git a/plugins/Folders/src/utils.h b/plugins/Folders/src/utils.h
index 4724635ce0..509546dcd6 100644
--- a/plugins/Folders/src/utils.h
+++ b/plugins/Folders/src/utils.h
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_FOLDERS_UTILS_H
#define M_FOLDERS_UTILS_H
-CMString ExpandPath(const wchar_t *format);
+CMStringW ExpandPath(const wchar_t *format);
void RemoveDirectories(const wchar_t *szPath);
bool DirectoryExists(const wchar_t *szPath);