summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src
diff options
context:
space:
mode:
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);