summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin
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
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')
-rw-r--r--plugins/SeenPlugin/res/resource.rc1
-rw-r--r--plugins/SeenPlugin/res/version.rc1
-rw-r--r--plugins/SeenPlugin/src/history.cpp27
-rw-r--r--plugins/SeenPlugin/src/main.cpp3
4 files changed, 13 insertions, 19 deletions
diff --git a/plugins/SeenPlugin/res/resource.rc b/plugins/SeenPlugin/res/resource.rc
index 2aa5cbbb71..638d9eff77 100644
--- a/plugins/SeenPlugin/res/resource.rc
+++ b/plugins/SeenPlugin/res/resource.rc
@@ -163,7 +163,6 @@ STYLE DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP |
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
-// PUSHBUTTON "Variablestest",IDC_TEST,5,5,52,13,NOT WS_VISIBLE
DEFPUSHBUTTON "OK",IDOK,75,101,50,14
PUSHBUTTON "",IDC_USERMENU,146,5,15,13,BS_ICON | WS_TABSTOP
PUSHBUTTON "",IDC_DETAILS,163,5,15,13,BS_ICON | WS_TABSTOP
diff --git a/plugins/SeenPlugin/res/version.rc b/plugins/SeenPlugin/res/version.rc
index 8f4ac7323e..b8fb57b0de 100644
--- a/plugins/SeenPlugin/res/version.rc
+++ b/plugins/SeenPlugin/res/version.rc
@@ -2,7 +2,6 @@
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
-#include "afxres.h"
#include "..\src\version.h"
/////////////////////////////////////////////////////////////////////////////
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);