summaryrefslogtreecommitdiff
path: root/plugins/wbOSD
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/wbOSD
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/wbOSD')
-rw-r--r--plugins/wbOSD/src/events.cpp16
-rw-r--r--plugins/wbOSD/src/options.cpp8
-rw-r--r--plugins/wbOSD/src/stdafx.h4
-rw-r--r--plugins/wbOSD/src/wbOSD.cpp6
4 files changed, 17 insertions, 17 deletions
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index 58f4d4153e..015e240ff4 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -23,7 +23,7 @@ void showmsgwnd(unsigned int param)
CallService(MS_MSG_SENDMESSAGET, (WPARAM)param, 0);
}
-LRESULT ShowOSD(TCHAR *str, int timeout, COLORREF color, MCONTACT user)
+LRESULT ShowOSD(wchar_t *str, int timeout, COLORREF color, MCONTACT user)
{
logmsg("ShowOSD");
@@ -62,7 +62,7 @@ int ProtoAck(WPARAM,LPARAM lparam)
if ( ack->result == ACKRESULT_SUCCESS && (LPARAM)ack->hProcess != ack->lParam ) {
DWORD ann = db_get_dw( NULL, THIS_MODULE, "announce", DEFAULT_ANNOUNCE );
if ( ann & ( 1 << ( ack->lParam - ID_STATUS_OFFLINE ))) {
- TCHAR buffer[512];
+ wchar_t buffer[512];
mir_sntprintf(buffer, TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(ack->hContact, 0), pcli->pfnGetStatusModeDescription(ack->lParam, 0));
ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), ack->hContact);
} } }
@@ -120,7 +120,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
)
return 0;
- TCHAR bufferW[512];
+ wchar_t bufferW[512];
mir_sntprintf(bufferW, TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(wParam, 0), pcli->pfnGetStatusModeDescription(newStatus, 0));
ShowOSD(bufferW, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), hContact);
return 0;
@@ -150,8 +150,8 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
logmsg("HookedNewEvent2");
- TCHAR buf[512];
- _tcsncpy(buf, DEFAULT_MESSAGEFORMAT,_countof(buf));
+ wchar_t buf[512];
+ wcsncpy(buf, DEFAULT_MESSAGEFORMAT,_countof(buf));
DBVARIANT dbv;
if(!db_get_ts(NULL,THIS_MODULE,"message_format",&dbv)) {
@@ -160,7 +160,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
}
int i1=-1, i2=-1;
- TCHAR* pbuf = buf;
+ wchar_t* pbuf = buf;
while (*pbuf) {
if (*pbuf=='%') {
if (*(pbuf+1)=='n') {
@@ -181,7 +181,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
pbuf++;
}
- TCHAR *c1 = 0, *c2 = 0;
+ wchar_t *c1 = 0, *c2 = 0;
if ( i1 == 1 )
c1 = mir_tstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i1 == 2 )
@@ -192,7 +192,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
else if ( i2 == 2 )
c2 = DbGetEventTextT( &dbe, 0 );
- TCHAR buffer[512];
+ wchar_t buffer[512];
mir_sntprintf(buffer, buf, c1, c2);
ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), wParam);
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp
index de0c49a6cc..76af0a3bb1 100644
--- a/plugins/wbOSD/src/options.cpp
+++ b/plugins/wbOSD/src/options.cpp
@@ -249,7 +249,7 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam)
SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_SETPOS, TRUE, (LPARAM)ps->alpha);
{
- TCHAR buf[20];
+ wchar_t buf[20];
mir_sntprintf(buf, L"%d %%", ps->alpha * 100 / 255);
SetDlgItemText(hDlg, IDC_ALPHATXT, buf);
}
@@ -265,7 +265,7 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam)
ps = (plgsettings*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
ps->alpha = SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_GETPOS, 0, 0);
{
- TCHAR buf[20];
+ wchar_t buf[20];
mir_sntprintf(buf, L"%d %%", ps->alpha * 100 / 255);
SetDlgItemText(hDlg, IDC_ALPHATXT, buf);
}
@@ -414,8 +414,8 @@ int OptionsInit(WPARAM wparam, LPARAM)
odp.groupPosition = 950000000;
odp.hInstance = hI;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG1);
- odp.ptszGroup = LPGENT("Plugins");
- odp.ptszTitle = LPGENT("OSD");
+ odp.pwszGroup = LPGENW("Plugins");
+ odp.pwszTitle = LPGENW("OSD");
odp.pfnDlgProc = OptDlgProc;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
Options_AddPage(wparam, &odp);
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h
index 8e0d3f2248..3c301b30a1 100644
--- a/plugins/wbOSD/src/stdafx.h
+++ b/plugins/wbOSD/src/stdafx.h
@@ -86,7 +86,7 @@ typedef struct _plgsettings {
int align, salign, altShadow, showShadow, a_user, distance, onlyfromlist, showmystatus;
int showMsgWindow;
int messages; //also other events...
- TCHAR msgformat[256];
+ wchar_t msgformat[256];
int winx, winy, winxpos, winypos, alpha, transparent, timeout;
COLORREF clr_msg, clr_status, clr_shadow, bkclr;
DWORD announce, showWhen;
@@ -94,7 +94,7 @@ typedef struct _plgsettings {
} plgsettings;
typedef struct _osdmsg {
- TCHAR *text;
+ wchar_t *text;
int timeout; //ms
COLORREF color;
void (*callback)(unsigned int param);
diff --git a/plugins/wbOSD/src/wbOSD.cpp b/plugins/wbOSD/src/wbOSD.cpp
index 5159a3b437..bc602ec52c 100644
--- a/plugins/wbOSD/src/wbOSD.cpp
+++ b/plugins/wbOSD/src/wbOSD.cpp
@@ -9,10 +9,10 @@ Distributed under GNU's GPL 2 or later
#include "stdafx.h"
-TCHAR szClassName[] = L"wbOSD";
+wchar_t szClassName[] = L"wbOSD";
const static osdmsg defstr = { L"", 0, RGB(0, 0, 0), 0, 0 };
-int DrawMe(HWND hwnd, TCHAR *string, COLORREF color)
+int DrawMe(HWND hwnd, wchar_t *string, COLORREF color)
{
logmsg("DrawMe");
if (!string) string = L"bullshit";
@@ -161,7 +161,7 @@ LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM
logmsg("WindowProcedure::USER+1");
ms = (osdmsg*)mir_alloc(sizeof(osdmsg));
- ms->text = mir_tstrdup((TCHAR *)wParam);
+ ms->text = mir_tstrdup((wchar_t *)wParam);
if (lParam == 0)
lParam = db_get_dw(NULL, THIS_MODULE, "timeout", DEFAULT_TIMEOUT);
ms->timeout = lParam;