summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Sessions/Src
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions/Src')
-rw-r--r--plugins/Sessions/Src/Main.cpp18
-rw-r--r--plugins/Sessions/Src/Options.cpp4
-rw-r--r--plugins/Sessions/Src/Utils.cpp10
-rw-r--r--plugins/Sessions/Src/Utils.h4
-rw-r--r--plugins/Sessions/Src/stdafx.h2
5 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 91e1ac7203..7a88a5816f 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -161,7 +161,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
dy = 20;
dx = 150;
dd = 5;
- hClistControl = CreateWindowEx(WS_EX_CLIENTEDGE, _T(CLISTCONTROL_CLASS), L"",
+ hClistControl = CreateWindowEx(WS_EX_CLIENTEDGE, CLISTCONTROL_CLASSW, L"",
WS_TABSTOP | WS_VISIBLE | WS_CHILD,
x, y, dx, dy, hdlg, (HMENU)IDC_CLIST, g_hInst, 0);
@@ -196,7 +196,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
break;
case IDOK:
- TCHAR szUserSessionName[MAX_PATH];
+ wchar_t szUserSessionName[MAX_PATH];
{
DWORD session_list_temp[255] = { 0 };
int i = 0, length = GetWindowTextLength(GetDlgItem(hdlg, IDC_LIST));
@@ -475,21 +475,21 @@ int SaveSessionDate()
{
if (session_list[0] != 0) {
int TimeSize = GetTimeFormat(LOCALE_USER_DEFAULT, 0/*TIME_NOSECONDS*/, NULL, NULL, NULL, 0);
- TCHAR *szTimeBuf = (TCHAR*)mir_alloc((TimeSize + 1)*sizeof(TCHAR));
+ wchar_t *szTimeBuf = (wchar_t*)mir_alloc((TimeSize + 1)*sizeof(wchar_t));
GetTimeFormat(LOCALE_USER_DEFAULT, 0/*TIME_NOSECONDS*/, NULL, NULL, szTimeBuf, TimeSize);
int DateSize = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, NULL, 0);
- TCHAR *szDateBuf = (TCHAR*)mir_alloc((DateSize + 1)*sizeof(TCHAR));
+ wchar_t *szDateBuf = (wchar_t*)mir_alloc((DateSize + 1)*sizeof(wchar_t));
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szDateBuf, DateSize);
int lenn = (DateSize + TimeSize + 5);
- TCHAR *szSessionTime = (TCHAR*)mir_alloc(lenn*sizeof(TCHAR));
+ wchar_t *szSessionTime = (wchar_t*)mir_alloc(lenn*sizeof(wchar_t));
mir_sntprintf(szSessionTime, lenn, L"%s - %s", szTimeBuf, szDateBuf);
char szSetting[256];
mir_snprintf(szSetting, "%s_%d", "SessionDate", 0);
- TCHAR *ptszSaveSessionDate = db_get_tsa(NULL, MODNAME, szSetting);
+ wchar_t *ptszSaveSessionDate = db_get_tsa(NULL, MODNAME, szSetting);
db_set_ts(NULL, MODNAME, szSetting, szSessionTime);
mir_free(szSessionTime);
@@ -507,14 +507,14 @@ int SaveSessionDate()
return 0;
}
-int SaveUserSessionName(TCHAR *szUSessionName)
+int SaveUserSessionName(wchar_t *szUSessionName)
{
if (session_list[0] == 0)
return 1;
char szSetting[256];
mir_snprintf(szSetting, "%s_%u", "UserSessionDsc", 0);
- TCHAR *ptszUserSessionName = db_get_tsa(NULL, MODNAME, szSetting);
+ wchar_t *ptszUserSessionName = db_get_tsa(NULL, MODNAME, szSetting);
if (ptszUserSessionName)
ResaveSettings("UserSessionDsc", 1, 255, ptszUserSessionName);
@@ -789,7 +789,7 @@ static int PluginInit(WPARAM, LPARAM)
// Main menu
CMenuItem mi;
mi.position = 1000000000;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Sessions Manager"), 1000000000);
+ mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Sessions Manager"), 1000000000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D77B9AB4-AF7E-43DB-A487-BD581704D635");
SET_UID(mi, 0xd35302fa, 0x8326, 0x4323, 0xa3, 0xe5, 0xb4, 0x41, 0xff, 0xfb, 0xaa, 0x2d);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index 7df7a2b1f9..6f98c5a005 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -334,7 +334,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
EnableWindow(GetDlgItem(hdlg, IDC_DEL), FALSE);
//EnableWindow(GetDlgItem(hdlg,IDC_SAVE),TRUE);
SetDlgItemText(hdlg, IDC_EDIT, TranslateT("View"));
- hOpClistControl = CreateWindowEx(WS_EX_STATICEDGE, _T(CLISTCONTROL_CLASS), L"",
+ hOpClistControl = CreateWindowEx(WS_EX_STATICEDGE, CLISTCONTROL_CLASSW, L"",
WS_TABSTOP | WS_VISIBLE | WS_CHILD,
14, 198, 161, 163, hdlg, (HMENU)IDC_EMCLIST, g_hInst, 0);
@@ -376,7 +376,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
}
if (bSesssionNameChanged) {
if (GetWindowTextLength(hComboBoxEdit)) {
- TCHAR szUserSessionName[MAX_PATH] = { '\0' };
+ wchar_t szUserSessionName[MAX_PATH] = { '\0' };
GetWindowText(hComboBoxEdit, szUserSessionName, _countof(szUserSessionName));
RenameUserDefSession(opses_count, szUserSessionName);
SendDlgItemMessage(hdlg, IDC_LIST, CB_RESETCONTENT, 0, 0);
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index 1672a81dda..5b0fe2e88a 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -222,7 +222,7 @@ void SetInSessionOrder(MCONTACT hContact, int mode, int count, unsigned int orde
}
}
-BOOL ResaveSettings(char *szName, int iFirst, int iLimit, TCHAR *szBuffer)
+BOOL ResaveSettings(char *szName, int iFirst, int iLimit, wchar_t *szBuffer)
{
for (int i = iFirst; i < iLimit; i++) {
if (szBuffer == NULL)
@@ -231,7 +231,7 @@ BOOL ResaveSettings(char *szName, int iFirst, int iLimit, TCHAR *szBuffer)
char szNameBuf[256];
mir_snprintf(szNameBuf, "%s_%u", szName, i);
- TCHAR *ptszTemp = db_get_tsa(NULL, MODNAME, szNameBuf);
+ wchar_t *ptszTemp = db_get_tsa(NULL, MODNAME, szNameBuf);
db_set_ts(NULL, MODNAME, szNameBuf, szBuffer);
mir_free(szBuffer);
@@ -298,7 +298,7 @@ int LoadSessionToCombobox(HWND hdlg, BOOL mode, int iLimit, char* pszSetting, in
for (int i = 0; i < iLimit; i++) {
mir_snprintf(szBuffer, "%s_%u", pszSetting, i);
- TCHAR *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
+ wchar_t *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
if (!IsMarkedUserDefSession(i + iFirstNum) || mode == 1) {
index = SendDlgItemMessage(hdlg, IDC_LIST, CB_ADDSTRING, 0, (LPARAM)pszBuffer);
@@ -327,7 +327,7 @@ int FillFavoritesMenu(HMENU hMenu, int iLimit)
if (IsMarkedUserDefSession(i)) {
char szBuffer[256];
mir_snprintf(szBuffer, "%s_%u", "UserSessionDsc", i);
- TCHAR *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
+ wchar_t *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
AppendMenu(hMenu, MF_STRING, i + 1, pszBuffer);
iItems++;
@@ -358,7 +358,7 @@ int CheckContactVisibility(MCONTACT hContact)
return !db_get_b(hContact, "CList", "Hidden", 0);
}
-void RenameUserDefSession(int ses_count, TCHAR* ptszNewName)
+void RenameUserDefSession(int ses_count, wchar_t* ptszNewName)
{
char szSession[256];
mir_snprintf(szSession, "%s_%u", "UserSessionDsc", ses_count);
diff --git a/plugins/Sessions/Src/Utils.h b/plugins/Sessions/Src/Utils.h
index ed1a8fd000..c474393433 100644
--- a/plugins/Sessions/Src/Utils.h
+++ b/plugins/Sessions/Src/Utils.h
@@ -30,7 +30,7 @@ bool LoadContactsFromMask(MCONTACT hContact, int mode, int count);
int AddToCurSession(MCONTACT hContact, LPARAM lparam);
int DelFromCurSession(MCONTACT hContact,LPARAM lparam);
int CheckForDuplicate(MCONTACT contact_list[], MCONTACT lparam);
-BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* pszPrevSetting);
+BOOL ResaveSettings(char* szName,int iFirst,int iLimit,wchar_t* pszPrevSetting);
void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy);
int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int iFirstNum);
int MarkUserDefSession(int ses_count,BYTE bCheck);
@@ -38,7 +38,7 @@ BYTE IsMarkedUserDefSession(int ses_count);
void SavePosition(HWND hWnd, char *wndName);
void LoadPosition(HWND hWnd, char *wndName);
int CheckContactVisibility(MCONTACT hContact);
-void RenameUserDefSession(int ses_count,TCHAR* ptszNewName);
+void RenameUserDefSession(int ses_count,wchar_t* ptszNewName);
int FillFavoritesMenu (HMENU hMenu,int iLimit);
#endif // __UTILS_H__ \ No newline at end of file
diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h
index b193b5c79e..d6cad97c92 100644
--- a/plugins/Sessions/Src/stdafx.h
+++ b/plugins/Sessions/Src/stdafx.h
@@ -55,7 +55,7 @@ int DeleteAutoSession(int ses_count);
int LoadSession(WPARAM, LPARAM);
int SaveSessionHandles(WPARAM, LPARAM);
INT_PTR SaveUserSessionHandles(WPARAM, LPARAM);
-int SaveUserSessionName(TCHAR*);
+int SaveUserSessionName(wchar_t*);
INT_PTR CloseCurrentSession(WPARAM, LPARAM);
int SaveSessionDate();