summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-12 20:55:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-12 20:55:43 +0000
commit29421cf08eb712ed3774fefb47b6d2f7a4fc9296 (patch)
treed883add69bce4be70f0da53421f98bc4885ebe15 /plugins/SeenPlugin/src
parentfb866177c8ce8b2f0bb779fbf42cd988dc7d5e13 (diff)
fix for Unicode
git-svn-id: http://svn.miranda-ng.org/main/trunk@1898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src')
-rw-r--r--plugins/SeenPlugin/src/history.cpp27
-rw-r--r--plugins/SeenPlugin/src/main.cpp3
2 files changed, 13 insertions, 17 deletions
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index aa600dd906..46c8122555 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -162,7 +162,7 @@ void MyResizeGetOffset (HWND hwndDlg, HWND hwndControl, int nWidth, int nHeight,
INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM lparam)
{
HANDLE hContact;
- char sztemp[1024]="";
+ TCHAR sztemp[1024];
static HIMAGELIST hIml=NULL;
switch(Message) {
@@ -170,26 +170,23 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
TranslateDialogDefault(hwndDlg);
hContact = (HANDLE)lparam;
SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lparam);
- strcpy(sztemp,(char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
- strcat(sztemp, ": ");
- strcat(sztemp, Translate("last seen history"));
+ mir_sntprintf(sztemp, SIZEOF(sztemp), _T("%s: %s"),
+ CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR),
+ TranslateT("last seen history"));
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)sztemp);
SendMessage(hwndDlg, WM_SETICON, (WPARAM) ICON_BIG, (LPARAM) LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
SendMessage(hwndDlg, WM_SETICON, (WPARAM) ICON_SMALL, (LPARAM) LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
- // LoadHistoryList(hContact, hwndDlg, IDC_HISTORYLIST);
-
if ( db_get_b(hContact,S_MOD,"OnlineAlert",0))
SendDlgItemMessage(hwndDlg, IDC_STATUSCHANGE, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
- {
- hIml=ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,3,3);
- ImageList_AddIcon(hIml,LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_USERDETAILS)));
- ImageList_AddIcon(hIml,LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DOWNARROW)));
- ImageList_AddIcon(hIml,LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- SendDlgItemMessage(hwndDlg,IDC_DETAILS,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,0,ILD_NORMAL));
- SendDlgItemMessage(hwndDlg,IDC_USERMENU,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,1,ILD_NORMAL));
- SendDlgItemMessage(hwndDlg,IDC_SENDMSG,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,2,ILD_NORMAL));
- }
+
+ hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,3,3);
+ ImageList_AddIcon(hIml,LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_USERDETAILS)));
+ ImageList_AddIcon(hIml,LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DOWNARROW)));
+ ImageList_AddIcon(hIml,LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendDlgItemMessage(hwndDlg,IDC_DETAILS,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,0,ILD_NORMAL));
+ SendDlgItemMessage(hwndDlg,IDC_USERMENU,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,1,ILD_NORMAL));
+ SendDlgItemMessage(hwndDlg,IDC_SENDMSG,BM_SETIMAGE,IMAGE_ICON,(WPARAM)ImageList_GetIcon(hIml,2,ILD_NORMAL));
//set-up tooltips
{
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index 6a7820d203..4b92d2a552 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -62,9 +62,8 @@ int MainInit(WPARAM wparam,LPARAM lparam)
includeIdle = (BOOL )db_get_b(NULL,S_MOD,"IdleSupport",1);
hOptInit = HookEvent(ME_OPT_INITIALISE, OptionsInit);
- if ( db_get_b(NULL,S_MOD,"MenuItem",1)) {
+ if ( db_get_b(NULL,S_MOD,"MenuItem",1))
InitMenuitem();
- }
if ( db_get_b(NULL,S_MOD,"UserinfoTab",1))
ehuserinfo = HookEvent(ME_USERINFO_INITIALISE,UserinfoInit);