diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Folders | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Folders')
-rw-r--r-- | plugins/Folders/src/dlg_handlers.cpp | 6 | ||||
-rw-r--r-- | plugins/Folders/src/folderItem.cpp | 14 | ||||
-rw-r--r-- | plugins/Folders/src/services.cpp | 2 | ||||
-rw-r--r-- | plugins/Folders/src/utils.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp index 82a1b38d04..cc22e06423 100644 --- a/plugins/Folders/src/dlg_handlers.cpp +++ b/plugins/Folders/src/dlg_handlers.cpp @@ -37,7 +37,7 @@ static void LoadRegisteredFolderSections(HWND hWnd) for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &tmp = lstRegisteredFolders[i];
- wchar_t *translated = mir_a2t(tmp.GetSection());
+ wchar_t *translated = mir_a2u(tmp.GetSection());
if (!ContainsSection(hWnd, TranslateTS(translated))) {
int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateTS(translated));
SendMessage(hwndList, LB_SETITEMDATA, idx, (LPARAM)tmp.GetSection());
@@ -105,7 +105,7 @@ static int ChangesNotSaved(HWND hWnd, PFolderItem item) wchar_t buffer[MAX_FOLDER_SIZE];
GetEditText(hWnd, buffer, MAX_FOLDER_SIZE);
- return mir_tstrcmp(item->GetFormat(), buffer) != 0;
+ return mir_wstrcmp(item->GetFormat(), buffer) != 0;
}
static void CheckForChanges(HWND hWnd, int bNeedConfirmation = 1)
@@ -123,7 +123,7 @@ static INT_PTR CALLBACK DlgProcVariables(HWND hWnd, UINT msg, WPARAM wParam, LPA switch (msg) {
case WM_INITDIALOG:
- mir_sntprintf(tszMessage, L"%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s",
+ mir_snwprintf(tszMessage, L"%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s",
TranslateT("Don't forget to click on Apply to save the changes. If you don't then the changes won't"),
TranslateT("be saved to the database, they will only be valid for this session."),
TranslateT("Variable string"),
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp index 9cc475593e..4a47eb5c7d 100644 --- a/plugins/Folders/src/folderItem.cpp +++ b/plugins/Folders/src/folderItem.cpp @@ -25,9 +25,9 @@ CFolderItem::CFolderItem(const char *sectionName, const char *name, const wchar_ m_szSection = mir_strdup(sectionName);
m_szName = mir_strdup(name);
if (userName)
- m_tszUserName = mir_tstrdup(userName);
+ m_tszUserName = mir_wstrdup(userName);
else
- m_tszUserName = mir_a2t(name);
+ m_tszUserName = mir_a2u(name);
m_tszFormat = NULL;
m_tszOldFormat = NULL;
GetDataFromDatabase(format);
@@ -47,7 +47,7 @@ void CFolderItem::SetFormat(const wchar_t *newFormat) {
mir_free(m_tszOldFormat);
m_tszOldFormat = m_tszFormat;
- m_tszFormat = mir_tstrdup(*newFormat ? newFormat : MIRANDA_PATHT);
+ m_tszFormat = mir_wstrdup(*newFormat ? newFormat : MIRANDA_PATHT);
}
int CFolderItem::IsEqual(const CFolderItem *other)
@@ -57,12 +57,12 @@ int CFolderItem::IsEqual(const CFolderItem *other) int CFolderItem::IsEqual(const char *section, const wchar_t *name)
{
- return !mir_tstrcmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
+ return !mir_wstrcmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
}
int CFolderItem::IsEqualTranslated(const char *trSection, const wchar_t *trName)
{
- return !mir_tstrcmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
+ return !mir_wstrcmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)
@@ -100,7 +100,7 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder) if (!m_tszOldFormat)
return FOLDER_SUCCESS;
- if (!mir_tstrcmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
+ if (!mir_wstrcmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
return FOLDER_SUCCESS;
CMString buffer(ExpandPath(m_tszOldFormat));
@@ -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);
- ptrT tszValue(db_get_tsa(NULL, ModuleName, szSettingName));
+ ptrW tszValue(db_get_tsa(NULL, ModuleName, szSettingName));
SetFormat(tszValue != NULL ? tszValue : szNotFound);
}
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp index de7669c4e9..c05f4ee007 100644 --- a/plugins/Folders/src/services.cpp +++ b/plugins/Folders/src/services.cpp @@ -87,7 +87,7 @@ int InitServices() pos = wcsrchr(szMirandaPath, '\\'); if (pos) *pos = 0;
wchar_t *szTemp = Utils_ReplaceVarsT(L"%miranda_userdata%");
- mir_sntprintf(szUserDataPath, szTemp);
+ mir_snwprintf(szUserDataPath, szTemp);
mir_free(szTemp);
CreateServiceFunction(MS_FOLDERS_GET_PATH, GetPathService);
diff --git a/plugins/Folders/src/utils.cpp b/plugins/Folders/src/utils.cpp index 2adc3b7035..f2fb0087af 100644 --- a/plugins/Folders/src/utils.cpp +++ b/plugins/Folders/src/utils.cpp @@ -25,7 +25,7 @@ CMString ExpandPath(const wchar_t *format) CMString res;
if (ServiceExists(MS_VARS_FORMATSTRING))
- res = VARST(ptrT(variables_parse((wchar_t*)format, NULL, NULL)));
+ res = VARST(ptrW(variables_parse((wchar_t*)format, NULL, NULL)));
else
res = VARST(format);
|