summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-01 12:32:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-01 12:32:05 +0000
commit055d4460e17344248c7364afc5d19deeda39d644 (patch)
treee526bcd1496a0b3f7679278b9b7cc47c1e4d986a /plugins/Clist_modern
parente509920d44176bfba08b81fc4833e1c47d0ac66f (diff)
copyright update for year 2014
git-svn-id: http://svn.miranda-ng.org/main/trunk@7438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp28
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp79
-rw-r--r--plugins/Clist_modern/src/hdr/modern_awaymsg.h6
-rw-r--r--plugins/Clist_modern/src/hdr/modern_cache_funcs.h5
-rw-r--r--plugins/Clist_modern/src/hdr/modern_clc.h5
-rw-r--r--plugins/Clist_modern/src/hdr/modern_clist.h6
-rw-r--r--plugins/Clist_modern/src/hdr/modern_clui.h16
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h5
-rw-r--r--plugins/Clist_modern/src/hdr/modern_defsettings.h9
-rw-r--r--plugins/Clist_modern/src/hdr/modern_image_array.h14
-rw-r--r--plugins/Clist_modern/src/hdr/modern_rowheight_funcs.h8
-rw-r--r--plugins/Clist_modern/src/hdr/modern_skinselector.h5
-rw-r--r--plugins/Clist_modern/src/hdr/modern_static_clui.h9
-rw-r--r--plugins/Clist_modern/src/init.cpp5
-rw-r--r--plugins/Clist_modern/src/m_api/m_skin_eng.h47
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp38
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.cpp28
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp60
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_clcidents.cpp50
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp58
-rw-r--r--plugins/Clist_modern/src/modern_clcmsgs.cpp25
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp17
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp254
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp118
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp52
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp22
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp72
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp60
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp25
-rw-r--r--plugins/Clist_modern/src/modern_cluiservices.cpp7
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp30
-rw-r--r--plugins/Clist_modern/src/modern_docking.cpp32
-rw-r--r--plugins/Clist_modern/src/modern_gettextasync.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_global.cpp9
-rw-r--r--plugins/Clist_modern/src/modern_image_array.cpp29
-rw-r--r--plugins/Clist_modern/src/modern_keyboard.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_newrowopts.cpp21
-rw-r--r--plugins/Clist_modern/src/modern_row.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_rowheight_funcs.cpp69
-rw-r--r--plugins/Clist_modern/src/modern_rowtemplateopt.cpp62
-rw-r--r--plugins/Clist_modern/src/modern_skinbutton.cpp154
-rw-r--r--plugins/Clist_modern/src/modern_skineditor.cpp93
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp41
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp37
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp68
51 files changed, 957 insertions, 917 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index ff48ca4304..da132602d1 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -1,7 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -606,8 +608,8 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
HWND_TOPMOST,
nNewX,
nNewY,
- 0,
- 0,
+ 0,
+ 0,
SWP_NOSIZE | SWP_NOZORDER|SWP_NOACTIVATE );
@@ -1858,7 +1860,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
pcli->hwndContactList, NULL, g_hInst,
NULL);
- SetWindowPos(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip, HWND_TOPMOST, 0, 0, 0, 0,
+ SetWindowPos(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
{
TOOLINFOA ti;
@@ -1877,7 +1879,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
g_pfwFrames[g_nFramesCount].oldstyles = GetWindowLongPtr(g_pfwFrames[g_nFramesCount].hWnd,GWL_STYLE);
g_pfwFrames[g_nFramesCount].TitleBar.oldstyles = GetWindowLongPtr(g_pfwFrames[g_nFramesCount].TitleBar.hwnd,GWL_STYLE);
- //Frames[nFramescount].FloatingPos.x =
+ //Frames[nFramescount].FloatingPos.x =
retval = g_pfwFrames[g_nFramesCount].id;
g_pfwFrames[g_nFramesCount].order = g_nFramesCount+1;
@@ -2048,9 +2050,9 @@ static int CLUIFrameMoveResize(const FRAMEWND *Frame)
{
SetWindowPos(Frame->OwnerWindow,NULL,Frame->wndSize.left+Off.x,Frame->wndSize.top+Off.y,
Frame->wndSize.right-Frame->wndSize.left,
- Frame->wndSize.bottom-Frame->wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE ); //- -= -=
+ Frame->wndSize.bottom-Frame->wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE ); //- -= -=
- SetWindowPos(Frame->hWnd,NULL, 0, 0,
+ SetWindowPos(Frame->hWnd,NULL, 0, 0,
Frame->wndSize.right-Frame->wndSize.left,
Frame->wndSize.bottom-Frame->wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE);
}
@@ -2348,8 +2350,8 @@ int CLUIFrames_ApplyNewSizes(int mode)
int i;
g_CluiData.mutexPreventDockMoving = 0;
for (i=0; i < g_nFramesCount; i++) {
- if ((mode == 1 && g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
- (mode == 2 && g_pfwFrames[i].OwnerWindow == (HWND)-2) ||
+ if ((mode == 1 && g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
+ (mode == 2 && g_pfwFrames[i].OwnerWindow == (HWND)-2) ||
(mode == 3))
if (g_pfwFrames[i].floating){
CLUIFrameResizeFloatingFrame(i);
@@ -2448,7 +2450,7 @@ int SizeFramesByWindowRect(RECT *r, HDWP * PosBatch, int mode)
hwnd = GetParent(g_pfwFrames[i].OwnerWindow);
*PosBatch = DeferWindowPos(*PosBatch,g_pfwFrames[i].OwnerWindow,NULL,g_pfwFrames[i].wndSize.left+r->left,g_pfwFrames[i].wndSize.top+r->top,
g_pfwFrames[i].wndSize.right-g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.bottom-g_pfwFrames[i].wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE);
- SetWindowPos(g_pfwFrames[i].hWnd,NULL, 0, 0,
+ SetWindowPos(g_pfwFrames[i].hWnd,NULL, 0, 0,
g_pfwFrames[i].wndSize.right-g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.bottom-g_pfwFrames[i].wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE/*|SWP_NOSENDCHANGING*/);
}
//Frame
@@ -3251,8 +3253,8 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
HWND_TOPMOST,
nLeft,
nTop,
- 0,
- 0,
+ 0,
+ 0,
SWP_NOSIZE |SWP_NOACTIVATE| SWP_NOZORDER );
ptOld = ptNew;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index 0b47bc71da..f6974a6eb1 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -72,7 +73,7 @@ INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam)
HMENU hMenu = CreatePopupMenu();
//hMenu = wParam;
int tick = GetTickCount();
-
+
NotifyEventHooks(g_CluiData.hEventPreBuildGroupMenu, 0, 0);
CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)&param);
@@ -91,7 +92,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)mir_calloc(sizeof(GroupMenuExecParam));
if (mmep == NULL)
return 0;
-
+
//we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
@@ -107,7 +108,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
OptParam op;
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
+ op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
return (INT_PTR)op.Handle;
@@ -131,12 +132,12 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
}
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
}
return TRUE;
@@ -148,13 +149,13 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam)
{
if (wParam != 0) {
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
+ lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
if ( !mir_strcmp(mmep->szServiceName,"Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
- CallService(mmep->szServiceName,mmep->Param1,lParam);
+ CallService(mmep->szServiceName,mmep->Param1,lParam);
}
- else CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
+ else CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
}
return 1;
}
@@ -179,7 +180,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
}
INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
-{
+{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
db_set_b(NULL,"CList","UseGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSEGROUPS,newVal,0);
@@ -210,13 +211,13 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
+ Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
mi.flags = CMIM_FLAGS | (SendMessage(pcli->hwndContactTree,CLM_GETHIDEOFFLINEROOT, 0, 0)?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, &mi);
-
+ Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, &mi);
+
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideEmptyGroupsMenuItem, &mi);
+ Menu_ModifyItem(hHideEmptyGroupsMenuItem, &mi);
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
Menu_ModifyItem(hDisableGroupsMenuItem, &mi);
@@ -230,7 +231,7 @@ int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam)
if (MirandaExiting()) return 0;
HICON hIcon = Skin_GetIconByHandle(iconItem.hIcolib);
- NewGroupIconidx = ImageList_ReplaceIcon(hCListImages, NewGroupIconidx, hIcon);
+ NewGroupIconidx = ImageList_ReplaceIcon(hCListImages, NewGroupIconidx, hIcon);
Skin_ReleaseIcon(hIcon);
CLISTMENUITEM clmi = { sizeof(clmi) };
@@ -246,7 +247,7 @@ void GroupMenus_Init(void)
Icon_Register(g_hInst, "Contact List", &iconItem, 1);
HICON hIcon = Skin_GetIconByHandle(iconItem.hIcolib);
- NewGroupIconidx = hIcon ? ImageList_AddIcon(hCListImages, hIcon) : -1;
+ NewGroupIconidx = hIcon ? ImageList_AddIcon(hCListImages, hIcon) : -1;
Skin_ReleaseIcon(hIcon);
CreateServiceFunction("CLISTMENUSGroup/ExecService",GroupMenuExecService);
@@ -292,7 +293,7 @@ void GroupMenus_Init(void)
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
-
+
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
@@ -321,32 +322,32 @@ void GroupMenus_Init(void)
mi.position = 100000;
mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
- mi.pszName = LPGEN("&New Group");
+ mi.pszName = LPGEN("&New Group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
mi.position = 100001;
mi.hIcon = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide Offline Users");
+ mi.pszName = LPGEN("&Hide Offline Users");
gmp.lParam = 0;gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
-
+
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &Offline Users out here");
+ mi.pszName = LPGEN("Hide &Offline Users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &Empty Groups");
+ mi.pszName = LPGEN("Hide &Empty Groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &Groups");
+ mi.pszName = LPGEN("Disable &Groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
-
+
HookEvent(ME_SKIN2_ICONSCHANGED, OnIconLibIconChanged);
}
@@ -396,10 +397,10 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ((group->hideOffline && !gray1)?CMIF_CHECKED:0)| (gray1?CMIF_GRAYED:0);
- Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
+ Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
mi.flags = CMIM_FLAGS | ((showOfflineinGroup && !gray2) ? CMIF_CHECKED:0)| (gray2?CMIF_GRAYED:0);
- Menu_ModifyItem(hShowOfflineUsersHereMenuItem, &mi);
+ Menu_ModifyItem(hShowOfflineUsersHereMenuItem, &mi);
return 0;
}
@@ -409,12 +410,12 @@ INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
param.MenuObjectHandle = hSubGroupMenuObject;
param.wParam = wParam;
param.lParam = lParam;
-
+
//hMenu = hMainMenu;
HMENU hMenu = CreatePopupMenu();
//hMenu = wParam;
int tick = GetTickCount();
-
+
NotifyEventHooks(g_CluiData.hEventPreBuildSubGroupMenu,wParam,0);
CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)&param);
@@ -439,7 +440,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)mir_calloc(sizeof(SubGroupMenuExecParam));
if ( mmep == NULL)
return 0;
-
+
//we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
@@ -487,13 +488,13 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam)
INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
{
if (wParam != 0) {
- lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
+ lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
if ( !mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
- CallService(mmep->szServiceName,mmep->Param1,lParam);
+ CallService(mmep->szServiceName,mmep->Param1,lParam);
}
- else CallService(mmep->szServiceName,mmep->Param1,lParam);
+ else CallService(mmep->szServiceName,mmep->Param1,lParam);
}
return 1;
}
@@ -545,7 +546,7 @@ void InitSubGroupMenus(void)
mi.position = 1000;
mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New SubGroup");
+ mi.pszName = LPGEN("&New SubGroup");
gmp.lParam = 0;gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -553,7 +554,7 @@ void InitSubGroupMenus(void)
mi.position = 1001;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide Offline Users in here");
+ mi.pszName = LPGEN("&Hide Offline Users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
@@ -561,7 +562,7 @@ void InitSubGroupMenus(void)
mi.position = 1002;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Show Offline Users in here");
+ mi.pszName = LPGEN("&Show Offline Users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPSHOWOFFLINE;
hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
@@ -571,7 +572,7 @@ void InitSubGroupMenus(void)
mi.position = 900001;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename Group");
+ mi.pszName = LPGEN("&Rename Group");
gmp.lParam = 0;gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -579,7 +580,7 @@ void InitSubGroupMenus(void)
mi.position = 900002;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete Group");
+ mi.pszName = LPGEN("&Delete Group");
gmp.lParam = 0;gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
diff --git a/plugins/Clist_modern/src/hdr/modern_awaymsg.h b/plugins/Clist_modern/src/hdr/modern_awaymsg.h
index ea51c6ddb2..ced79d077f 100644
--- a/plugins/Clist_modern/src/hdr/modern_awaymsg.h
+++ b/plugins/Clist_modern/src/hdr/modern_awaymsg.h
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -34,4 +35,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void InitAwayMsgModule();
void UninitAwayMsgModule();
void amRequestAwayMsg(HANDLE hContact);
-
diff --git a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h
index a1b75b96af..8566333734 100644
--- a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h
+++ b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/hdr/modern_clc.h b/plugins/Clist_modern/src/hdr/modern_clc.h
index 2fc25f638e..af1838b8a5 100644
--- a/plugins/Clist_modern/src/hdr/modern_clc.h
+++ b/plugins/Clist_modern/src/hdr/modern_clc.h
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/hdr/modern_clist.h b/plugins/Clist_modern/src/hdr/modern_clist.h
index 7a6d6c8489..ff9c776fd4 100644
--- a/plugins/Clist_modern/src/hdr/modern_clist.h
+++ b/plugins/Clist_modern/src/hdr/modern_clist.h
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#pragma once
#ifndef _CLIST_H_
diff --git a/plugins/Clist_modern/src/hdr/modern_clui.h b/plugins/Clist_modern/src/hdr/modern_clui.h
index 4360d183b7..0844ce63ab 100644
--- a/plugins/Clist_modern/src/hdr/modern_clui.h
+++ b/plugins/Clist_modern/src/hdr/modern_clui.h
@@ -1,13 +1,12 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Miranda NG: the free IM client for Microsoft* Windows*
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -22,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#ifndef modern_clui_h__
#define modern_clui_h__
@@ -45,7 +45,7 @@ public:
static HRESULT InitClui() { m_pCLUI = new CLUI(); return S_OK; };
static HWND& ClcWnd() { return pcli->hwndContactTree; }
static HWND& CluiWnd() { return pcli->hwndContactList; }
- static CLUI * GetClui() { return m_pCLUI; }
+ static CLUI * GetClui() { return m_pCLUI; }
static BOOL IsMainMenuInited() { return CLUI::m_fMainMenuInited; }
CLINTERFACE void cliOnCreateClc();
@@ -53,7 +53,7 @@ public:
EVENTHOOK( OnEvent_ModulesLoaded );
EVENTHOOK( OnEvent_ContactMenuPreBuild );
EVENTHOOK( OnEvent_FontReload );
-
+
SERVICE( Service_ShowMainMenu );
SERVICE( Service_ShowStatusMenu );
SERVICE( Service_Menu_ShowContactAvatar );
@@ -65,7 +65,7 @@ public:
if ( !m_hWnd ) m_hWnd = hwnd;
BOOL bHandled = FALSE;
- LRESULT lRes= This->PreProcessWndProc( msg, wParam, lParam, bHandled );
+ LRESULT lRes= This->PreProcessWndProc( msg, wParam, lParam, bHandled );
if ( bHandled ) return lRes;
switch ( msg )
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
index b040850808..f9424cb810 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
@@ -3,9 +3,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/hdr/modern_defsettings.h b/plugins/Clist_modern/src/hdr/modern_defsettings.h
index 7bae7516e8..00017423d8 100644
--- a/plugins/Clist_modern/src/hdr/modern_defsettings.h
+++ b/plugins/Clist_modern/src/hdr/modern_defsettings.h
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2007 Artem Shpynov
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+Copyright 2007 Artem Shpynov
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -241,4 +242,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SETTINGS_BARAUTOSIZE_DEFAULT 1 //"ModernToolBar", "option_Bar0_Autosize"
#define SETTINGS_BARMULTILINE_DEFAULT 1 //"ModernToolBar", "option_Bar0_Multiline"
-#define SETTING_ENABLESOUNDS_DEFAULT 1 // !"Skin", "UseSound",
+#define SETTING_ENABLESOUNDS_DEFAULT 1 // !"Skin", "UseSound",
diff --git a/plugins/Clist_modern/src/hdr/modern_image_array.h b/plugins/Clist_modern/src/hdr/modern_image_array.h
index 130c51ce95..203080e2f7 100644
--- a/plugins/Clist_modern/src/hdr/modern_image_array.h
+++ b/plugins/Clist_modern/src/hdr/modern_image_array.h
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -21,7 +22,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Pescuma
-
*/
#pragma once
@@ -32,14 +32,14 @@ Created by Pescuma
#include <windows.h>
-typedef struct _IMAGE_ARRAY_DATA_NODE
+typedef struct _IMAGE_ARRAY_DATA_NODE
{
int width;
int height;
}
IMAGE_ARRAY_DATA_NODE;
-typedef struct _IMAGE_ARRAY_DATA
+typedef struct _IMAGE_ARRAY_DATA
{
// Configuration
BOOL width_based;
@@ -83,7 +83,7 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos);
// Remove an image
BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos);
-// Draw an image
+// Draw an image
BOOL ImageArray_DrawImage(LP_IMAGE_ARRAY_DATA iad, int pos, HDC hdcDest, int nXDest, int nYDest, BYTE Alpha);
diff --git a/plugins/Clist_modern/src/hdr/modern_rowheight_funcs.h b/plugins/Clist_modern/src/hdr/modern_rowheight_funcs.h
index b6267364d0..ab65c2020d 100644
--- a/plugins/Clist_modern/src/hdr/modern_rowheight_funcs.h
+++ b/plugins/Clist_modern/src/hdr/modern_rowheight_funcs.h
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -21,7 +22,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Pescuma
-
*/
#pragma once
diff --git a/plugins/Clist_modern/src/hdr/modern_skinselector.h b/plugins/Clist_modern/src/hdr/modern_skinselector.h
index f443663420..09576c054d 100644
--- a/plugins/Clist_modern/src/hdr/modern_skinselector.h
+++ b/plugins/Clist_modern/src/hdr/modern_skinselector.h
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/hdr/modern_static_clui.h b/plugins/Clist_modern/src/hdr/modern_static_clui.h
index 3f31975f3c..c57e9b408d 100644
--- a/plugins/Clist_modern/src/hdr/modern_static_clui.h
+++ b/plugins/Clist_modern/src/hdr/modern_static_clui.h
@@ -1,13 +1,12 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Miranda NG: the free IM client for Microsoft* Windows*
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index 1d14999269..bf39b955a6 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/m_api/m_skin_eng.h b/plugins/Clist_modern/src/m_api/m_skin_eng.h
index c610fbed0d..bcb3a0f3a9 100644
--- a/plugins/Clist_modern/src/m_api/m_skin_eng.h
+++ b/plugins/Clist_modern/src/m_api/m_skin_eng.h
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/*defaults*/
#define DEFAULT_FIT_MODE FM_STRETCH
-#define DEFAULT_STYLE ST_BRUSH
+#define DEFAULT_STYLE ST_BRUSH
#define DEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE)
#define DEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT)
#define SIZING_MARGIN 3
@@ -68,7 +69,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/*SERVICES*/
-//toggle the 'hide offline contacts' flag and call CLUI
+//toggle the 'hide offline contacts' flag and call CLUI
//wParam=0
//lParam=0
#define MS_CLIST_TOGGLEHIDEOFFLINE "CList/ToggleHideOffline"
@@ -96,7 +97,7 @@ typedef struct s_DEF_SKIN_OBJECT_PARAMS
} DEF_SKIN_OBJECT_PARAMS;
-// Request painting glyph object
+// Request painting glyph object
// wParam = pointer to SKINDRAWREQUEST structure
// lParam = 0
#define MS_SKIN_DRAWGLYPH "ModernList/DrawGlyph"
@@ -112,11 +113,11 @@ typedef struct s_SKINDRAWREQUEST
char szObjectID[255]; // Unic Object ID (path) to paint
RECT rcDestRect; // Rectangle to fit
RECT rcClipRect; // Rectangle to paint in.
- HDC hDC; // Handler to device context to paint in.
+ HDC hDC; // Handler to device context to paint in.
} SKINDRAWREQUEST,*LPSKINDRAWREQUEST;
/* SKINOBJECTDESCRIPTOR opbject descriptor structure */
-typedef struct tagSKINOBJECTDESCRIPTOR
+typedef struct tagSKINOBJECTDESCRIPTOR
{
BYTE bType; // One of OT_* values.
char* szObjectID; // Unic Object ID (path) [255] max
@@ -126,9 +127,9 @@ typedef struct tagSKINOBJECTDESCRIPTOR
/* SKINOBJECTDESCRIPTOR opbject descriptor structure */
typedef struct s_GLYPHOBJECT
{
- BYTE Style; // One of ST_* values
+ BYTE Style; // One of ST_* values
HBITMAP hGlyph; // Bitmap handler (for internal use only)
- DWORD dwTop, dwLeft, dwBottom, dwRight; // Margins
+ DWORD dwTop, dwLeft, dwBottom, dwRight; // Margins
char* szFileName; // FileName of image
DWORD dwColor; // Fill color
BYTE dwAlpha; // Constant alpha-transparency level
@@ -180,11 +181,11 @@ int __inline CreateGlyphedObject(char * ObjID);
//// Creating and registering objects
//int __inline CreateGlyphedObject(char * ObjID)
-//{
+//{
// DEF_SKIN_OBJECT_PARAMS prm={0};
// prm.defColor=DEFAULT_BKCOLOUR;
// prm.defStyle=DEFAULT_STYLE;
-// prm.szObjectID=ObjID;
+// prm.szObjectID=ObjID;
// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
//}
static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
@@ -222,7 +223,7 @@ static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
// prm.defStyle=defStyle;
// prm.szObjectID=ObjID;
// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
-//}
+//}
//int __inline CreateGlyphedObjectDefColor(char * ObjID,DWORD defColor)
//{
// DEF_SKIN_OBJECT_PARAMS prm={0};
@@ -230,7 +231,7 @@ static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
// prm.defStyle=ST_BRUSH;
// prm.szObjectID=ObjID;
// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
-//}
+//}
INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam);
int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID)
{
@@ -238,7 +239,7 @@ int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectI
if (!objectID) return 0;
rq.hDC=hdc;
rq.rcDestRect=*rcSize;
- rq.rcClipRect=*rcClip;
+ rq.rcClipRect=*rcClip;
strncpy(rq.szObjectID,objectID,SIZEOF(rq.szObjectID));
return ske_Service_DrawGlyph((WPARAM)&rq,0);
//return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
@@ -317,7 +318,7 @@ int __inline SkinInvalidateFrame(HWND hWnd, CONST RECT* lpRect)
}
// Alpha channel GDI replacements/helpers
-//
+//
// Paints text with correct alpha channel
// wParam - pointer to AlphaTextOutParams
#define MS_SKINENG_ALPHATEXTOUT "SkinEngine/ske_AlphaTextOut"
@@ -358,7 +359,7 @@ MODERNFONTEFFECT;
typedef struct DrawTextWithEffectParam_tag
{
- int cbSize;
+ int cbSize;
HDC hdc; // handle to DC
LPCTSTR lpchText; // text to draw
int cchText; // length of text to draw
@@ -371,19 +372,19 @@ typedef struct DrawTextWithEffectParam_tag
#define MS_DRAW_TEXT_WITH_EFFECTW "Modern/SkinEngine/DrawTextWithEffectW"
#ifdef UNICODE
- #define MS_DRAW_TEXT_WITH_EFFECT MS_DRAW_TEXT_WITH_EFFECTW
+ #define MS_DRAW_TEXT_WITH_EFFECT MS_DRAW_TEXT_WITH_EFFECTW
#else
#define MS_DRAW_TEXT_WITH_EFFECT MS_DRAW_TEXT_WITH_EFFECTA
#endif
-// Helper
+// Helper
int __inline DrawTextWithEffect( HDC hdc, LPCTSTR lpchText, int cchText, RECT * lprc, UINT dwDTFormat, MODERNFONTEFFECT * pEffect )
{
DrawTextWithEffectParam params;
static BYTE bIfServiceExists = ServiceExists( MS_DRAW_TEXT_WITH_EFFECT ) ? 1 : 0;
if ( bIfServiceExists == 0 ) return DrawText ( hdc, lpchText, cchText, lprc, dwDTFormat );
-
- // else
+
+ // else
params.cbSize = sizeof( DrawTextWithEffectParam );
params.hdc = hdc;
params.lpchText = lpchText;
@@ -409,8 +410,8 @@ typedef struct _DrawIconFixParam
int yTop;
HICON hIcon;
int cxWidth;
- int cyWidth;
- UINT istepIfAniCur;
+ int cyWidth;
+ UINT istepIfAniCur;
HBRUSH hbrFlickerFreeDraw;
UINT diFlags;
} DrawIconFixParam;
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 02690cff9d..d241ea1565 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -1,8 +1,9 @@
-/**************************************************************************\
+/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -19,18 +20,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
-****************************************************************************
+// File contains implementation of animated avatars in contact list
-Created: Mar 9, 2007
-
-Author: Artem Shpynov aka FYR: ashpynov@gmail.com
-
-****************************************************************************
-
-File contains implementation of animated avatars in contact list
-
-\**************************************************************************/
+***************************************************************************/
#include "hdr/modern_commonheaders.h"
@@ -297,7 +291,7 @@ int AniAva_AddAvatar(HANDLE hContact, TCHAR * szFilename, int width, int heigth)
aacheck 0;
if ( !GDIPlus_IsAnimatedGif (szFilename))
return 0;
-
+
mir_cslock lck(s_CS);
//first try to find window for contact avatar
HWND hwnd = NULL;
@@ -626,10 +620,10 @@ static int _AniAva_LoadAvatarFromImage(TCHAR * szFileName, int width, int height
// copy from old and from new strip
BitBlt(hNewDC, 0, 0, s_width,s_height,s_hAniAvaDC, 0, 0, SRCCOPY);
BitBlt(hNewDC,s_width, 0, paai->FrameSize.cx*paai->nFrameCount,paai->FrameSize.cy,hTempDC, 0, 0, SRCCOPY);
-
+
paai->nStripTop = s_width;
s_AniAvatarList.insert(paai);
-
+
GdiFlush();
//remove temp DC
SelectObject(hTempDC,hOldBitmap);
@@ -694,7 +688,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL
{
if (dat->bPaused>0) { dat->bPended = TRUE; return; }
else dat->bPended = FALSE;
-
+
if ( IMMEDIATE_DRAW && hdcParent == NULL ) return;
GdiFlush();
@@ -744,7 +738,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL
SelectObject(tempDC, hOldBrush);
DeleteObject(hBrush);
DeleteObject(rgnOutside);
- }
+ }
else if ( cornerRadius > 0 )
// else create clipping area (round corners)
hRgn = CreateRoundRectRgn(0, 0, szWnd.cx+1, szWnd.cy+1, cornerRadius << 1, cornerRadius << 1);
@@ -873,7 +867,7 @@ static void _AniAva_LoadOptions()
mir_cslock lck(s_CS);
s_bFlags = ( db_get_b(NULL,"CList","AvatarsDrawBorders",SETTINGS_AVATARDRAWBORDER_DEFAULT)? AAO_HAS_BORDER :0) |
- ( db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT)? AAO_ROUND_CORNERS :0) |
+ ( db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT)? AAO_ROUND_CORNERS :0) |
( db_get_b(NULL,"CList","AvatarsDrawOverlay",SETTINGS_AVATARDRAWOVERLAY_DEFAULT)? AAO_HAS_OVERLAY :0) |
((0) ? AAO_OPAQUE :0);
@@ -898,7 +892,7 @@ static void _AniAva_LoadOptions()
}
if (s_bFlags & AAO_OPAQUE)
s_bkgColor = 0;
- s_bSeparateWindow = db_get_b(NULL,"CList","AvatarsInSeparateWnd",SETTINGS_AVATARINSEPARATE_DEFAULT);
+ s_bSeparateWindow = db_get_b(NULL,"CList","AvatarsInSeparateWnd",SETTINGS_AVATARINSEPARATE_DEFAULT);
}
static int _AniAva_SortAvatarInfo(const ANIAVA_INFO *aai1, const ANIAVA_INFO *aai2)
@@ -944,7 +938,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case AAM_RESUME:
dat->bPaused--;
if (dat->bPaused) return 0;
- if (dat->bPended)
+ if (dat->bPended)
if ( !IMMEDIATE_DRAW )
_AniAva_RenderAvatar(dat);
dat->bPended = FALSE;
@@ -1000,7 +994,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
SetWindowPos(hwnd,HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_ASYNCWINDOWPOS);
else {
LONG exStyle = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
- SetWindowPos(pcli->hwndContactList,hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
+ SetWindowPos(pcli->hwndContactList,hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
if ( !(exStyle & WS_EX_TOPMOST))
SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
}
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp
index 5a9f296df4..6801f182b1 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/src/modern_awaymsg.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -19,7 +20,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
*/
/*
@@ -80,26 +80,26 @@ static HANDLE amGetCurrentChain()
static void amThreadProc(void *)
{
thread_catcher lck(g_hAwayMsgThread);
-
+
ClcCacheEntry dnce;
memset(&dnce, 0, sizeof(dnce));
while (!MirandaExiting()) {
- HANDLE hContact = amGetCurrentChain();
- while (hContact) {
+ HANDLE hContact = amGetCurrentChain();
+ while (hContact) {
DWORD time = GetTickCount();
if ((time-amRequestTick) < AMASKPERIOD) {
SleepEx(AMASKPERIOD-(time-amRequestTick)+10, TRUE);
if ( MirandaExiting())
- return;
+ return;
}
CListSettings_FreeCacheItemData(&dnce);
dnce.hContact = (HANDLE)hContact;
Sync(CLUI_SyncGetPDNCE, (WPARAM) 0, (LPARAM)&dnce);
-
+
HANDLE ACK = 0;
if (dnce.ApparentMode != ID_STATUS_OFFLINE) //don't ask if contact is always invisible (should be done with protocol)
- ACK = (HANDLE)CallContactService(hContact,PSS_GETAWAYMSG, 0, 0);
+ ACK = (HANDLE)CallContactService(hContact,PSS_GETAWAYMSG, 0, 0);
if ( !ACK) {
ACKDATA ack;
ack.hContact = hContact;
@@ -124,7 +124,7 @@ static void amThreadProc(void *)
}
else break;
if ( MirandaExiting())
- return;
+ return;
}
WaitForSingleObjectEx(hamProcessEvent, INFINITE, TRUE);
ResetEvent(hamProcessEvent);
@@ -148,19 +148,19 @@ BOOL amWakeThread()
*/
void amRequestAwayMsg(HANDLE hContact)
{
- if ( !g_CluiData.bInternalAwayMsgDiscovery || !hContact)
+ if ( !g_CluiData.bInternalAwayMsgDiscovery || !hContact)
return;
- //Do not re-ask for chat rooms
+ //Do not re-ask for chat rooms
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !db_get_b(hContact, szProto, "ChatRoom", 0))
- amAddHandleToChain(hContact);
+ amAddHandleToChain(hContact);
}
void InitAwayMsgModule()
{
InitializeCriticalSection(&amCS);
- hamProcessEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
+ hamProcessEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
g_hAwayMsgThread = mir_forkthread(amThreadProc, 0);
}
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index dd8ecdaa3d..1333682716 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -1,11 +1,10 @@
-/* CODE STYLE */
-
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -24,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Pescuma
Modified by FYR
-
*/
/************************************************************************/
@@ -59,7 +57,7 @@ void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag );
void Cache_GetTimezone(ClcData *dat, HANDLE hContact)
{
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(hContact);
- if (dat == NULL && pcli->hwndContactTree)
+ if (dat == NULL && pcli->hwndContactTree)
dat = (ClcData *)GetWindowLongPtr(pcli->hwndContactTree,0);
if (dat && dat->hWnd == pcli->hwndContactTree) {
@@ -70,7 +68,7 @@ void Cache_GetTimezone(ClcData *dat, HANDLE hContact)
/*
* Get all lines of text
- */
+ */
void Cache_GetText(ClcData *dat, ClcContact *contact, BOOL forceRenew)
{
@@ -142,9 +140,9 @@ void CSmileyString::_CopySmileyList( SortedList *plInput )
ClcContactTextPiece *pieceFrom = (ClcContactTextPiece *) plInput->items[i];
if ( pieceFrom != NULL )
{
- ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece));
+ ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece));
*piece = *pieceFrom;
- if ( pieceFrom->type == TEXT_PIECE_TYPE_SMILEY)
+ if ( pieceFrom->type == TEXT_PIECE_TYPE_SMILEY)
piece->smiley = CopyIcon( pieceFrom->smiley );
List_Insert( plText, piece, plText->realCount );
}
@@ -287,11 +285,11 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, ClcCacheEntry *pdnce,
* Getting Status name
* -1 for XStatus, 1 for Status
*/
-int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority)
+int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority)
{
BOOL noAwayMsg = FALSE;
BOOL noXstatus = FALSE;
- // Hide status text if Offline /// no offline
+ // Hide status text if Offline /// no offline
WORD nStatus = pdnce___GetStatus( pdnce );
if ((nStatus == ID_STATUS_OFFLINE || nStatus == 0) && g_CluiData.bRemoveAwayMessageForOffline) noAwayMsg = TRUE;
if (nStatus == ID_STATUS_OFFLINE || nStatus == 0) noXstatus = TRUE;
@@ -355,13 +353,13 @@ void GetListeningTo(TCHAR *text, int text_size, ClcCacheEntry *pdnce)
* -1 for XStatus, 1 for Status
*/
-int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority)
+int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority)
{
DBVARIANT dbv = {0};
BOOL noAwayMsg = FALSE;
WORD wStatus = pdnce___GetStatus( pdnce );
text[0] = '\0';
- // Hide status text if Offline /// no offline
+ // Hide status text if Offline /// no offline
if (wStatus == ID_STATUS_OFFLINE || wStatus == 0) noAwayMsg = TRUE;
// Get XStatusMsg
@@ -410,8 +408,8 @@ int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xst
* Get the text for specified lines
*/
int Cache_GetLineText(
- ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size, TCHAR *variable_text, BOOL xstatus_has_priority,
- BOOL show_status_if_no_away, BOOL show_listening_if_no_away, BOOL use_name_and_message_for_xstatus,
+ ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size, TCHAR *variable_text, BOOL xstatus_has_priority,
+ BOOL show_status_if_no_away, BOOL show_listening_if_no_away, BOOL use_name_and_message_for_xstatus,
BOOL pdnce_time_show_only_if_different)
{
text[0] = '\0';
@@ -453,7 +451,7 @@ int Cache_GetLineText(
if ( !db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "XStatusName", &dbv)) {
if (dbv.pszVal != NULL && dbv.pszVal[0] != 0) {
TCHAR *tmp = NEWTSTR_ALLOCA(text);
- mir_sntprintf(text, text_size, _T("%s: %s"), dbv.pszVal, tmp);
+ mir_sntprintf(text, text_size, _T("%s: %s"), dbv.pszVal, tmp);
}
CopySkipUnprintableChars(text, text, text_size-1);
db_free(&dbv);
@@ -479,7 +477,7 @@ int Cache_GetLineText(
if (show_status_if_no_away) {
//re-request status if no away
- return Cache_GetLineText(pdnce, TEXT_STATUS, text, text_size, variable_text, xstatus_has_priority, 0, 0, use_name_and_message_for_xstatus, pdnce_time_show_only_if_different);
+ return Cache_GetLineText(pdnce, TEXT_STATUS, text, text_size, variable_text, xstatus_has_priority, 0, 0, use_name_and_message_for_xstatus, pdnce_time_show_only_if_different);
}
}
return TEXT_STATUS_MESSAGE;
@@ -540,7 +538,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
if ( !dat->force_in_dialog) {
struct SHORTDATA data = {0};
- Sync(CLUI_SyncGetShortData,(WPARAM)pcli->hwndContactTree,(LPARAM)&data);
+ Sync(CLUI_SyncGetShortData,(WPARAM)pcli->hwndContactTree,(LPARAM)&data);
contact->ssText.ReplaceSmileys(&data, pdnce, contact->szText, dat->first_line_draw_smileys);
}
}
@@ -554,7 +552,7 @@ void Cache_GetSecondLineText(struct SHORTDATA *dat, ClcCacheEntry *pdnce)
TCHAR Text[240-EXTRA_ICON_COUNT] = {0};
int type = TEXT_EMPTY;
- if (dat->second_line_show)
+ if (dat->second_line_show)
type = Cache_GetLineText(pdnce, dat->second_line_type, (TCHAR*)Text, SIZEOF(Text), dat->second_line_text,
dat->second_line_xstatus_has_priority,dat->second_line_show_status_if_no_away,dat->second_line_show_listening_if_no_away,
dat->second_line_use_name_and_message_for_xstatus, dat->contact_time_show_only_if_different);
@@ -637,11 +635,11 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size)
if ( !keep) cp++;
keep = 1;
}
- else {
+ else {
keep = 0;
*cp = buf[i];
cp++;
- }
+ }
}
*cp = 0;
@@ -652,7 +650,7 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size)
RemoveTag(to,_T("<b>")); RemoveTag(to,_T("</b>"));
RemoveTag(to,_T("<u>")); RemoveTag(to,_T("</u>"));
- RemoveTag(to,_T("<i>")); RemoveTag(to,_T("</i>"));
+ RemoveTag(to,_T("<i>")); RemoveTag(to,_T("</i>"));
RemoveTag(to,_T("[B]")); RemoveTag(to,_T("[/b]"));
RemoveTag(to,_T("[U]")); RemoveTag(to,_T("[/u]"));
@@ -689,7 +687,7 @@ static BOOL ExecuteOnAllContactsOfGroup(ClcGroup *group, ExecuteOnAllContactsFun
return FALSE;
}
}
- else if (group->cl.items[scanIndex]->type == CLCIT_GROUP)
+ else if (group->cl.items[scanIndex]->type == CLCIT_GROUP)
if ( !ExecuteOnAllContactsOfGroup(group->cl.items[scanIndex]->group, func, param))
return FALSE;
}
@@ -749,7 +747,7 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact)
if (height_clip * ace->bmWidth / ace->bmHeight <= width_clip)
width_clip = height_clip * ace->bmWidth / ace->bmHeight;
else
- height_clip = width_clip * ace->bmHeight / ace->bmWidth;
+ height_clip = width_clip * ace->bmHeight / ace->bmWidth;
if (wildcmpit(contact->avatar_data->szFilename,_T("*.gif"))) {
if (old_pos == AVATAR_POS_ANIMATED)
@@ -766,7 +764,7 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact)
// Create objs
void * pt;
- HDC hdc = CreateCompatibleDC(dat->avatar_cache.hdc);
+ HDC hdc = CreateCompatibleDC(dat->avatar_cache.hdc);
HBITMAP hDrawBmp = ske_CreateDIB32Point(width_clip, height_clip,&pt);
HBITMAP oldBmp = (HBITMAP)SelectObject(hdc, hDrawBmp);
//need to draw avatar bitmap here
@@ -810,7 +808,7 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
contact->avatar_data = NULL;
if (contact->avatar_data != NULL)
- contact->avatar_data->t_lastAccess = (DWORD)time(NULL);
+ contact->avatar_data->t_lastAccess = (DWORD)time(NULL);
}
else contact->avatar_data = NULL;
@@ -827,7 +825,7 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
BITMAP bm;
if (GetObject(hBmp,sizeof(BITMAP),&bm)) {
// Create data...
- HDC hdc;
+ HDC hdc;
HBITMAP hDrawBmp,oldBmp;
// Make bounds -> keep aspect radio
@@ -842,10 +840,10 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
if (height_clip * bm.bmWidth / bm.bmHeight <= width_clip)
width_clip = height_clip * bm.bmWidth / bm.bmHeight;
else
- height_clip = width_clip * bm.bmHeight / bm.bmWidth;
+ height_clip = width_clip * bm.bmHeight / bm.bmWidth;
// Create objs
- hdc = CreateCompatibleDC(dat->avatar_cache.hdc);
+ hdc = CreateCompatibleDC(dat->avatar_cache.hdc);
hDrawBmp = ske_CreateDIB32(width_clip, height_clip);
oldBmp = (HBITMAP)SelectObject(hdc, hDrawBmp);
SetBkMode(hdc,TRANSPARENT);
@@ -860,7 +858,7 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
// Draw bitmap 8//8
HDC dcMem = CreateCompatibleDC(hdc);
- HBITMAP obmp = (HBITMAP)SelectObject(dcMem, hBmp);
+ HBITMAP obmp = (HBITMAP)SelectObject(dcMem, hBmp);
StretchBlt(hdc, 0, 0, width_clip, height_clip,dcMem, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
SelectObject(dcMem,obmp);
DeleteDC(dcMem);
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 586834ad5c..8778863d15 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1,9 +1,9 @@
-// refactored step 1.
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -389,7 +389,7 @@ static BOOL clcItemNotHiddenOffline(ClcData *dat, ClcGroup* group, ClcContact *c
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(contact->hContact);
if (!pdnce) return FALSE;
if (pdnce->m_cache_nNoHiddenOffline) return TRUE;
-
+
if (!group) return FALSE;
if (group->hideOffline) return FALSE;
@@ -898,7 +898,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam
}
}
- if (hit != -1 && !(hitFlags & CLCHT_NOWHERE) && contact->type == CLCIT_CONTACT && contact->SubAllocated && !contact->isSubcontact)
+ if (hit != -1 && !(hitFlags & CLCHT_NOWHERE) && contact->type == CLCIT_CONTACT && contact->SubAllocated && !contact->isSubcontact)
if (hitFlags&CLCHT_ONITEMICON && dat->expandMeta)
{
BYTE doubleClickExpand = db_get_b(NULL,"CLC","MetaDoubleClick",SETTING_METAAVOIDDBLCLICK_DEFAULT);
@@ -1251,7 +1251,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
switch(target) {
case DROPTARGET_ONSELF:
break;
-
+
case DROPTARGET_ONCONTACT:
if ( ServiceExists(MS_MC_ADDTOMETA)) {
ClcContact *contDest, *contSour;
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp
index a443492ac6..5ed82a4aec 100644
--- a/plugins/Clist_modern/src/modern_clcidents.cpp
+++ b/plugins/Clist_modern/src/modern_clcidents.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_commonprototypes.h"
@@ -68,7 +70,7 @@ int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex)
}
if (group == subgroup && contactIndex-subcontactscount == group->scanIndex) return count;
count++;
-
+
/* if ((group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) && (group->cl.items[group->scanIndex].flags & CONTACTF_STATUSMSG)) {
count++;
}
@@ -89,7 +91,7 @@ int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex)
{
int rows = (group->cl.items[group->scanIndex]->SubAllocated*group->cl.items[group->scanIndex]->SubExpanded*k);
if (group->scanIndex+rows >= contactIndex)
- return count+(contactIndex-group->scanIndex)-1;
+ return count+(contactIndex-group->scanIndex)-1;
}
}
if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT)
@@ -112,7 +114,7 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
int index = 0, i;
int nowVisible = 1;
ClcGroup *group;
-
+
group = &dat->list;
group->scanIndex = 0;
@@ -126,9 +128,9 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
nowVisible = 1;
for (tgroup = group;tgroup;tgroup = tgroup->parent)
{
- if ( !tgroup->expanded)
+ if ( !tgroup->expanded)
{
- nowVisible = 0;
+ nowVisible = 0;
break;
}
}
@@ -136,15 +138,15 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
continue;
}
if (nowVisible) index++;
- if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) ||
- (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == hItem) ||
- (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HANDLE)((UINT_PTR)hItem&~HCONTACT_ISINFO)))
+ if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) ||
+ (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == hItem) ||
+ (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HANDLE)((UINT_PTR)hItem&~HCONTACT_ISINFO)))
{
if (isVisible) {
if ( !nowVisible) *isVisible = 0;
else {
int posy = cliGetRowTopY(dat,index+1);
- if (posy < dat->yScroll)
+ if (posy < dat->yScroll)
*isVisible = 0;
else {
RECT clRect;
@@ -156,30 +158,30 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
}
if (contact) *contact = group->cl.items[group->scanIndex];
if (subgroup) *subgroup = group;
-
+
return 1;
}
- if ( !isIgnoreSubcontacts &&
- IsHContactContact(hItem) &&
- group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
+ if ( !isIgnoreSubcontacts &&
+ IsHContactContact(hItem) &&
+ group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
group->cl.items[group->scanIndex]->SubAllocated > 0)
{
for (i=0; i < group->cl.items[group->scanIndex]->SubAllocated; i++)
{
if (group->cl.items[group->scanIndex]->subcontacts[i].hContact == hItem)
- {
+ {
#ifdef _DEBUG
if (IsBadWritePtr(&group->cl.items[group->scanIndex]->subcontacts[i], sizeof(ClcContact)))
{
log1("FindIltem->IsBadWritePtr | 2o [%08x]", &group->cl.items[group->scanIndex]->subcontacts[i]);
PostMessage(hwnd,CLM_AUTOREBUILD, 0, 0);
-
+
return 0;
}
#endif
if (contact) *contact = &group->cl.items[group->scanIndex]->subcontacts[i];
if (subgroup) *subgroup = group;
-
+
return 1;
}
}
@@ -193,7 +195,7 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
}
group->scanIndex++;
}
-
+
if (isVisible) *isVisible = FALSE;
if (contact) *contact = NULL;
if (subgroup) *subgroup = NULL;
@@ -202,7 +204,7 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup *
void ClearRowByIndexCache()
{
- if ( !CacheIndexClear)
+ if ( !CacheIndexClear)
{
memset(CacheIndex, 0, sizeof(CacheIndex));
CacheIndexClear = TRUE;
@@ -223,7 +225,7 @@ int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup **
group->scanIndex++;
continue;
}
- if ((index>0) && (index < CacheArrSize))
+ if ((index>0) && (index < CacheArrSize))
{
CacheIndex[index] = group;
CacheIndexClear = FALSE;
@@ -241,14 +243,14 @@ int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup **
{
for (i=0; i < group->cl.items[group->scanIndex]->SubAllocated; i++)
{
- if ((index>0) && (index < CacheArrSize))
+ if ((index>0) && (index < CacheArrSize))
{
CacheIndex[index] = group;
CacheIndexClear = FALSE;
};
index++;
if (testindex == index) {
- if (contact)
+ if (contact)
{
*contact = &group->cl.items[group->scanIndex]->subcontacts[i];
(*contact)->subcontacts = group->cl.items[group->scanIndex];
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index cecc7ff49a..5b16bfc044 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_clist.h"
@@ -98,7 +100,7 @@ int cli_AddItemToGroup(ClcGroup *group,int iAboveItem)
ClcGroup *cli_AddGroup(HWND hwnd,ClcData *dat,const TCHAR *szName, DWORD flags,int groupId,int calcTotalMembers)
{
- ClearRowByIndexCache();
+ ClearRowByIndexCache();
if ( !dat->force_in_dialog && !(GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN))
if ( !lstrcmp(_T("-@-HIDDEN-GROUP-@-"),szName)) { //group is hidden
ClearRowByIndexCache();
@@ -160,17 +162,17 @@ static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat,
cont->image_is_special = FALSE;
cont->hContact = hContact;
- pcli->pfnInvalidateDisplayNameCacheEntry(hContact);
- cacheEntry = pcli->pfnGetCacheEntry(hContact);
-
+ pcli->pfnInvalidateDisplayNameCacheEntry(hContact);
+ cacheEntry = pcli->pfnGetCacheEntry(hContact);
+
szProto = cacheEntry->m_cache_cszProto;
cont->proto = szProto;
if (szProto != NULL && !pcli->pfnIsHiddenMode(dat,pdnce___GetStatus( cacheEntry )))
cont->flags |= CONTACTF_ONLINE;
-
+
apparentMode = szProto != NULL?cacheEntry->ApparentMode:0;
-
+
if (apparentMode)
switch (apparentMode)
{
@@ -183,19 +185,19 @@ static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat,
default:
cont->flags |= CONTACTF_VISTO|CONTACTF_INVISTO;
}
-
- if (cacheEntry->NotOnList)
+
+ if (cacheEntry->NotOnList)
cont->flags |= CONTACTF_NOTONLIST;
idleMode = szProto != NULL?cacheEntry->IdleTS:0;
-
- if (idleMode)
+
+ if (idleMode)
cont->flags |= CONTACTF_IDLE;
-
+
//Add subcontacts
if (szProto)
- {
- if ( g_szMetaModuleName && dat->IsMetaContactsEnabled && mir_strcmp(cont->proto,g_szMetaModuleName) == 0)
+ {
+ if ( g_szMetaModuleName && dat->IsMetaContactsEnabled && mir_strcmp(cont->proto,g_szMetaModuleName) == 0)
AddSubcontacts(dat,cont,CLCItems_IsShowOfflineGroup(group));
}
cont->lastPaintCounter = 0;
@@ -283,7 +285,7 @@ void cli_DeleteItemFromTree(HWND hwnd,HANDLE hItem)
//check here contacts are not resorting
if (hwnd == pcli->hwndContactTree)
- pcli->pfnFreeCacheItem( pcli->pfnGetCacheEntry(hItem));
+ pcli->pfnFreeCacheItem( pcli->pfnGetCacheEntry(hItem));
dat->needsResort = 1;
ClearRowByIndexCache();
}
@@ -324,10 +326,10 @@ int RestoreSelection( ClcData *dat, HANDLE hSelected )
dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, List_IndexOf((SortedList*)&selgroup->cl, selcontact ));
}
else
- {
+ {
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ));
-
- if (dat->selection != -1 )
+
+ if (dat->selection != -1 )
dat->selection += selcontact->isSubcontact;
}
return dat->selection;
@@ -399,7 +401,7 @@ void cliRebuildEntireList(HWND hwnd,ClcData *dat)
else cont = AddContactToGroup(dat,group,cacheEntry);
}
}
- if (cont) {
+ if (cont) {
cont->SubAllocated = 0;
if (cont->proto && g_szMetaModuleName && dat->IsMetaContactsEnabled && strcmp(cont->proto,g_szMetaModuleName) == 0)
AddSubcontacts(dat,cont,CLCItems_IsShowOfflineGroup(group));
@@ -500,7 +502,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat)
ClcGroup *group;
ClcContact *contact;
-
+
pcli->pfnHideInfoTip(hwnd, dat);
KillTimer(hwnd, TIMERID_INFOTIP);
KillTimer(hwnd, TIMERID_RENAME);
@@ -518,7 +520,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat)
else if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP) {
group = group->cl.items[group->scanIndex]->group;
group->scanIndex = 0;
-
+
SavedGroupState_t* p = new SavedGroupState_t;
p->groupId = group->groupId;
p->expanded = group->expanded;
@@ -606,7 +608,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat)
WORD pdnce___GetStatus(ClcCacheEntry *pdnce)
{
- if ( !pdnce)
+ if ( !pdnce)
return ID_STATUS_OFFLINE;
else
return pdnce->m_cache_nStatus;
@@ -630,7 +632,7 @@ ClcCacheEntry* cliCreateCacheItem( HANDLE hContact )
ClcCacheEntry *p = (ClcCacheEntry *)mir_calloc(sizeof( ClcCacheEntry ));
if (p == NULL)
return NULL;
-
+
p->hContact = hContact;
InvalidateDNCEbyPointer(hContact, p, 0);
p->szSecondLineText = NULL;
@@ -674,8 +676,8 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly)
count += group->cl.count;
continue;
}
- else if ((group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) &&
- (group->cl.items[group->scanIndex]->subcontacts != NULL) &&
+ else if ((group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) &&
+ (group->cl.items[group->scanIndex]->subcontacts != NULL) &&
((group->cl.items[group->scanIndex]->SubExpanded || (!visibleOnly))))
{
count += group->cl.items[group->scanIndex]->SubAllocated;
@@ -760,6 +762,6 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, ClcDa
}
return (dbHidden | !filterResult | searchResult);
}
-
+
return dbHidden | searchResult;
}
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp
index d31016b09f..ebfb45bc7a 100644
--- a/plugins/Clist_modern/src/modern_clcmsgs.cpp
+++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -31,7 +32,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara
{
ClcContact *contact;
ClcGroup *group;
-
+
switch(msg) {
case CLM_DELETEITEM:
pcli->pfnDeleteItemFromTree(hwnd, (HANDLE) wParam);
@@ -95,10 +96,10 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara
dat->fontModernInfo[FONTID_CONTACT_TIME].colour = lParam;
break;
case FONTID_OPENGROUPS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour = lParam;
+ dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour = lParam;
break;
case FONTID_OPENGROUPCOUNTS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour = lParam;
+ dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour = lParam;
break;
}
return 0;
@@ -194,21 +195,21 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara
else {
index = List_IndexOf((SortedList*)&group->cl,contact->subcontacts);
mainindex = index;
- index += contact->isSubcontact;
- }
-
+ index += contact->isSubcontact;
+ }
+
BYTE k = db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
if (k) {
for (int i=0; i < mainindex; i++)
{
ClcContact *tempCont = group->cl.items[i];
if (tempCont->type == CLCIT_CONTACT && tempCont->SubAllocated && tempCont->SubExpanded)
- index += tempCont->SubAllocated;
+ index += tempCont->SubAllocated;
}
- }
+ }
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, group, index);
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
}
return 0;
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index a782a6167d..05dfb26625 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -1071,7 +1072,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
g_hCLUIOptionsWnd = hwndDlg;
CheckDlgButton(hwndDlg, IDC_ONTOP, db_get_b(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
{
- //====== Activate/Deactivate Non-Layered items =======
+ //====== Activate/Deactivate Non-Layered items =======
fEnabled = !g_CluiData.fLayered || g_CluiData.fDisableSkinEngine;
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), fEnabled);
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), fEnabled);
@@ -1086,7 +1087,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg, IDC_ROUNDCORNERS), fEnabled);
}
{
- //====== Non-Layered Mode =====
+ //====== Non-Layered Mode =====
CheckDlgButton(hwndDlg, IDC_TOOLWND, db_get_b(NULL, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_MIN2TRAY, db_get_b(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_BORDER, db_get_b(NULL, "CList", "ThinBorder", SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
@@ -1108,7 +1109,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
CheckDlgButton(hwndDlg, IDC_DROPSHADOW, db_get_b(NULL, "CList", "WindowShadow", SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- } //====== End of Non-Layered Mode =====
+ } //====== End of Non-Layered Mode =====
CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONDESKTOP, db_get_b(NULL, "CList", "OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
@@ -1188,7 +1189,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
EnableWindow(GetDlgItem(hwndDlg, IDC_INACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
}
- else if (LOWORD(wParam) == IDC_LAYERENGINE || LOWORD(wParam) == IDC_DISABLEENGINE) { //====== Activate/Deactivate Non-Layered items =======
+ else if (LOWORD(wParam) == IDC_LAYERENGINE || LOWORD(wParam) == IDC_DISABLEENGINE) { //====== Activate/Deactivate Non-Layered items =======
fEnabled = !(IsWindowEnabled(GetDlgItem(hwndDlg, IDC_LAYERENGINE)) && !IsDlgButtonChecked(hwndDlg, IDC_LAYERENGINE) && !IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE));
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), fEnabled && (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
@@ -1272,7 +1273,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
db_set_b(NULL, "CLUI", "DragToScroll", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
- { //====== Non-Layered Mode ======
+ { //====== Non-Layered Mode ======
db_set_b(NULL, "CList", "ToolWindow", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
db_set_b(NULL, "CLUI", "ShowCaption", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
db_set_b(NULL, "CLUI", "ShowMainMenu", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
@@ -1286,7 +1287,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
db_set_b(NULL, "CList", "Min2Tray", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
db_set_b(NULL, "CList", "WindowShadow", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
db_set_b(NULL, "CLC", "RoundCorners", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS));
- } //====== End of Non-Layered Mode ======
+ } //====== End of Non-Layered Mode ======
g_mutex_bChangingMode = TRUE;
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index 180c4b4995..6290654a02 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +12,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or ( at your option ) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -21,7 +22,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
@@ -96,14 +96,14 @@ const int CLCPaint::MIN_TEXT_WIDTH = 20;
const int CLCPaint::BUF2SIZE = 7;
const BYTE CLCPaint::GIM_SELECTED_AFFECT = 1;
-const BYTE CLCPaint::GIM_HOT_AFFECT = 2;
-const BYTE CLCPaint::GIM_TEMP_AFFECT = 4;
+const BYTE CLCPaint::GIM_HOT_AFFECT = 2;
+const BYTE CLCPaint::GIM_TEMP_AFFECT = 4;
const BYTE CLCPaint::GIM_IDLE_AFFECT = 8;
const BYTE CLCPaint::GIM_EXTRAICON_AFFECT = CLCPaint::GIM_SELECTED_AFFECT | CLCPaint::GIM_HOT_AFFECT | CLCPaint::GIM_IDLE_AFFECT | CLCPaint::GIM_TEMP_AFFECT;
const BYTE CLCPaint::GIM_STATUSICON_AFFECT = CLCPaint::GIM_IDLE_AFFECT | CLCPaint::GIM_TEMP_AFFECT;
const BYTE CLCPaint::GIM_AVATAR_AFFECT = CLCPaint::GIM_IDLE_AFFECT | CLCPaint::GIM_TEMP_AFFECT;
-CLCPaint::CLCPaint()
+CLCPaint::CLCPaint()
{
_FillQuickHash();
};
@@ -132,19 +132,19 @@ HFONT CLCPaint::ChangeToFont( HDC hdc, ClcData *dat, int id, int *fontHeight )
if ( !dat)
dat = (ClcData*)GetWindowLongPtr( pcli->hwndContactTree, 0 );
- if ( !dat)
+ if ( !dat)
return NULL;
HFONT res = ( HFONT )SelectObject( hdc, dat->fontModernInfo[id].hFont );
SetTextColor( hdc, dat->fontModernInfo[id].colour );
- if ( fontHeight )
+ if ( fontHeight )
*fontHeight = dat->fontModernInfo[id].fontHeight;
ske_ResetTextEffect( hdc );
if ( dat->hWnd == pcli->hwndContactTree && dat->fontModernInfo[id].effect != 0 )
ske_SelectTextEffect( hdc, dat->fontModernInfo[id].effect-1, dat->fontModernInfo[id].effectColour1, dat->fontModernInfo[id].effectColour2 );
- else
+ else
ske_ResetTextEffect( hdc );
return res;
@@ -171,7 +171,7 @@ int CLCPaint::GetBasicFontID(ClcContact *contact)
return FONTID_NOTONLIST;
if (( contact->flags&CONTACTF_INVISTO
&& _GetRealStatus( contact, ID_STATUS_OFFLINE ) != ID_STATUS_INVISIBLE )
- ||
+ ||
( contact->flags&CONTACTF_VISTO
&& _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ))
{
@@ -179,7 +179,7 @@ int CLCPaint::GetBasicFontID(ClcContact *contact)
// the contact is in the always invisible and the proto is in any other mode
return contact->flags & CONTACTF_ONLINE ? FONTID_INVIS : FONTID_OFFINVIS;
}
-
+
switch( pdnce___GetStatus( pdnce )) {
case ID_STATUS_OFFLINE: return FONTID_OFFLINE;
case ID_STATUS_AWAY: return FONTID_AWAY;
@@ -257,8 +257,8 @@ void CLCPaint::AddParam( MODERNMASK *mpModernMask, DWORD dwParamHash, const cha
BOOL CLCPaint::CheckMiniMode( ClcData *dat, BOOL selected, BOOL hot )
{
- if (( !dat->bCompactMode /* not mini*/ )
- || (( dat->bCompactMode&0x01 ) && selected /*mini on selected*/ )
+ if (( !dat->bCompactMode /* not mini*/ )
+ || (( dat->bCompactMode&0x01 ) && selected /*mini on selected*/ )
/* || ( TRUE && hot )*/ ) return FALSE;
return TRUE;
}
@@ -349,14 +349,14 @@ int CLCPaint::_GetGeneralisedStatus()
int status = ID_STATUS_OFFLINE;
int statusOnlineness = 0;
- for ( int i=0; i < pcli->hClcProtoCount; i++ )
+ for ( int i=0; i < pcli->hClcProtoCount; i++ )
{
int thisStatus = pcli->clcProto[i].dwStatus;
if ( thisStatus == ID_STATUS_INVISIBLE )
return ID_STATUS_INVISIBLE;
int thisOnlineness = _GetStatusOnlineness( thisStatus );
- if ( thisOnlineness > statusOnlineness )
+ if ( thisOnlineness > statusOnlineness )
{
status = thisStatus;
statusOnlineness = thisOnlineness;
@@ -366,8 +366,8 @@ int CLCPaint::_GetGeneralisedStatus()
}
int CLCPaint::_GetRealStatus( ClcContact *pContact, int nStatus )
-{
- if ( !pContact->proto )
+{
+ if ( !pContact->proto )
return nStatus;
for ( int i=0; i < pcli->hClcProtoCount; i++ )
@@ -513,7 +513,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT *free_rc, SIZE * text_size, TC
{
text_rc.top += ( row_height - fac_height ) >> 1;
- ske_DrawIconEx(hdcMem, text_rc.left, text_rc.top, piece->smiley,
+ ske_DrawIconEx(hdcMem, text_rc.left, text_rc.top, piece->smiley,
fac_width, fac_height, 0, NULL, DI_NORMAL|(( factor < 1 )?128:0 )); //TO DO enchance drawing quality
}
else
@@ -708,8 +708,8 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
if ( Drawing->type == CLCIT_CONTACT )
pdnce = pcli->pfnGetCacheEntry( Drawing->hContact );
- if ( Drawing->type == CLCIT_GROUP &&
- Drawing->group->parent->groupId == 0 &&
+ if ( Drawing->type == CLCIT_GROUP &&
+ Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
dg = dat->row_before_group_space;
@@ -760,7 +760,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
mode = ILD_NORMAL;
}
- if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
+ if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
_GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
@@ -818,7 +818,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
Drawing->pos_extra[iImage] = rc;
Drawing->pos_extra[iImage] = rc;
if (Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
+ ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
}
fr_rc.right -= x;
@@ -836,7 +836,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
ChangeToFont(hdcMem, dat, GetBasicFontID( Drawing ), NULL );
// Get text size
- GetTextSize( &text_size, hdcMem, fr_rc, Drawing->szText, Drawing->ssText.plText, uTextFormat,
+ GetTextSize( &text_size, hdcMem, fr_rc, Drawing->szText, Drawing->ssText.plText, uTextFormat,
dat->text_resize_smileys ? 0 : Drawing->ssText.iMaxSmileyHeight );
// counters
if ( Drawing->type == CLCIT_GROUP && InClistWindow )
@@ -913,7 +913,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
_SetHotTrackColour(hdcMem, dat );
if ( dat->text_rtl != 0 ) _RTLRect( &nameRect, free_row_rc.right, dx );
_DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
-
+
if (selected && !dat->filterSearch) {
SetTextColor(hdcMem, dat->quickSearchColour );
_DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -997,7 +997,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch);
if (p1)
- idx = int(p1 - lowered);
+ idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
_DrawTextSmiley(hdcMem, &text_rect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -1086,7 +1086,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch);
if (p1)
- idx = int(p1 - lowered);
+ idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
_DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -1258,7 +1258,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
if (( Drawing->type == CLCIT_GROUP && !dat->row_hide_group_icon )
|| ( Drawing->type == CLCIT_CONTACT && Drawing->iImage != -1
&& !( dat->icon_hide_on_avatar && dat->avatars_show
- && (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ && (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE )
)
&& !Drawing->image_is_special )))
@@ -1294,7 +1294,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
mode = ILD_NORMAL;
}
- if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
+ if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
_GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
@@ -1315,7 +1315,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
blendmode = 255;
else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
blendmode = 128;
- if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
+ if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
_GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
blendmode = 128;
if ( !hasAvatar ) //if no avatar then paint icon image
@@ -1343,7 +1343,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
mode = ILD_NORMAL;
}
- if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
+ if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
_GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
@@ -1442,13 +1442,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
{
UINT a = blendmode;
a = ( a << 24 );
- ske_ImageList_DrawEx( hAvatarOverlays, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].listID,
- hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
- CLR_NONE, CLR_NONE,
+ ske_ImageList_DrawEx( hAvatarOverlays, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].listID,
+ hdcMem,
+ p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
+ CLR_NONE, CLR_NONE,
( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
- //ske_DrawIconEx(hdcMem, p_rect.left, p_rect.top, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].icon,
+ //ske_DrawIconEx(hdcMem, p_rect.left, p_rect.top, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].icon,
// ICON_HEIGHT, ICON_HEIGHT, 0, NULL, DI_NORMAL|a );
break;
}
@@ -1456,15 +1456,15 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
{
int item = pcli->pfnIconFromStatusMode(Drawing->proto, Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus(Drawing->hContact), Drawing->hContact);
if (item != -1)
- _DrawStatusIcon(Drawing, dat, item, hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
+ _DrawStatusIcon(Drawing, dat, item, hdcMem,
+ p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
}
break;
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
if ( Drawing->iImage != -1 )
- _DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
+ _DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
+ p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
break;
}
@@ -1476,7 +1476,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
case TC_EXTRA:
{
- if ( Drawing->type == CLCIT_CONTACT &&
+ if ( Drawing->type == CLCIT_CONTACT &&
( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
@@ -1516,7 +1516,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
Drawing->pos_extra[iImage] = rc;
if (Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
+ ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
}
}
@@ -1532,7 +1532,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
case TC_EXTRA8:
case TC_EXTRA9:
{
- if ( Drawing->type == CLCIT_CONTACT &&
+ if ( Drawing->type == CLCIT_CONTACT &&
( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int eNum = gl_RowTabAccess[i]->type-TC_EXTRA1;
@@ -1560,7 +1560,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
if ( dat->text_rtl != 0 ) _RTLRect( &p_rect, free_row_rc.right, 0 );
Drawing->pos_extra[eNum] = p_rect;
if (Drawing->iExtraImage[eNum] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[eNum], hdcMem,
+ ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[eNum], hdcMem,
p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode );
}
}
@@ -1591,12 +1591,12 @@ void CLCPaint::_DrawStatusIcon( ClcContact *Drawing, ClcData *dat, int iImage, H
{
if ( Drawing->type != CLCIT_CONTACT )
{
- ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
+ ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
}
else if ( Drawing->image_is_special )
{
- ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
+ ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
}
else if ( iImage != -1 && HIWORD(iImage) && dat->drawOverlayedStatus )
@@ -1606,18 +1606,18 @@ void CLCPaint::_DrawStatusIcon( ClcContact *Drawing, ClcData *dat, int iImage, H
else if (status > ID_STATUS_OUTTOLUNCH) status = ID_STATUS_ONLINE;
ske_ImageList_DrawEx(g_himlCListClc, HIWORD(iImage), hdcMem, x, y, cx, cy, colorbg, colorfg, mode);
if (dat->drawOverlayedStatus & 2) //draw overlay
- ske_ImageList_DrawEx( hAvatarOverlays, g_pStatusOverlayIcons[status-ID_STATUS_OFFLINE].listID, hdcMem,
+ ske_ImageList_DrawEx( hAvatarOverlays, g_pStatusOverlayIcons[status-ID_STATUS_OFFLINE].listID, hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
}
else
{
- ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
+ ske_ImageList_DrawEx( g_himlCListClc, LOWORD(iImage), hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
}
}
BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT *rcPaint, RECT clRect, ClcData *dat )
-{
+{
if (!dat->hBmpBackground)
return FALSE;
@@ -1632,7 +1632,7 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT *rcPaint,
int maxx = dat->backgroundBmpUse&CLBF_TILEH?clRect.right:1;
int maxy = dat->backgroundBmpUse&CLBF_TILEV?maxy = rcPaint->bottom:y+1;
int destw, desth;
-
+
switch( dat->backgroundBmpUse&CLBM_TYPE ) {
case CLB_STRETCH:
if ( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
@@ -1662,7 +1662,7 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT *rcPaint,
if ( dat->backgroundBmpUse&CLBF_TILEVTOROWHEIGHT )
{
desth = dat->row_min_heigh;
- }
+ }
}
break;
@@ -1684,7 +1684,7 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT *rcPaint,
if ( dat->backgroundBmpUse&CLBF_TILEVTOROWHEIGHT )
{
desth = dat->row_min_heigh;
- }
+ }
break;
}
@@ -1720,7 +1720,7 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, ClcData *dat )
paintMode |= DM_GRAY;
if ( lStyle&CLS_GREYALTERNATE )
- paintMode |= DM_GREYALTERNATE;
+ paintMode |= DM_GREYALTERNATE;
return paintMode;
}
@@ -1761,9 +1761,9 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, ClcData *dat, HDC hdc, int paint
int gValue = GetRValue( pc.tmpbkcolour ) + gDelta;
int bValue = GetRValue( pc.tmpbkcolour ) + bDelta;
- BYTE brValue = ( rValue >255) ? 255 : rValue < 0 ? 0 : (BYTE)rValue;
- BYTE bgValue = ( gValue >255) ? 255 : gValue < 0 ? 0 : (BYTE)gValue;
- BYTE bbValue = ( bValue >255) ? 255 : bValue < 0 ? 0 : (BYTE)bValue;
+ BYTE brValue = ( rValue >255) ? 255 : rValue < 0 ? 0 : (BYTE)rValue;
+ BYTE bgValue = ( gValue >255) ? 255 : gValue < 0 ? 0 : (BYTE)gValue;
+ BYTE bbValue = ( bValue >255) ? 255 : bValue < 0 ? 0 : (BYTE)bValue;
pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue )));
}
@@ -1773,7 +1773,7 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, ClcData *dat, HDC hdc, int paint
SetStretchBltMode(pc.hdcMem, HALFTONE);
POINT org;
- GetBrushOrgEx( pc.hdcMem, &org );
+ GetBrushOrgEx( pc.hdcMem, &org );
SetBrushOrgEx( pc.hdcMem, org.x, org.y, NULL );
}
@@ -1792,7 +1792,7 @@ void CLCPaint::_DrawBackground( HWND hWnd, ClcData *dat, HDC hdc, int paintMode,
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
DeleteObject( hBrush );
- }
+ }
}
else {
if ( paintMode&DM_NON_LAYERED )
@@ -1829,7 +1829,7 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
}
}
- line_num++;
+ line_num++;
// Draw line, if needed
if ( y > rcPaint->top - dat->row_heights[line_num] )
@@ -1930,8 +1930,8 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
if ( selected || hottrack )
{
RECT mrc = row_rc;
- if ( Drawing->type == CLCIT_GROUP &&
- Drawing->group->parent->groupId == 0 &&
+ if ( Drawing->type == CLCIT_GROUP &&
+ Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
mrc.top += dat->row_before_group_space;
@@ -1955,10 +1955,10 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
}
else
- {
+ {
int checkboxWidth;
- if (( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
- ( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
+ if (( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
+ ( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
checkboxWidth = dat->checkboxSize+2;
else checkboxWidth = 0;
@@ -1967,14 +1967,14 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
switch ( dat->HiLightMode )
{
case 0:
- case 1:
+ case 1:
{
int i = y;
int row_height = row_rc.bottom-row_rc.top;
for ( i = y; i < y+row_height; i += max( dat->row_min_heigh, 1 ))
{
- ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 0, i, clRect.right,
- min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
+ ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 0, i, clRect.right,
+ min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
dat->exStyle&CLS_EX_NOTRANSLUCENTSEL?ILD_NORMAL:ILD_BLEND25 );
}
SetTextColor( pc.hdcMem, paintMode&DM_CONTROL ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour );
@@ -1987,8 +1987,8 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
int row_height = row_rc.bottom-row_rc.top-1;
for ( i = y+1; i < y+row_height; i += max( dat->row_min_heigh, 1 ))
{
- ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 1, i, clRect.right-2,
- min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
+ ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 1, i, clRect.right-2,
+ min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
dat->exStyle&CLS_EX_NOTRANSLUCENTSEL?ILD_NORMAL:ILD_BLEND25 );
}
SetTextColor( pc.hdcMem, paintMode&DM_CONTROL ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour );
@@ -1999,8 +1999,8 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
}
//**** Checkboxes
- if (( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
- ( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
+ if (( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
+ ( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
{
//RECT rc;
@@ -2030,8 +2030,8 @@ void CLCPaint::_DrawLines( HWND hWnd, ClcData *dat, HDC hdc, int paintMode, RECT
mpRequest->pl_Params[1].dwValueHash = mod_CalcHash("Ovl");
{
RECT mrc = row_rc;
- if ( Drawing->type == CLCIT_GROUP &&
- Drawing->group->parent->groupId == 0 &&
+ if ( Drawing->type == CLCIT_GROUP &&
+ Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
mrc.top += dat->row_before_group_space;
@@ -2172,10 +2172,10 @@ void CLCPaint::_PaintClc( HWND hwnd, ClcData *dat, HDC hdc, RECT *_rcPaint )
_DrawLines( hwnd, dat, hdc, paintMode, rcPaint, clRect, pc );
//insertion mark
- if ( dat->iInsertionMark != -1 )
+ if ( dat->iInsertionMark != -1 )
_DrawInsertionMark( dat, clRect, pc );
- // BitBlt from memory to destination
+ // BitBlt from memory to destination
_CopyPaintToDest( hwnd, dat, hdc, paintMode, rcPaint, clRect, pc );
// Free
@@ -2243,7 +2243,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
RECT rc;
int max_width;
int width;
- int height;
+ int height;
BOOL miniMode;
if ( !dat->avatars_show || Drawing->type != CLCIT_CONTACT )
break;
@@ -2267,11 +2267,11 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
RECT rc;
// Make rectangle
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, max_width, ICON_HEIGHT, HORIZONTAL_SPACE );
if ( rc.left < rc.right )
- {
+ {
/* center icon in avatar place */
if ( rc.right-rc.left>16 ) rc.left += (( ( rc.right-rc.left )-16 )>>1 );
if ( rc.bottom-rc.top>16 ) rc.top += (( ( rc.bottom-rc.top )-16 )>>1 );
@@ -2286,12 +2286,12 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
if (( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
// Make rectangle
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, max_width, max_width, dat->avatars_maxheight_size, HORIZONTAL_SPACE );
// Store position
//StoreItemPos( Drawing, CIT_AVATAR, &rc );
- //Drawing->pos_avatar = rc;
+ //Drawing->pos_avatar = rc;
}
}
break;
@@ -2310,7 +2310,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
}
// Make rectangle
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, width, max_width, height, HORIZONTAL_SPACE );
rc.top = max( free_row_rc.top, rc.top );
@@ -2327,7 +2327,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
{
RECT rc;
int iImage = -1;
- BOOL has_avatar = (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ BOOL has_avatar = (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ))
&& !( CheckMiniMode( dat, selected, hottrack ));
@@ -2340,7 +2340,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
// Don't have to draw, but has to keep the empty space?
if (( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, dat->iconXSpace, ICON_HEIGHT, HORIZONTAL_SPACE );
if ( rc.left < rc.right ) {
@@ -2353,8 +2353,8 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
if ( Drawing->type == CLCIT_CONTACT
&& dat->icon_hide_on_avatar
&& dat->icon_draw_on_avatar_space
- && ( !Drawing->image_is_special || !has_avatar ||
- (
+ && ( !Drawing->image_is_special || !has_avatar ||
+ (
dat->avatars_draw_overlay
&& dat->avatars_maxheight_size >= ICON_HEIGHT + (dat->avatars_draw_border ? 2 : 0)
&& GetContactCachedStatus(Drawing->hContact) - ID_STATUS_OFFLINE < SIZEOF(g_pAvatarOverlayIcons)
@@ -2376,7 +2376,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
if ( iImage != -1 )
{
// Make rectangle
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, dat->iconXSpace, ICON_HEIGHT, HORIZONTAL_SPACE );
if ( rc.left < rc.right )
@@ -2408,7 +2408,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
text_size.cx = rc.right - rc.left;
// Get rc
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos, left,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos, left,
text_size.cx, text_size.cx, text_size.cy, HORIZONTAL_SPACE );
if ( rc.left < rc.right )
@@ -2444,7 +2444,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
for ( iImage = dat->extraColumnsCount-1 ; iImage >= 0 ; iImage-- ) {
if ( Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON || !dat->MetaIgnoreEmptyExtra ) {
- rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->extraColumnSpacing, dat->extraColumnSpacing, ICON_HEIGHT, 0 );
if (rc.left < rc.right) {
// Store position
@@ -2457,7 +2457,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
// Add extra space
if ( count )
{
- _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
+ _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, HORIZONTAL_SPACE, HORIZONTAL_SPACE, ICON_HEIGHT, 0 );
}
}
@@ -2489,7 +2489,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
ChangeToFont(hdcMem, dat, GetBasicFontID( Drawing ), NULL );
// Get text size
- GetTextSize( &text_size, hdcMem, free_row_rc, Drawing->szText, Drawing->ssText.plText, uTextFormat,
+ GetTextSize( &text_size, hdcMem, free_row_rc, Drawing->szText, Drawing->ssText.plText, uTextFormat,
dat->text_resize_smileys ? 0 : Drawing->ssText.iMaxSmileyHeight );
// Get rect
@@ -2610,7 +2610,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
ChangeToFont(hdcMem, dat, FONTID_SECONDLINE, NULL );
// Get sizes
- GetTextSize( &second_line_text_size, hdcMem, free_row_rc, pdnce->szSecondLineText, pdnce->ssSecondLine.plText,
+ GetTextSize( &second_line_text_size, hdcMem, free_row_rc, pdnce->szSecondLineText, pdnce->ssSecondLine.plText,
uTextFormat, dat->text_resize_smileys ? 0 : pdnce->ssSecondLine.iMaxSmileyHeight );
// Get rect
@@ -2646,7 +2646,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
ChangeToFont(hdcMem, dat, FONTID_THIRDLINE, NULL );
// Get sizes
- GetTextSize( &third_line_text_size, hdcMem, free_row_rc, pdnce->szThirdLineText, pdnce->ssThirdLine.plText,
+ GetTextSize( &third_line_text_size, hdcMem, free_row_rc, pdnce->szThirdLineText, pdnce->ssThirdLine.plText,
uTextFormat, dat->text_resize_smileys ? 0 : pdnce->ssThirdLine.iMaxSmileyHeight );
// Get rect
@@ -2864,17 +2864,17 @@ void CLCPaint::_GetBlendMode( IN ClcData *dat, IN ClcContact *Drawing, IN BOOL s
colourFg = dat->selBkColour;
mode = ILD_NORMAL;
}
- if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE &&
+ if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE &&
( bFlag&GIM_IDLE_AFFECT )
- )
+ )
mode = ILD_SELECTED;
if ( OutColourFg ) *OutColourFg = colourFg;
- if ( OutMode )
+ if ( OutMode )
{
if ( OutColourFg ) *OutMode = mode; //return ILD_MODE if color requested
- else *OutMode =
- ( mode == ILD_BLEND50 )?128 :
+ else *OutMode =
+ ( mode == ILD_BLEND50 )?128 :
( mode == ILD_BLEND25 )?64 :
255; //return alpha otherwise
}
@@ -2904,12 +2904,12 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, ClcData *dat, ClcContact *Drawing
_GetBlendMode( dat, Drawing, selected, hottrack, GIM_AVATAR_AFFECT, NULL, &blendmode );
AniAva_SetAvatarPos( Drawing->hContact, prcItem, overlayIdx, blendmode );
AniAva_RenderAvatar( Drawing->hContact, hdcMem, prcItem );
- }
+ }
else if ( Drawing->avatar_pos>AVATAR_POS_DONT_HAVE )
{
int round_radius = 0;
HRGN rgn;
- int blendmode = 255;
+ int blendmode = 255;
_GetBlendMode( dat, Drawing, selected, hottrack, GIM_AVATAR_AFFECT, NULL, &blendmode );
@@ -2966,25 +2966,25 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, ClcData *dat, ClcContact *Drawing
}
switch( dat->avatars_overlay_type ) {
case SETTING_AVATAR_OVERLAY_TYPE_NORMAL:
- ske_ImageList_DrawEx( hAvatarOverlays, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].listID,
- hdcMem,
- ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
- CLR_NONE, CLR_NONE,
+ ske_ImageList_DrawEx( hAvatarOverlays, g_pAvatarOverlayIcons[GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE].listID,
+ hdcMem,
+ ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
+ CLR_NONE, CLR_NONE,
( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
break;
case SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL:
{
int item = pcli->pfnIconFromStatusMode(Drawing->proto, Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus(Drawing->hContact), Drawing->hContact);
if ( item != -1 )
- _DrawStatusIcon( Drawing, dat, item, hdcMem,
- ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
+ _DrawStatusIcon( Drawing, dat, item, hdcMem,
+ ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
}
break;
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
if ( Drawing->iImage != -1 )
- _DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
- ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
+ _DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
+ ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
break;
}
@@ -3011,8 +3011,8 @@ void CLCPaint::_DrawContactIcon( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
COLORREF colourFg;
int mode;
_GetBlendMode( dat, Drawing, selected, hottrack, GIM_STATUSICON_AFFECT, &colourFg, &mode );
- _DrawStatusIcon( Drawing, dat, iImage, hdcMem,
- prcItem->left, prcItem->top,
+ _DrawStatusIcon( Drawing, dat, iImage, hdcMem,
+ prcItem->left, prcItem->top,
0, 0, CLR_NONE, colourFg, mode );
}
}
@@ -3040,7 +3040,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
text_size.cy = _rcHeight( prcItem );
uTextFormat |= DT_VCENTER;
//get font
- _DrawTextSmiley(hdcMem, prcItem, &text_size, Drawing->szText, 0, -1, Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, prcItem, &text_size, Drawing->szText, 0, -1, Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' )
{
int idx = 0;
@@ -3049,7 +3049,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch);
if (p1)
- idx = int(p1 - lowered);
+ idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
_DrawTextSmiley(hdcMem, prcItem, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -3063,7 +3063,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
text_rc.left = min( text_rc.left, prcItem->left );
}
void CLCPaint::_DrawContactSubText( HDC hdcMem, ClcData *dat, ClcContact *Drawing, int& selected, int& hottrack, RECT& text_rc, RECT *prcItem, UINT uTextFormat, BYTE itemType )
-{
+{
if ( Drawing->type == CLCIT_GROUP )
{
char * szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
@@ -3078,7 +3078,7 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, ClcData *dat, ClcContact *Drawin
_SetHotTrackColour(hdcMem, dat );
ske_DrawTextA(hdcMem, szCounts, -1, prcItem, uTextFormat );
ske_ResetTextEffect(hdcMem );
- }
+ }
}
else if ( Drawing->type == CLCIT_CONTACT )
{
@@ -3093,9 +3093,9 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, ClcData *dat, ClcContact *Drawin
_SetHotTrackColour(hdcMem, dat );
uTextFormat |= DT_VCENTER;
if ( itemType == CIT_SUBTEXT1 )
- _DrawTextSmiley(hdcMem, prcItem, &text_size, pdnce->szSecondLineText, 0, -1, pdnce->ssSecondLine.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, prcItem, &text_size, pdnce->szSecondLineText, 0, -1, pdnce->ssSecondLine.plText, uTextFormat, dat->text_resize_smileys );
else
- _DrawTextSmiley(hdcMem, prcItem, &text_size, pdnce->szThirdLineText, 0, -1, pdnce->ssThirdLine.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, prcItem, &text_size, pdnce->szThirdLineText, 0, -1, pdnce->ssThirdLine.plText, uTextFormat, dat->text_resize_smileys );
}
}
text_rc.right = max( text_rc.right, prcItem->right );
@@ -3135,7 +3135,7 @@ void CLCPaint::_DrawContactExtraIcon( HDC hdcMem, ClcData *dat, ClcContact *Draw
COLORREF colourFg;
_GetBlendMode( dat, Drawing, selected, hottrack, GIM_EXTRAICON_AFFECT, &colourFg, &mode );
if (Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
+ ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc->left, rc->top, 0, 0, CLR_NONE, colourFg, mode );
}
}
@@ -3150,10 +3150,10 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
rc1.bottom = rc1.top + 2;
rc2.top += ( rc2.bottom - rc2.top ) >> 1;
rc2.bottom = rc2.top + 2;
- {
+ {
RECT rcTemp = rc1;
IntersectRect( &rc1, &rcTemp, rcPaint );
- }
+ }
{ //Subtract icon rect from left and right.
RECT rcTemp;
@@ -3168,10 +3168,10 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
DrawEdge(hdcMem, &rc1, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque(hdcMem, &rc1 );
}
- {
+ {
RECT rcTemp = rc2;
IntersectRect( &rc2, &rcTemp, rcPaint );
- }
+ }
if ( rc2.right-rc2.left >= 6 && !IsRectEmpty( &rc2 ))
{
DrawEdge(hdcMem, &rc2, BDR_SUNKENOUTER, BF_RECT );
@@ -3182,9 +3182,9 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT *row_rc, RECT *free_row_rc, int left_pos, int right_pos, int selected, int hottrack, RECT *rcPaint )
{
UINT uTextFormat = DT_NOPREFIX |
- /*DT_VCENTER |*/
- DT_SINGLELINE |
- ( dat->text_rtl ? DT_RTLREADING : 0 ) |
+ /*DT_VCENTER |*/
+ DT_SINGLELINE |
+ ( dat->text_rtl ? DT_RTLREADING : 0 ) |
( dat->text_align_right ? DT_RIGHT : 0 )|
( gl_TrimText?DT_END_ELLIPSIS:0 )|
(( dat->force_in_dialog || dat->bkChanged ) ? DT_FORCENATIVERENDER:0 );
@@ -3204,7 +3204,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContac
case CIT_AVATAR:
_DrawContactAvatar(hdcMem, dat, Drawing, row_rc, selected, hottrack, text_rc, prcItem );
break;
- case CIT_ICON:
+ case CIT_ICON:
_DrawContactIcon(hdcMem, dat, Drawing, selected, hottrack, text_rc, prcItem );
break;
case CIT_TEXT:
@@ -3250,7 +3250,7 @@ void CLCPaint::_PaintRowItems ( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
ske_ResetTextEffect(hdcMem );
}
-/* TODO Render items
+/* TODO Render items
V avatar
V avatars overlays
@@ -3265,7 +3265,7 @@ V groups and divider lines
Milestones to implement Extended row layout
- 1. Implement separate Row item position calculation and drawing
-V a. Separation of painting and positions calculation
+V a. Separation of painting and positions calculation
V b. Use Items rect array for hit test
. c. Calculate row height via appropriate function
. d. Invalidate row items only when needed
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 3fb5c65ab8..64670b9e97 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_commonprototypes.h"
@@ -59,10 +61,10 @@ int cliHitTest(HWND hwnd,ClcData *dat,int testx,int testy,ClcContact **contact,C
return -1;
}
- // Get hit item
+ // Get hit item
hit = cliRowHitTest(dat, dat->yScroll + testy);
- if (hit != -1)
+ if (hit != -1)
hit = cliGetRowByIndex(dat, hit, &hitcontact, &hitgroup);
if (hit == -1) {
@@ -73,26 +75,26 @@ int cliHitTest(HWND hwnd,ClcData *dat,int testx,int testy,ClcContact **contact,C
if (group) *group = hitgroup;
/////////
- if (((testx < hitcontact->pos_indent) && !dat->text_rtl) ||
- ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl))
+ if (((testx < hitcontact->pos_indent) && !dat->text_rtl) ||
+ ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl))
{
if (flags) *flags |= CLCHT_ONITEMINDENT;
return hit;
}
- if (RectHitTest(&hitcontact->pos_check, testx, testy))
+ if (RectHitTest(&hitcontact->pos_check, testx, testy))
{
if (flags) *flags |= CLCHT_ONITEMCHECK;
return hit;
}
- if (RectHitTest(&hitcontact->pos_avatar, testx, testy))
+ if (RectHitTest(&hitcontact->pos_avatar, testx, testy))
{
if (flags) *flags |= CLCHT_ONITEMICON;
return hit;
}
- if (RectHitTest(&hitcontact->pos_icon, testx, testy))
+ if (RectHitTest(&hitcontact->pos_icon, testx, testy))
{
if (flags) *flags |= CLCHT_ONITEMICON;
return hit;
@@ -103,9 +105,9 @@ int cliHitTest(HWND hwnd,ClcData *dat,int testx,int testy,ClcContact **contact,C
{
// int c = -1;
int i;
- for (i=0; i < dat->extraColumnsCount; i++)
- {
- if (RectHitTest(&hitcontact->pos_extra[i], testx, testy))
+ for (i=0; i < dat->extraColumnsCount; i++)
+ {
+ if (RectHitTest(&hitcontact->pos_extra[i], testx, testy))
{
if (flags) *flags |= CLCHT_ONITEMEXTRA|(i << 24);
return hit;
@@ -119,7 +121,7 @@ int cliHitTest(HWND hwnd,ClcData *dat,int testx,int testy,ClcContact **contact,C
return hit;
}
- if (RectHitTest(&hitcontact->pos_label, testx, testy))
+ if (RectHitTest(&hitcontact->pos_label, testx, testy))
{
if (flags) *flags |= CLCHT_ONITEMLABEL;
return hit;
@@ -160,7 +162,7 @@ void cliScrollTo(HWND hwnd,ClcData *dat,int desty,int noSmooth)
| GetKeyState( VK_HOME )
| GetKeyState( VK_END )) & 0x8000 );
- if ( !noSmooth && !keyDown)
+ if ( !noSmooth && !keyDown)
{
startTick = GetTickCount();
for (;;) {
@@ -171,12 +173,12 @@ void cliScrollTo(HWND hwnd,ClcData *dat,int desty,int noSmooth)
ScrollWindowEx(hwnd, 0, previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE);
else
{
- CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM) hwnd, (LPARAM) 0);
+ CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM) hwnd, (LPARAM) 0);
//InvalidateRectZ(hwnd,NULL,FALSE);
}
previousy = dat->yScroll;
SetScrollPos(hwnd,SB_VERT,dat->yScroll,TRUE);
- CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM) hwnd, (LPARAM) 0);
+ CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM) hwnd, (LPARAM) 0);
UpdateWindow(hwnd);
}
}
@@ -221,8 +223,8 @@ void cliRecalcScrollBar(HWND hwnd,ClcData *dat)
if ( GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
if ( dat->noVScrollbar == 0 ) SetScrollInfo(hwnd,SB_VERT,&si,TRUE);
//else SetScrollInfo(hwnd,SB_VERT,&si,FALSE);
- }
- else
+ }
+ else
SetScrollInfo(hwnd,SB_VERT,&si,TRUE);
g_mutex_bSizing = 1;
cliScrollTo(hwnd,dat,dat->yScroll,1);
@@ -276,7 +278,7 @@ void cliBeginRenameSelection(HWND hwnd,ClcData *dat)
if (contact->type == CLCIT_CONTACT && contact->isSubcontact)
subident = dat->subIndent;
- else
+ else
subident = 0;
for (indent = 0;group->parent;indent++,group = group->parent);
@@ -290,12 +292,12 @@ void cliBeginRenameSelection(HWND hwnd,ClcData *dat)
for (i=0; i <= FONTID_MODERN_MAX; i++)
if (h < dat->fontModernInfo[i].fontHeight+4) h = dat->fontModernInfo[i].fontHeight+4;
}
- //TODO contact->pos_label
+ //TODO contact->pos_label
{
- RECT rectW;
+ RECT rectW;
int h2;
GetWindowRect(hwnd,&rectW);
// w = contact->pos_full_first_row.right-contact->pos_full_first_row.left;
@@ -379,21 +381,21 @@ int GetDropTargetInformation(HWND hwnd,ClcData *dat,POINT pt)
topItem = cliGetRowByIndex(dat,topItem,&topcontact,&topgroup);
ok = 1;
} else if ((pt.y+dat->yScroll >= cliGetRowTopY(dat,hit+1)-dat->insertionMarkHitHeight)
- || (contact->type == CLCIT_GROUP && contact->group->expanded && contact->group->cl.count>0))
+ || (contact->type == CLCIT_GROUP && contact->group->expanded && contact->group->cl.count>0))
{
//could be insertion mark (below)
topItem = hit; bottomItem = hit+1;
topcontact = contact; topgroup = group;
bottomItem = cliGetRowByIndex(dat,bottomItem,&bottomcontact,&bottomgroup);
- ok = 1;
+ ok = 1;
}
if (ok)
{
if (bottomItem == -1 && contact->type == CLCIT_GROUP)
{
bottomItem = topItem+1;
- }
- else
+ }
+ else
{
if (bottomItem == -1 && contact->type != CLCIT_GROUP && contact->groupId == 0)
{
@@ -403,7 +405,7 @@ int GetDropTargetInformation(HWND hwnd,ClcData *dat,POINT pt)
if (bottomItem != -1 && bottomcontact->type != CLCIT_GROUP)
{
ClcGroup *gr = bottomgroup;
- do
+ do
{
bottomItem = cliGetRowByIndex(dat,bottomItem-1,&bottomcontact,&bottomgroup);}
while (bottomItem >= 0 && bottomcontact->type != CLCIT_GROUP && bottomgroup == gr);
@@ -417,35 +419,35 @@ int GetDropTargetInformation(HWND hwnd,ClcData *dat,POINT pt)
int bi = cliGetRowByIndex(dat,bottomItem,&bottomcontact,&bottomgroup);
if (bi != -1)
{
- group = bottomgroup;
+ group = bottomgroup;
if (bottomcontact == movecontact || group == movecontact->group) return DROPTARGET_ONSELF;
dat->nInsertionLevel = -1; // decreasing here
for (;group;group = group->parent)
- {
+ {
dat->nInsertionLevel++;
if (group == movecontact->group) return DROPTARGET_ONSELF;
}
}
- }
+ }
dat->iInsertionMark = bottomItem;
dat->selection = nSetSelection;
return DROPTARGET_INSERTION;
}
}
- if (contact->type == CLCIT_GROUP)
+ if (contact->type == CLCIT_GROUP)
{
- if (dat->iInsertionMark == -1)
+ if (dat->iInsertionMark == -1)
{
- if (movecontact->type == CLCIT_GROUP)
+ if (movecontact->type == CLCIT_GROUP)
{ //check not moving onto its own subgroup
dat->iInsertionMark = hit+1;
- for (;group;group = group->parent)
+ for (;group;group = group->parent)
{
dat->nInsertionLevel++;
if (group == movecontact->group) return DROPTARGET_ONSELF;
}
}
- dat->selection = hit;
+ dat->selection = hit;
return DROPTARGET_ONGROUP;
}
}
@@ -465,11 +467,11 @@ void RegisterCLUIFonts( void );
void LoadCLCFonts( HWND hwnd, ClcData *dat )
{
RegisterCLUIFonts();
-
+
HDC hdc = GetDC(hwnd);
HFONT holdfont = (HFONT)GetCurrentObject( hdc, OBJ_FONT );
-
- for ( int i=0 ; i <= FONTID_MODERN_MAX; i++ )
+
+ for ( int i=0 ; i <= FONTID_MODERN_MAX; i++ )
{
if ( !dat->fontModernInfo[i].changed && dat->fontModernInfo[i].hFont )
{
@@ -493,11 +495,11 @@ void LoadCLCFonts( HWND hwnd, ClcData *dat )
}
void LoadCLCOptions(HWND hwnd, ClcData *dat )
-{
+{
int i;
g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
-
+
LoadCLCFonts( hwnd, dat );
g_CluiData.bSortByOrder[0] = db_get_b(NULL,"CList","SortBy1",SETTING_SORTBY1_DEFAULT);
@@ -508,7 +510,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat )
// Row
dat->row_min_heigh = db_get_w(NULL,"CList","MinRowHeight",CLCDEFAULT_ROWHEIGHT);
dat->row_border = db_get_w(NULL,"CList","RowBorder",SETTING_ROWBORDER_DEFAULT);
- dat->row_before_group_space = ((hwnd != pcli->hwndContactTree && pcli->hwndContactTree != NULL)
+ dat->row_before_group_space = ((hwnd != pcli->hwndContactTree && pcli->hwndContactTree != NULL)
|| !db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT))?0:db_get_w(NULL,"ModernSkin","SpaceBeforeGroup",SKIN_SPACEBEFOREGROUP_DEFAULT);
dat->row_variable_height = db_get_b(NULL,"CList","VariableRowHeight",SETTING_VARIABLEROWHEIGHT_DEFAULT);
dat->row_align_left_items_to_left = db_get_b(NULL,"CList","AlignLeftItemsToLeft",SETTING_ALIGNLEFTTOLEFT_DEFAULT);
@@ -702,33 +704,33 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat )
if (dat->hBmpBackground) {DeleteObject(dat->hBmpBackground); dat->hBmpBackground = NULL;}
if (dat->hMenuBackground) {DeleteObject(dat->hMenuBackground); dat->hMenuBackground = NULL;}
-
+
dat->useWindowsColours = db_get_b(NULL, "CLC", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
if (g_CluiData.fDisableSkinEngine)
{
DBVARIANT dbv;
- if ( !dat->bkChanged)
+ if ( !dat->bkChanged)
{
dat->bkColour = sttGetColor("CLC","BkColour",GetSysColor(COLOR_3DFACE));
- {
- if ( db_get_b(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP))
+ {
+ if ( db_get_b(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP))
{
- if ( !db_get_s(NULL,"CLC","BkBitmap",&dbv))
+ if ( !db_get_s(NULL,"CLC","BkBitmap",&dbv))
{
- dat->hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal);
- db_free(&dbv);
+ dat->hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal);
+ db_free(&dbv);
}
}
}
dat->backgroundBmpUse = db_get_w(NULL,"CLC","BkBmpUse",CLCDEFAULT_BKBMPUSE);
- }
+ }
dat->MenuBkColor = sttGetColor("Menu","BkColour",CLCDEFAULT_BKCOLOUR);
dat->MenuBkHiColor = sttGetColor("Menu","SelBkColour",CLCDEFAULT_SELBKCOLOUR);
dat->MenuTextColor = sttGetColor("Menu","TextColour",CLCDEFAULT_TEXTCOLOUR);
dat->MenuTextHiColor = sttGetColor("Menu","SelTextColour",CLCDEFAULT_MODERN_SELTEXTCOLOUR);
-
+
if ( db_get_b(NULL,"Menu","UseBitmap",CLCDEFAULT_USEBITMAP)) {
if ( !db_get_s(NULL,"Menu","BkBitmap",&dbv)) {
dat->hMenuBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal);
@@ -737,7 +739,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat )
}
dat->MenuBmpUse = db_get_w(NULL,"Menu","BkBmpUse",CLCDEFAULT_BKBMPUSE);
}
-
+
dat->greyoutFlags = db_get_dw(NULL,"CLC","GreyoutFlags",CLCDEFAULT_GREYOUTFLAGS);
dat->offlineModes = db_get_dw(NULL,"CLC","OfflineModes",CLCDEFAULT_OFFLINEMODES);
dat->selBkColour = sttGetColor("CLC","SelBkColour",CLCDEFAULT_SELBKCOLOUR);
@@ -745,7 +747,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat )
dat->hotTextColour = db_get_dw(NULL,"CLC","HotTextColour",CLCDEFAULT_MODERN_HOTTEXTCOLOUR);
dat->quickSearchColour = db_get_dw(NULL,"CLC","QuickSearchColour",CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR);
if ( !g_szMetaModuleName && ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
- dat->IsMetaContactsEnabled = (!(GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
+ dat->IsMetaContactsEnabled = (!(GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
g_szMetaModuleName && db_get_b(NULL,g_szMetaModuleName,"Enabled",1) && ServiceExists(MS_MC_GETDEFAULTCONTACT);
if (pcli->hwndContactTree == NULL || dat->hWnd == pcli->hwndContactTree)
@@ -755,7 +757,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat )
dat->expandMeta = db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
dat->useMetaIcon = db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT);
-
+
dat->drawOverlayedStatus = db_get_b(NULL,"CLC","DrawOverlayedStatus",SETTING_DRAWOVERLAYEDSTATUS_DEFAULT);
dat->dbbMetaHideExtra = db_get_b(NULL,"CLC","MetaHideExtra",SETTING_METAHIDEEXTRA_DEFAULT);
@@ -787,7 +789,7 @@ int ExpandMetaContact(HWND hwnd, ClcContact *contact, ClcData *dat, BOOL bExpand
contact->SubExpanded = bExpand;
db_set_b(contact->hContact,"CList","Expanded",contact->SubExpanded);
dat->needsResort = 1;
- pcli->pfnSortCLC(hwnd,dat,1);
+ pcli->pfnSortCLC(hwnd,dat,1);
cliRecalcScrollBar(hwnd,dat);
return contact->SubExpanded;
}
@@ -809,8 +811,8 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
continue;
}
contact = group->cl.items[group->scanIndex];
- if (contact->type != CLCIT_DIVIDER)
- {
+ if (contact->type != CLCIT_DIVIDER)
+ {
bool found;
if (dat->filterSearch) {
TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(contact->szText));
@@ -826,7 +828,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
pcli->pfnSetGroupExpand(hwnd, dat, group, 1);
return pcli->pfnGetRowsPriorTo(&dat->list, contactGroup, contactScanIndex+SubCount);
}
- if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP)
+ if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP)
{
if ( !(dat->exStyle & CLS_EX_QUICKSEARCHVISONLY) || group->cl.items[group->scanIndex]->group->expanded) {
group = group->cl.items[group->scanIndex]->group;
@@ -836,7 +838,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
}
}
}
- if (contact->type == CLCIT_CONTACT && contact->SubAllocated)
+ if (contact->type == CLCIT_CONTACT && contact->SubAllocated)
{
if ( !(dat->exStyle & CLS_EX_QUICKSEARCHVISONLY) || contact->SubExpanded )
{
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 0f41e16dcf..511efe34aa 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "m_clui.h"
#include "hdr/modern_clist.h"
@@ -115,7 +117,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID;
if (p->cle.pszService && ( !strncmp("SRMsg/ReadMessage", p->cle.pszService, SIZEOF("SRMsg/ReadMessage"))
|| !strncmp("GChat/DblClickEvent", p->cle.pszService, SIZEOF("GChat/DblClickEvent"))))
-
+
{
// dup check only for msg events
for (j = 0; j < GetMenuItemCount(g_CluiData.hMenuNotify); j++) {
@@ -153,9 +155,9 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
g_CluiData.iIconNotify = p->imlIconIndex;
}
}
- }
+ }
- else if (p->cle.hContact != 0 && (p->cle.flags & CLEF_ONLYAFEW))
+ else if (p->cle.hContact != 0 && (p->cle.flags & CLEF_ONLYAFEW))
{
g_CluiData.iIconNotify = p->imlIconIndex;
g_CluiData.hUpdateContact = p->cle.hContact;
@@ -169,7 +171,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
}
CLUI__cliInvalidateRect(g_CluiData.hwndEventFrame, NULL, FALSE);
}
-
+
return p;
}
@@ -180,9 +182,9 @@ int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent)
int res = 0;
// Find the event that should be removed
- for (i=0; i < pcli->events.count; i++)
+ for (i=0; i < pcli->events.count; i++)
{
- if ((pcli->events.items[i]->cle.hContact == hContact) && (pcli->events.items[i]->cle.hDbEvent == hDbEvent))
+ if ((pcli->events.items[i]->cle.hContact == hContact) && (pcli->events.items[i]->cle.hDbEvent == hDbEvent))
{
break;
}
@@ -202,8 +204,8 @@ int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent)
if (nmi && nmi->hContact == hContact && nmi->hDbEvent == hDbEvent) {
free(nmi);
DeleteMenu(g_CluiData.hMenuNotify, pcli->events.items[i]->menuId, MF_BYCOMMAND);
- }
- }
+ }
+ }
}
res = corecli.pfnRemoveEvent(hContact, hDbEvent);
@@ -243,19 +245,19 @@ static BOOL sttDrawEventAreaBackground(HWND hwnd, HDC hdc, RECT *rect)
{
BOOL bFloat = (GetParent(hwnd) != pcli->hwndContactList);
if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat)
- {
+ {
RECT rc;
if (rect) rc = *rect;
else GetClientRect(hwnd,&rc);
if ( !event_area.hBmpBackground && !event_area.useWinColors)
- {
+ {
HBRUSH hbr = CreateSolidBrush(event_area.bkColour);
FillRect(hdc, &rc, hbr);
DeleteObject(hbr);
}
- else
+ else
{
DrawBackGround(hwnd,hdc,event_area.hBmpBackground,event_area.bkColour,event_area.backgroundBmpUse);
}
@@ -267,9 +269,9 @@ COLORREF sttGetColor(char * module, char * color, COLORREF defColor); //clcutils
static int ehhEventAreaBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- if (event_area.hBmpBackground)
+ if (event_area.hBmpBackground)
{
- DeleteObject(event_area.hBmpBackground);
+ DeleteObject(event_area.hBmpBackground);
event_area.hBmpBackground = NULL;
}
if (g_CluiData.fDisableSkinEngine)
@@ -284,7 +286,7 @@ static int ehhEventAreaBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam)
}
event_area.useWinColors = db_get_b(NULL, "EventArea", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
event_area.backgroundBmpUse = db_get_w(NULL, "EventArea", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
- }
+ }
PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0);
return 0;
}
@@ -310,7 +312,7 @@ void EventArea_ConfigureEventArea()
static int EventArea_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, DWORD dFlags, void * CallBackData)
{
- return EventArea_Draw(hWnd,hDC);
+ return EventArea_Draw(hWnd,hDC);
}
static int EventArea_Draw(HWND hwnd, HDC hDC)
@@ -327,7 +329,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
{
RECT rc;
HFONT hOldFont;
- GetClientRect(hWnd,&rc);
+ GetClientRect(hWnd,&rc);
if ( g_CluiData.fDisableSkinEngine )
sttDrawEventAreaBackground( hWnd, hDC, &rc );
else
@@ -337,7 +339,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
SetBkMode(hDC,TRANSPARENT);
int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);
- rc.left += 26;
+ rc.left += 26;
if (g_CluiData.hUpdateContact != 0) {
TCHAR *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
int iIcon = cli_GetContactIcon(g_CluiData.hUpdateContact);
@@ -363,7 +365,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
rc.left += 18;
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, hDC, 4, (rc.bottom + rc.top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
ske_DrawText(hDC, szName, -1, &rc, DT_VCENTER | DT_SINGLELINE);
- }
+ }
else {
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0);
ske_DrawText(hDC, g_CluiData.szNoEvents, lstrlen(g_CluiData.szNoEvents), &rc, DT_VCENTER | DT_SINGLELINE);
@@ -402,7 +404,7 @@ int EventArea_Create(HWND hCluiWnd)
{
CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("Event Area Background")"/EventArea"),0);
- HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhEventAreaBackgroundSettingsChanged);
+ HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhEventAreaBackgroundSettingsChanged);
ehhEventAreaBackgroundSettingsChanged(0, 0);
WNDCLASS wndclass = {0};
@@ -470,7 +472,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
return TRUE;
}
}
- }
+ }
break;
case WM_DRAWITEM:
@@ -485,7 +487,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
if (GetMenuItemInfoA(g_CluiData.hMenuNotify, (UINT) dis->itemID, FALSE, &mii) != 0) {
nmi = (NotifyMenuItemExData *) mii.dwItemData;
if (nmi) {
- int iIcon = cli_GetContactIcon(nmi->hContact);
+ int iIcon = cli_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, dis->hDC, 2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, dis->hDC, 2+GetSystemMetrics(SM_CXSMICON)+2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
return TRUE;
@@ -556,7 +558,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
hdc = GetDC(hwnd);
hdc2 = CreateCompatibleDC(hdc);
hbmp = ske_CreateDIB32(rc.right,rc.bottom);
- hbmpo = (HBITMAP)SelectObject(hdc2,hbmp);
+ hbmpo = (HBITMAP)SelectObject(hdc2,hbmp);
ske_BltBackImage(hwnd,hdc2,&rc);
EventArea_DrawWorker(hwnd,hdc2);
BitBlt(hdc,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index 354a9ce843..9516654e00 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "m_genmenu.h"
@@ -65,7 +67,7 @@ void UninitCustomMenus(void)
//////////////////////////////////////////////////////////////////////////
#define CLUI_FAVSETRATE "CLUI/SetContactRate" //LParam is rate, Wparam is contact handle
-#define CLUI_FAVTOGGLESHOWOFFLINE "CLUI/ToggleContactShowOffline"
+#define CLUI_FAVTOGGLESHOWOFFLINE "CLUI/ToggleContactShowOffline"
static HGENMENU hFavoriteContactMenu = NULL;
static HGENMENU *hFavoriteContactMenuItems = NULL;
@@ -79,7 +81,7 @@ static TCHAR *rates[] = {
LPGENT("None"),
LPGENT("Low"),
LPGENT("Medium"),
- LPGENT("High")
+ LPGENT("High")
};
static IconItem iconList[] =
@@ -108,14 +110,14 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
int bufsize = (lstrlen(FAVMENUROOTNAME)+lstrlen(rates[bContactRate])+15)*sizeof(TCHAR);
TCHAR *name = (TCHAR*)_alloca(bufsize);
mir_sntprintf(name, bufsize/sizeof(TCHAR), _T("%s (%s)"),FAVMENUROOTNAME,rates[bContactRate]);
- mi.ptszName = name;
+ mi.ptszName = name;
}
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
- if ( !hFavoriteContactMenu)
+ if ( !hFavoriteContactMenu)
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
else {
mi.flags |= CMIM_FLAGS | CMIM_NAME;
- Menu_ModifyItem(hFavoriteContactMenu, &mi);
+ Menu_ModifyItem(hFavoriteContactMenu, &mi);
bModifyMenu = TRUE;
}
@@ -153,7 +155,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
mi.position = -100000000;
if (bModifyMenu && hShowIfOflineItem) {
mi.flags |= CMIM_FLAGS | CMIM_ICON;
- Menu_ModifyItem(hShowIfOflineItem, &mi);
+ Menu_ModifyItem(hShowIfOflineItem, &mi);
}
else hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
@@ -193,7 +195,7 @@ int UnloadFavoriteContactMenu()
if (hFavoriteContactMenu)
CallService(MO_REMOVEMENUITEM,(WPARAM)hFavoriteContactMenu,0);
- hFavoriteContactMenu = NULL;
+ hFavoriteContactMenu = NULL;
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index fd2e204e89..9d0e654fb4 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
@@ -171,8 +173,8 @@ HRESULT CluiLoadModule()
CreateServiceFunction("ModernSkinSel/Active", SvcActiveSkin);
CreateServiceFunction("ModernSkinSel/Preview", SvcPreviewSkin);
CreateServiceFunction("ModernSkinSel/Apply", SvcApplySkin);
-
- HookEvent(ME_DB_CONTACT_ADDED,ContactAdded);
+
+ HookEvent(ME_DB_CONTACT_ADDED,ContactAdded);
CreateServiceFunction(MS_CLIST_TOGGLEHIDEOFFLINE,ToggleHideOffline);
@@ -183,7 +185,7 @@ HRESULT CluiLoadModule()
hCListImages = ImageList_Create(16, 16, ILC_MASK|ILC_COLOR32, 32, 0);
InitCustomMenus();
InitTrayMenus();
-
+
CLUI::InitClui();
return S_OK;
}
@@ -222,13 +224,13 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (iStepY <= 0) iStepY = 16;
HWND hwndFocused = GetFocus();
-
+
if ( IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
-
+
if ( db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT) || !db_get_b(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
return GWVS_VISIBLE;
-
+
if ( hwndFocused == pcli->hwndContactList || GetParent(hwndFocused) == pcli->hwndContactList )
return GWVS_VISIBLE;
@@ -294,7 +296,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
a = ((a*g_CluiData.bCurrentAlpha)>>8);
po = (a>16);
}
-
+
if (po || (!rgn && ptr == 0)) {
BOOL hWndFound = FALSE;
HWND hAuxOld = NULL;
@@ -400,7 +402,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam)
RECT rcWindow;
GetWindowRect(pcli->hwndContactList,&rcWindow);
if (Utils_AssertInsideScreen(&rcWindow) == 1)
- MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
+ MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
else { //It needs to be hidden
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index 04d6a8397b..8367508228 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "m_clui.h"
#include "hdr/modern_clist.h"
@@ -103,7 +105,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
if (LOWORD(wParam) == IDC_UP) {
if (HIWORD(wParam) != BN_CLICKED)
return 0;
-
+
HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
int pos = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
if (pos == LB_ERR)
@@ -242,7 +244,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
TranslateDialogDefault(hwndDlg);
CheckDlgButton(hwndDlg, IDC_SHOW_AVATARS, db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hwndDlg, IDC_SHOW_ANIAVATARS, db_get_b(NULL,"CList","AvatarsAnimated", ServiceExists(MS_AV_GETAVATARBITMAP)) == 1 ? BST_CHECKED : BST_UNCHECKED );
- CheckDlgButton(hwndDlg, IDC_AVATAR_FASTDRAW, db_get_b(NULL,"CList","AvatarsInSeparateWnd",SETTINGS_AVATARINSEPARATE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AVATAR_FASTDRAW, db_get_b(NULL,"CList","AvatarsInSeparateWnd",SETTINGS_AVATARINSEPARATE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_AVATAR_DRAW_BORDER, db_get_b(NULL,"CList","AvatarsDrawBorders",SETTINGS_AVATARDRAWBORDER_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hwndDlg, IDC_AVATAR_ROUND_CORNERS, db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK, db_get_b(NULL,"CList","AvatarsUseCustomCornerSize",SETTINGS_AVATARUSECUTOMCORNERSIZE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
@@ -298,31 +300,31 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
- if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ))
+ if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ))
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
if ( !IsDlgButtonChecked(hwndDlg,IDC_AVATAR_DRAW_BORDER)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_BORDER_COLOR_L),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_BORDER_COLOR),FALSE);
}
-
+
if ( !IsDlgButtonChecked(hwndDlg,IDC_AVATAR_ROUND_CORNERS)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN),FALSE);
- }
-
+ }
+
if ( !IsDlgButtonChecked(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN),FALSE);
- }
-
+ }
+
if ( !IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICONS)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_NORMAL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_PROTOCOL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_CONTACT),FALSE);
}
-
+
if ( !ServiceExists(MS_AV_GETAVATARBITMAP)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_ANIAVATARS),FALSE);
SetDlgItemText(hwndDlg, IDC_SHOW_ANIAVATARS, TranslateT("Animate Avatars (GDI+ and Avatar Service module (avs.dll) are required)"));
@@ -377,7 +379,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),enabled && IsDlgButtonChecked(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK));
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN),enabled && IsDlgButtonChecked(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK));
}
-
+
else if (LOWORD(wParam) == IDC_AVATAR_OVERLAY_ICONS) {
BOOL enabled = IsDlgButtonChecked(hwndDlg,IDC_SHOW_AVATARS) && IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICONS);
@@ -470,7 +472,7 @@ static INT_PTR CALLBACK DlgProcItemIconOpts(HWND hwndDlg, UINT msg, WPARAM wPara
case PSN_APPLY:
db_set_b(NULL,"CList","IconHideOnAvatar", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDE_ICON_ON_AVATAR));
db_set_b(NULL,"CList","IconDrawOnAvatarSpace", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAW_ON_AVATAR_SPACE));
- db_set_b(NULL,"CList","HideGroupsIcon", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDE_GROUPSICON));
+ db_set_b(NULL,"CList","HideGroupsIcon", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDE_GROUPSICON));
db_set_b(NULL,"CList","NoIconBlink", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ICONBLINK));
db_set_b(NULL,"CList","IconIgnoreSizeForRownHeight", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_NOTCHECKICONSIZE));
db_set_b(NULL,"CList","AlwaysShowAlwaysVisIcon", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALWAYS_VISIBLEICON));
@@ -532,7 +534,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara
{
int item;
TCHAR *align[] = {LPGENT("Left align group names"), LPGENT("Center group names"), LPGENT("Right align group names")};
- for (int i=0; i < sizeof(align)/sizeof(char*); i++)
+ for (int i=0; i < sizeof(align)/sizeof(char*); i++)
item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_SETCURSEL,db_get_b(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT),0);
}
@@ -546,7 +548,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara
CheckDlgButton(hwndDlg, IDC_APPEND_NICK, db_get_b(NULL,"CList","FirstLineAppendNick",SETTING_FIRSTLINE_APPENDNICK_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hwndDlg, IDC_TRIM_TEXT, db_get_b(NULL,"CList","TrimText",SETTING_FIRSTLINE_TRIMTEXT_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
{
- bool smileAddPresent = ServiceExists(MS_SMILEYADD_BATCHPARSE) != 0;
+ bool smileAddPresent = ServiceExists(MS_SMILEYADD_BATCHPARSE) != 0;
CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_REPLACE_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_USE_PROTOCOL_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
//CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_RESIZE_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
@@ -675,19 +677,19 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
case WM_COMMAND:
if (LOWORD(wParam) == IDC_TEXT || LOWORD(wParam) == IDC_STATUS || LOWORD(wParam) == IDC_NICKNAME || LOWORD(wParam) == IDC_STATUS_MESSAGE
|| LOWORD(wParam) == IDC_LISTENING_TO || LOWORD(wParam) == IDC_CONTACT_TIME) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
&& IsDlgButtonChecked(hwndDlg,IDC_SHOW));
- EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
&& IsDlgButtonChecked(hwndDlg,IDC_SHOW));
- EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
- (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
+ (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
+ EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
(IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
+ EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
(IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
- (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
+ (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
}
else if (LOWORD(wParam) == IDC_SHOW) {
@@ -709,11 +711,11 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), enabled && IsDlgButtonChecked(hwndDlg,IDC_TEXT));
EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), enabled && IsDlgButtonChecked(hwndDlg,IDC_TEXT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), enabled && IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE));
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), enabled && IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
}
@@ -849,16 +851,16 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
case WM_COMMAND:
if (LOWORD(wParam) == IDC_TEXT || LOWORD(wParam) == IDC_STATUS || LOWORD(wParam) == IDC_NICKNAME || LOWORD(wParam) == IDC_STATUS_MESSAGE
|| LOWORD(wParam) == IDC_LISTENING_TO || LOWORD(wParam) == IDC_CONTACT_TIME) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
&& IsDlgButtonChecked(hwndDlg,IDC_SHOW));
- EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), IsDlgButtonChecked(hwndDlg,IDC_TEXT)
&& IsDlgButtonChecked(hwndDlg,IDC_SHOW));
- EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
- (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) &&
+ (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), IsDlgButtonChecked(hwndDlg,IDC_SHOW) && (IsDlgButtonChecked(hwndDlg,IDC_STATUS) || IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) && (IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) && (IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) && (IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), IsDlgButtonChecked(hwndDlg,IDC_SHOW) && (IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
}
else if (LOWORD(wParam) == IDC_SHOW) {
BOOL enabled = IsDlgButtonChecked(hwndDlg,IDC_SHOW);
@@ -879,9 +881,9 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLE_TEXT), enabled && IsDlgButtonChecked(hwndDlg,IDC_TEXT));
EnableWindow(GetDlgItem(hwndDlg,IDC_VARIABLES_L), enabled && IsDlgButtonChecked(hwndDlg,IDC_TEXT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_XSTATUS_HAS_PRIORITY), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_USE_NAME_AND_MESSAGE), enabled && (IsDlgButtonChecked(hwndDlg,IDC_STATUS)
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_STATUS_IF_NOAWAY), enabled && IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE));
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), enabled && IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE));
@@ -949,7 +951,7 @@ struct
int id; // Dialog id
DLGPROC wnd_proc; // Dialog function
}
-static row_opt_items[] =
+static row_opt_items[] =
{
{ LPGEN("Row"), IDD_OPT_ITEM_ROW, DlgProcItemRowOpts },
#ifdef _DEBUG
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index 77464992ef..45088d09c2 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
@@ -78,10 +80,10 @@ void FreeDisplayNameCache()
mir_free_and_nil( clistCache->items[i] );
}
- List_Destroy( clistCache );
+ List_Destroy( clistCache );
mir_free(clistCache);
clistCache = NULL;
- }
+ }
}
ClcCacheEntry* cliGetCacheEntry(HANDLE hContact)
@@ -89,8 +91,8 @@ ClcCacheEntry* cliGetCacheEntry(HANDLE hContact)
if ( !clistCache) return NULL;
int idx;
- ClcCacheEntry *p;
- if ( !List_GetIndex( clistCache, &hContact, &idx )) {
+ ClcCacheEntry *p;
+ if ( !List_GetIndex( clistCache, &hContact, &idx )) {
if (( p = pcli->pfnCreateCacheItem( hContact )) != NULL ) {
List_Insert( clistCache, p, idx );
pcli->pfnInvalidateDisplayNameCacheEntry( hContact );
@@ -114,7 +116,7 @@ void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag )
if ( flag & CCI_NAME)
pDst->freeName();
- if ( flag & CCI_GROUP )
+ if ( flag & CCI_GROUP )
mir_free_and_nil(pDst->tszGroup);
if ( flag & CCI_LINES ) {
@@ -145,11 +147,11 @@ void CListSettings_CopyCacheItems(ClcCacheEntry *pDst, ClcCacheEntry *pSrc, DWOR
if ( flag & CCI_GROUP ) pDst->tszGroup = mir_tstrdup(pSrc->tszGroup);
if ( flag & CCI_PROTO ) pDst->m_cache_cszProto = pSrc->m_cache_cszProto;
if ( flag & CCI_STATUS ) pDst->m_cache_nStatus = pSrc->m_cache_nStatus;
-
+
if ( flag & CCI_LINES ) {
mir_free( pDst->szThirdLineText );
pDst->szThirdLineText = mir_tstrdup( pSrc->szThirdLineText );
-
+
mir_free( pDst->szSecondLineText );
pDst->szSecondLineText = mir_tstrdup( pSrc->szSecondLineText );
@@ -157,7 +159,7 @@ void CListSettings_CopyCacheItems(ClcCacheEntry *pDst, ClcCacheEntry *pSrc, DWOR
pDst->ssSecondLine = pSrc->ssSecondLine;
}
- if ( flag & CCI_TIME)
+ if ( flag & CCI_TIME)
pDst->hTimeZone = pSrc->hTimeZone;
if ( flag & CCI_OTHER) {
@@ -217,7 +219,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
{
if (pdnce == NULL)
return;
-
+
if (pdnce->hContact == NULL) { //selfcontact
if ( !pdnce->tszName)
pdnce->getName();
@@ -226,7 +228,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
if (pdnce->m_cache_cszProto == NULL && pdnce->m_cache_bProtoNotExists == FALSE) {
pdnce->m_cache_cszProto = GetProtoForContact(pdnce->hContact);
- if (pdnce->m_cache_cszProto == NULL)
+ if (pdnce->m_cache_cszProto == NULL)
pdnce->m_cache_bProtoNotExists = FALSE;
else if (pdnce->m_cache_cszProto && pdnce->tszName)
pdnce->freeName();
@@ -237,7 +239,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
else if (pdnce->isUnknown && pdnce->m_cache_cszProto && pdnce->m_cache_bProtoNotExists == TRUE && g_flag_bOnModulesLoadedCalled) {
if (CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pdnce->m_cache_cszProto) == 0) {
- pdnce->m_cache_bProtoNotExists = FALSE;
+ pdnce->m_cache_bProtoNotExists = FALSE;
pdnce->getName();
}
}
@@ -283,10 +285,10 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
void IvalidateDisplayNameCache(DWORD mode)
{
- if ( clistCache != NULL )
+ if ( clistCache != NULL )
{
int i;
- for ( i=0; i < clistCache->realCount; i++)
+ for ( i=0; i < clistCache->realCount; i++)
{
ClcCacheEntry *pdnce = (ClcCacheEntry *)clistCache->items[i];
if (mode&16)
@@ -301,7 +303,7 @@ void InvalidateDNCEbyPointer(HANDLE hContact, ClcCacheEntry *pdnce, int SettingT
{
if (hContact == NULL || pdnce == NULL)
return;
-
+
if (SettingType == 16) {
pdnce->ssSecondLine.DestroySmileyList();
mir_free_and_nil(pdnce->szSecondLineText);
@@ -322,7 +324,7 @@ void InvalidateDNCEbyPointer(HANDLE hContact, ClcCacheEntry *pdnce, int SettingT
return;
}
- if (SettingType == -1 || SettingType == DBVT_DELETED) {
+ if (SettingType == -1 || SettingType == DBVT_DELETED) {
pdnce->freeName();
mir_free_and_nil(pdnce->tszGroup);
pdnce->m_cache_cszProto = NULL;
@@ -366,7 +368,7 @@ void ClcCacheEntry::freeName()
{
if ( !isUnknown)
mir_free(tszName);
- else
+ else
isUnknown = false;
tszName = NULL;
}
@@ -447,23 +449,23 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
if ( !mir_strcmp(cws->szSetting, "Status") || wildcmp(cws->szSetting, "Status?")) {
if (g_szMetaModuleName && !mir_strcmp(cws->szModule,g_szMetaModuleName) && mir_strcmp(cws->szSetting, "Status")) {
int res = 0;
- if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled)
+ if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled)
res = PostAutoRebuidMessage(pcli->hwndContactTree);
if ((db_get_w(NULL,"CList","SecondLineType",SETTING_SECONDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE || db_get_w(NULL,"CList","ThirdLineType",SETTING_THIRDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_cache_cszProto)
- amRequestAwayMsg(hContact);
+ amRequestAwayMsg(hContact);
return 0;
}
- if (pdnce->bIsHidden != 1) {
+ if (pdnce->bIsHidden != 1) {
pdnce___SetStatus( pdnce , cws->value.wVal ); //dont use direct set
if (cws->value.wVal == ID_STATUS_OFFLINE)
if (g_CluiData.bRemoveAwayMessageForOffline)
db_set_s(hContact,"CList","StatusMsg","");
if ((db_get_w(NULL,"CList","SecondLineType",0) == TEXT_STATUS_MESSAGE || db_get_w(NULL,"CList","ThirdLineType",0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_cache_cszProto)
- amRequestAwayMsg(hContact);
+ amRequestAwayMsg(hContact);
pcli->pfnClcBroadcast(INTM_STATUSCHANGED, wParam, 0);
cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
@@ -486,28 +488,28 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
else if (pdnce->tszName == NULL || !strcmp(cws->szSetting,"MyHandle"))
InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
- else if ( !strcmp(cws->szSetting,"Group"))
+ else if ( !strcmp(cws->szSetting,"Group"))
InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
else if ( !strcmp(cws->szSetting,"Hidden")) {
- InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
+ InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
char *szProto = GetContactProto((HANDLE)wParam);
- cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
+ cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact),1); //by FYR
}
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
else if ( !strcmp(cws->szSetting,"noOffline")) {
- InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
+ InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
}
else if ( !strcmp(cws->szModule,"Protocol")) {
if ( !strcmp(cws->szSetting,"p")) {
- InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
+ InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
char *szProto = (cws->value.type == DBVT_DELETED) ? NULL : cws->value.pszVal;
- cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
+ cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact), 0);
}
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 7d463c2307..c772af7186 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include <m_clui.h>
#include "hdr/modern_clist.h"
@@ -100,7 +102,7 @@ INT_PTR CListTray_GetGlobalStatus(WPARAM wparam,LPARAM lparam)
for (i=0; i < pcli->hClcProtoCount; i++)
{
if ( !pcli->pfnGetProtocolVisibility(pcli->clcProto[i].szProto)) continue;
- if (pcli->clcProto[i].dwStatus >= ID_STATUS_CONNECTING &&
+ if (pcli->clcProto[i].dwStatus >= ID_STATUS_CONNECTING &&
pcli->clcProto[i].dwStatus < ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
{
connectingCount++;
@@ -180,7 +182,7 @@ int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netProto
if (g_bMultiConnectionMode) {
if (_strcmpi(szChangedProto, g_szConnectingProto))
return -1;
-
+
hIcon = (HICON)CLUI_GetConnectingIconService(NULL, 1);
}
else hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);
@@ -225,7 +227,7 @@ int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netProto
else if ( db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT )) {
if ( !pcli->pfnGetProtocolVisibility(szChangedProto))
return -1;
-
+
status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0);
if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto, 0);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 1162209f6b..5f5e087734 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -1,13 +1,12 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
-
listed in contributors.txt.
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -96,13 +95,13 @@ static RECT rcNewWindowRect={0},
static HANDLE hFrameContactTree;
-static PROTOTICKS CycleStartTick[64]={0};//max 64 protocols
+static PROTOTICKS CycleStartTick[64]={0};//max 64 protocols
static int nAnimatedIconStep=100;
HIMAGELIST hAvatarOverlays=NULL;
-OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
+OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
{
{ "AVATAR_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_AVATAR_OVERLAY_OFFLINE, -1},
{ "AVATAR_OVERLAY_ONLINE", LPGEN("Online"), IDI_AVATAR_OVERLAY_ONLINE, -1},
@@ -116,7 +115,7 @@ OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE +
{ "AVATAR_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_AVATAR_OVERLAY_LUNCH, -1}
};
-OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
+OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
{
{ "STATUS_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_STATUS_OVERLAY_OFFLINE, -1},
{ "STATUS_OVERLAY_ONLINE", LPGEN("Online"), IDI_STATUS_OVERLAY_ONLINE, -1},
@@ -809,7 +808,7 @@ int CLUI_UpdateTimer(BYTE BringIn)
KillTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT);
CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT,wBehindEdgeHideDelay*100, NULL);
}
-
+
if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState > 0) {
KillTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT);
bShowEventStarted = (BOOL)CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT,wBehindEdgeShowDelay*100, NULL);
@@ -976,7 +975,7 @@ static HICON CLUI_LoadIconFromExternalFile(TCHAR *filename, int i)
TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH];
mir_sntprintf(szPath, SIZEOF(szPath), _T("Icons\\%s"), filename);
PathToAbsoluteT(szPath, szFullPath);
-
+
HICON hIcon = NULL;
ExtractIconEx(szFullPath, i, NULL, &hIcon, 1);
return hIcon;
@@ -1595,7 +1594,7 @@ BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect, BOOL bErase)
g_flag_bFullRepaint = 1;
return 0;
}
-
+
return InvalidateRect(hWnd,lpRect,bErase);
}
@@ -1628,7 +1627,7 @@ HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDes
if ( !FileExists(fileFull))
fileFull[0] = _T('\0');
}
-
+
if (fileFull[0] != _T('\0'))
sid.iDefaultIndex = -iDefaultIndex;
else {
@@ -2624,7 +2623,7 @@ LRESULT CLUI::OnDrawItem(UINT msg, WPARAM wParam, LPARAM lParam)
}
return TRUE;
}
-
+
if (dis->itemData == MENU_STATUSMENU) {
if ( !g_CluiData.fLayered) {
char buf[255] = {0};
@@ -2651,7 +2650,7 @@ LRESULT CLUI::OnDrawItem(UINT msg, WPARAM wParam, LPARAM lParam)
}
return TRUE;
}
-
+
if (dis->itemData == MENU_MINIMIZE && !g_CluiData.fLayered) {
//TODO check if caption is visible
char buf[255] = {0};
diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp
index 2203f713e7..69b5e6b247 100644
--- a/plugins/Clist_modern/src/modern_cluiservices.cpp
+++ b/plugins/Clist_modern/src/modern_cluiservices.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_commonprototypes.h"
@@ -49,4 +51,3 @@ int CLUIServices_LoadModule(void)
CreateServiceFunction(MS_CLIST_GETSTATUSMODE,CListTray_GetGlobalStatus);
return 0;
}
-
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index fdf0191a84..eccb4e0bab 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,12 +21,13 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "m_clui.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
-struct
+struct
{
int m_cache_nStatus,order;
} statusModeOrder[] = {
@@ -81,7 +83,7 @@ int GetProtoIndex(char * szName)
if (szName) {
PROTOACCOUNT **accs = NULL;
int accCount = 0;
- ProtoEnumAccounts( &accCount, &accs );
+ ProtoEnumAccounts( &accCount, &accs );
for (int i=0; i < accCount; i++)
if ( !mir_strcmpi(szName, accs[i]->szModuleName))
@@ -125,23 +127,23 @@ int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int
return 2*(statusa == ID_STATUS_OFFLINE)-1;
}
- if (by == SORTBY_NAME)
+ if (by == SORTBY_NAME)
{ //name
return mir_tstrcmpi(namea,nameb);
- }
- if (by == SORTBY_NAME_LOCALE)
+ }
+ if (by == SORTBY_NAME_LOCALE)
{ //name
static int LocaleId = -1;
if (LocaleId == -1) LocaleId = CallService(MS_LANGPACK_GETLOCALE, 0, 0);
return (CompareString(LocaleId,NORM_IGNORECASE,SAFETSTRING(namea),-1,SAFETSTRING(nameb),-1))-2;
- }
- else if (by == SORTBY_LASTMSG)
+ }
+ else if (by == SORTBY_LASTMSG)
{ //last message
DWORD ta = CompareContacts2_getLMTime(a);
DWORD tb = CompareContacts2_getLMTime(b);
return tb-ta;
- }
- else if (by == SORTBY_PROTO)
+ }
+ else if (by == SORTBY_PROTO)
{
int rc = GetProtoIndex(szProto1)-GetProtoIndex(szProto2);
@@ -156,7 +158,7 @@ int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int
int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2)
{
int i, r;
- for (i=0; i < SIZEOF(g_CluiData.bSortByOrder); i++)
+ for (i=0; i < SIZEOF(g_CluiData.bSortByOrder); i++)
{
r = CompareContacts2(contact1, contact2, g_CluiData.bSortByOrder[i]);
if (r != 0)
@@ -181,7 +183,7 @@ INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam)
}
INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam)
-{
+{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
if ( wParam != -1 )
{
diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp
index 24ed62d9f9..85dfc20632 100644
--- a/plugins/Clist_modern/src/modern_docking.cpp
+++ b/plugins/Clist_modern/src/modern_docking.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "m_api/m_skin_eng.h"
@@ -103,14 +105,14 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
static int draggingTitle;
MSG *msg = (MSG*)wParam;
- if (msg->message == WM_DESTROY)
+ if (msg->message == WM_DESTROY)
db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
if ( !g_CluiData.fDocked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message != WM_MOVE && msg->message != WM_SIZE) return 0;
switch(msg->message) {
case WM_CREATE:
//if (GetSystemMetrics(SM_CMONITORS)>1) return 0;
- if ( db_get_b(NULL,"CList","Docked",0) && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
+ if ( db_get_b(NULL,"CList","Docked",0) && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
PostMessage(msg->hwnd,WM_CREATEDOCKED, 0, 0);
}
@@ -180,7 +182,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
dock_drag_dy = rcWindow.top-ptCursor.y;
Docking_GetMonitorRectFromPoint(ptCursor,&rcMonitor);
- if (((ptCursor.x < rcMonitor.left+EDGESENSITIVITY)
+ if (((ptCursor.x < rcMonitor.left+EDGESENSITIVITY)
|| (ptCursor.x >= rcMonitor.right-EDGESENSITIVITY))
&& db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
@@ -192,7 +194,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
SHAppBarMessage(ABM_NEW,&abd);
if (ptCursor.x < rcMonitor.left+EDGESENSITIVITY) g_CluiData.fDocked = DOCKED_LEFT;
else g_CluiData.fDocked = DOCKED_RIGHT;
- // TempDock = 1;
+ // TempDock = 1;
GetWindowRect(msg->hwnd,(LPRECT)msg->lParam);
rc = (RECT*)msg->lParam;
if (g_CluiData.fDocked == DOCKED_RIGHT)
@@ -201,7 +203,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
dx = (rc->left < rcMonitor.left)?rc->left-rcMonitor.left:0;
OffsetRect(rc,-dx,0);
Docking_AdjustPosition(msg->hwnd,(LPRECT)&rcMonitor,(LPRECT)msg->lParam);
- SendMessage(msg->hwnd,WM_SIZE, 0, 0);
+ SendMessage(msg->hwnd,WM_SIZE, 0, 0);
g_CluiData.mutexPreventDockMoving = 0;
Sync(CLUIFrames_OnMoving,msg->hwnd,(LPRECT)msg->lParam);
g_CluiData.mutexPreventDockMoving = 1;
@@ -224,8 +226,8 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
g_CluiData.mutexPreventDockMoving = 0;
SetWindowPos(msg->hwnd, 0, rcWindow.left,rcWindow.top, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOSENDCHANGING);
Sync(CLUIFrames_OnMoving,msg->hwnd,&rcWindow);
- ModernSkinButton_ReposButtons( msg->hwnd, SBRF_DO_NOT_DRAW, NULL );// -= -= -=
- g_CluiData.mutexPreventDockMoving = 1;
+ ModernSkinButton_ReposButtons( msg->hwnd, SBRF_DO_NOT_DRAW, NULL );// -= -= -=
+ g_CluiData.mutexPreventDockMoving = 1;
return 1;
}
@@ -248,7 +250,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
rc = *(RECT*)(msg->lParam);
g_CluiData.mutexPreventDockMoving = 0;
Sync(CLUIFrames_OnMoving,msg->hwnd,&rc);
- // -= -= -=
+ // -= -= -=
return TRUE;
}
case WM_SHOWWINDOW:
@@ -269,7 +271,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
Docking_AdjustPosition(msg->hwnd,&rcMonitor,&rc);
MoveWindow(msg->hwnd,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,FALSE);
Sync(CLUIFrames_OnMoving,msg->hwnd,&rc);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW,NULL);// -= -= -=
+ ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW,NULL);// -= -= -=
}
else {
SHAppBarMessage(ABM_REMOVE,&abd);
@@ -279,7 +281,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
case WM_NCHITTEST:
{ LONG result;
result = DefWindowProc(msg->hwnd,WM_NCHITTEST,msg->wParam,msg->lParam);
- if (result == HTSIZE || result == HTTOP || result == HTTOPLEFT || result == HTTOPRIGHT ||
+ if (result == HTSIZE || result == HTTOP || result == HTTOPLEFT || result == HTTOPRIGHT ||
result == HTBOTTOM || result == HTBOTTOMRIGHT || result == HTBOTTOMLEFT) {*((LRESULT*)lParam) = HTCLIENT; return TRUE;}
if (g_CluiData.fDocked == DOCKED_LEFT && result == HTLEFT) {*((LRESULT*)lParam) = HTCLIENT; return TRUE;}
if (g_CluiData.fDocked == DOCKED_RIGHT && result == HTRIGHT) {*((LRESULT*)lParam) = HTCLIENT; return TRUE;}
@@ -300,7 +302,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
{ RECT rc;
POINT pt;
GetClientRect(msg->hwnd,&rc);
- if (((g_CluiData.fDocked == DOCKED_LEFT || g_CluiData.fDocked == -DOCKED_LEFT) && (short)LOWORD(msg->lParam)>rc.right) ||
+ if (((g_CluiData.fDocked == DOCKED_LEFT || g_CluiData.fDocked == -DOCKED_LEFT) && (short)LOWORD(msg->lParam)>rc.right) ||
((g_CluiData.fDocked == DOCKED_RIGHT || g_CluiData.fDocked == -DOCKED_RIGHT) && (short)LOWORD(msg->lParam) < 0)) {
ReleaseCapture();
draggingTitle = 0;
@@ -333,7 +335,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
Docking_GetMonitorRectFromWindow(msg->hwnd,&rcMonitor);
GetWindowRect(msg->hwnd,&rc);
Docking_AdjustPosition(msg->hwnd,&rcMonitor,&rc);
- Sync(CLUIFrames_OnMoving,msg->hwnd,&rc); // -= -= -=
+ Sync(CLUIFrames_OnMoving,msg->hwnd,&rc); // -= -= -=
ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, NULL);
g_CluiData.mutexPreventDockMoving = 1;
diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp
index 4c4bbe5b89..bc1f732520 100644
--- a/plugins/Clist_modern/src/modern_gettextasync.cpp
+++ b/plugins/Clist_modern/src/modern_gettextasync.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -19,7 +20,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
*/
/*
@@ -83,7 +83,7 @@ static void gtaThreadProc(void *lpParam)
SHORTDATA data = {0};
while (!MirandaExiting()) {
- Sync(CLUI_SyncGetShortData,(WPARAM)pcli->hwndContactTree,(LPARAM)&data);
+ Sync(CLUI_SyncGetShortData,(WPARAM)pcli->hwndContactTree,(LPARAM)&data);
while (true) {
if ( MirandaExiting())
return;
@@ -98,8 +98,8 @@ static void gtaThreadProc(void *lpParam)
SHORTDATA *dat;
if (mpChain.dat == NULL || (!IsBadReadPtr(mpChain.dat,sizeof(mpChain.dat)) && mpChain.dat->hWnd == data.hWnd))
dat = &data;
- else {
- Sync(CLUI_SyncGetShortData,(WPARAM)mpChain.dat->hWnd,(LPARAM)&dat2);
+ else {
+ Sync(CLUI_SyncGetShortData,(WPARAM)mpChain.dat->hWnd,(LPARAM)&dat2);
dat = &dat2;
}
if ( MirandaExiting())
@@ -111,7 +111,7 @@ static void gtaThreadProc(void *lpParam)
if ( !Sync(CLUI_SyncGetPDNCE, (WPARAM) 0, (LPARAM)&cacheEntry)) {
Cache_GetSecondLineText(dat, &cacheEntry);
Cache_GetThirdLineText(dat, &cacheEntry);
- Sync(CLUI_SyncSetPDNCE, (WPARAM) CCI_LINES,(LPARAM)&cacheEntry);
+ Sync(CLUI_SyncSetPDNCE, (WPARAM) CCI_LINES,(LPARAM)&cacheEntry);
CListSettings_FreeCacheItemData(&cacheEntry);
}
@@ -137,18 +137,18 @@ BOOL gtaWakeThread()
int gtaAddRequest(ClcData *dat,ClcContact *contact,HANDLE hContact)
{
if (MirandaExiting()) return 0;
- gtalock;
+ gtalock;
{
GTACHAINITEM * mpChain = (GTACHAINITEM *)malloc(sizeof(GTACHAINITEM));
mpChain->hContact = hContact;
mpChain->dat = dat;
mpChain->Next = NULL;
- if (gtaLastItem)
+ if (gtaLastItem)
{
gtaLastItem->Next = (GTACHAINITEM *)mpChain;
gtaLastItem = mpChain;
}
- else
+ else
{
gtaFirstItem = mpChain;
gtaLastItem = mpChain;
diff --git a/plugins/Clist_modern/src/modern_global.cpp b/plugins/Clist_modern/src/modern_global.cpp
index 269abb136e..d20efc2e33 100644
--- a/plugins/Clist_modern/src/modern_global.cpp
+++ b/plugins/Clist_modern/src/modern_global.cpp
@@ -1,13 +1,12 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Miranda NG: the free IM client for Microsoft* Windows*
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
diff --git a/plugins/Clist_modern/src/modern_image_array.cpp b/plugins/Clist_modern/src/modern_image_array.cpp
index 0798f9a993..221c61813f 100644
--- a/plugins/Clist_modern/src/modern_image_array.cpp
+++ b/plugins/Clist_modern/src/modern_image_array.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -21,8 +22,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Pescuma
-
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_image_array.h"
#include "hdr/modern_commonprototypes.h"
@@ -45,7 +46,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size)
if (iad->nodes != NULL)
{
- IMAGE_ARRAY_DATA_NODE *tmp = (IMAGE_ARRAY_DATA_NODE *) realloc((void *)iad->nodes,
+ IMAGE_ARRAY_DATA_NODE *tmp = (IMAGE_ARRAY_DATA_NODE *) realloc((void *)iad->nodes,
sizeof(IMAGE_ARRAY_DATA_NODE) * size_grow);
if (tmp == NULL)
@@ -115,7 +116,7 @@ void ImageArray_Initialize(LP_IMAGE_ARRAY_DATA iad, BOOL width_based, int grow_s
{
iad->grow_step = 1;
}
- iad->hdc = CreateCompatibleDC(NULL);
+ iad->hdc = CreateCompatibleDC(NULL);
iad->img = NULL;
iad->width = 0;
@@ -143,7 +144,7 @@ HBITMAP ImageArray_Free(LP_IMAGE_ARRAY_DATA iad, BOOL keep_bitmap)
iad->height = 0;
}
- if (iad->nodes != NULL)
+ if (iad->nodes != NULL)
{
free(iad->nodes);
iad->nodes = NULL;
@@ -171,7 +172,7 @@ void ImageArray_Clear(LP_IMAGE_ARRAY_DATA iad)
iad->height = 0;
}
- if (iad->nodes != NULL)
+ if (iad->nodes != NULL)
{
free(iad->nodes);
iad->nodes = NULL;
@@ -237,7 +238,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
LeaveCriticalSection(&iad->cs);
return -1;
}
-
+
// Alloc array
if ( !ImageArray_Alloc(iad, iad->nodes_size + 1))
{
@@ -250,7 +251,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
// Set some draw states
SelectObject(iad->hdc, hNewBmp);
- hdc_old = CreateCompatibleDC(iad->hdc);
+ hdc_old = CreateCompatibleDC(iad->hdc);
old_bmp = (HBITMAP)GetCurrentObject(hdc_old, OBJ_BITMAP);
SetBkMode(iad->hdc,TRANSPARENT);
@@ -407,12 +408,12 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
LeaveCriticalSection(&iad->cs);
return FALSE;
}
-
+
// Move image...
// Set some draw states
SelectObject(iad->hdc, hNewBmp);
- hdc_old = CreateCompatibleDC(iad->hdc);
+ hdc_old = CreateCompatibleDC(iad->hdc);
SetBkMode(iad->hdc, TRANSPARENT);
{
@@ -552,12 +553,12 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
LeaveCriticalSection(&iad->cs);
return FALSE;
}
-
+
// Move image...
// Set some draw states
SelectObject(iad->hdc, hNewBmp);
- hdc_old = CreateCompatibleDC(iad->hdc);
+ hdc_old = CreateCompatibleDC(iad->hdc);
SetBkMode(iad->hdc, TRANSPARENT);
{
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp
index 857f89f4e1..4cc0cb54f2 100644
--- a/plugins/Clist_modern/src/modern_keyboard.cpp
+++ b/plugins/Clist_modern/src/modern_keyboard.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include <m_hotkeys.h>
diff --git a/plugins/Clist_modern/src/modern_newrowopts.cpp b/plugins/Clist_modern/src/modern_newrowopts.cpp
index 15bb235bea..adf97e27d8 100644
--- a/plugins/Clist_modern/src/modern_newrowopts.cpp
+++ b/plugins/Clist_modern/src/modern_newrowopts.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -28,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/************************************************************************/
/********* New row design options file handle ********/
/************************************************************************/
-
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
@@ -37,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define COLUMNS_PLACE 254
#define ROWS_PLACE 253
-typedef struct _NodeList
+typedef struct _NodeList
{
BYTE bType;
int pData;
@@ -51,7 +52,7 @@ NodeList * RootNode = NULL;
NodeList * AddNode(NodeList * Parent)
{
NodeList * res;
- if ( !Parent)
+ if ( !Parent)
{
res = (NodeList *)mir_alloc(sizeof(NodeList));
memset(res, 0, sizeof(NodeList));
@@ -92,11 +93,11 @@ BOOL RemoveNode(NodeList * FromList)
for (k = 0;k < FromList->itemParent->AllocatedChilds;k++)
if (&(FromList->itemParent->childNodes[k]) == FromList)
{
- BOOL res = RemoveChildNode(FromList->itemParent,k);
+ BOOL res = RemoveChildNode(FromList->itemParent,k);
return res;
}
}
- do
+ do
{
RemoveChildNode(FromList,0);
}
@@ -128,7 +129,7 @@ void TraceTreeLevel(NodeList * node)
{
if (node->childNodes[i].AllocatedChilds>0)
- TraceTreeLevel(&(node->childNodes[i]));
+ TraceTreeLevel(&(node->childNodes[i]));
else
{
PrintIdent();
@@ -177,7 +178,7 @@ BOOL CALLBACK DlgProcItemNewRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
case WM_NOTIFY:
{
- switch (((LPNMHDR)lParam)->idFrom)
+ switch (((LPNMHDR)lParam)->idFrom)
{
case 0:
{
diff --git a/plugins/Clist_modern/src/modern_row.cpp b/plugins/Clist_modern/src/modern_row.cpp
index 058b48f2e8..057b17b6c5 100644
--- a/plugins/Clist_modern/src/modern_row.cpp
+++ b/plugins/Clist_modern/src/modern_row.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -21,7 +22,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Anton Senko aka ZORG , tweaked by Artem Shpynov aka FYR
-
*/
#include "hdr/modern_commonheaders.h"
@@ -327,8 +327,8 @@ BOOL rowParse(ROWCELL* &cell, ROWCELL* parent, char *tbuf, int &hbuf, int &seque
if (!_strnicmp(word, "<tr", strlen(word)) || !_strnicmp(word, "<tr>", strlen(word))) cont = TC_ROW;
else if ( !_strnicmp(word, "<tc", strlen(word)) || !_strnicmp(word, "<tc>", strlen(word))) cont = TC_COL;
- else if ( !_strnicmp(word, "/>", strlen(word)) ||
- !_strnicmp(word, "</tr>", strlen(word)) ||
+ else if ( !_strnicmp(word, "/>", strlen(word)) ||
+ !_strnicmp(word, "</tr>", strlen(word)) ||
!_strnicmp(word, "</tc>", strlen(word))) return TRUE;
else return FALSE;
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
index c8e4e54783..2cf5cd2780 100644
--- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
+++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -21,8 +22,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Created by Pescuma, modified by Artem Shpynov
-
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_rowheight_funcs.h"
#include "hdr/modern_commonprototypes.h"
@@ -43,7 +44,7 @@ ROWCELL * gl_RowRoot;
void FreeRowCell ()
{
- if (gl_RowRoot)
+ if (gl_RowRoot)
cppDeleteTree(gl_RowRoot);
}
@@ -62,7 +63,7 @@ SIZE GetAvatarSize(int imageWidth, int imageHeight, int maxWidth, int maxHeight)
if (maxWidth == 0)
maxWidth = maxHeight;
- scalefactor = min((float)maxWidth/imageWidth,(float)maxHeight/imageHeight);
+ scalefactor = min((float)maxWidth/imageWidth,(float)maxHeight/imageHeight);
sz.cx = (LONG)(imageWidth*scalefactor);
sz.cy = (LONG)(imageHeight*scalefactor);
return sz;
@@ -82,7 +83,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
BYTE i=0;
int res = 0;
int height = 0;
- ClcCacheEntry *pdnce;
+ ClcCacheEntry *pdnce;
BOOL hasAvatar = FALSE;
DWORD style;
style = GetWindowLongPtr(hwnd,GWL_STYLE);
@@ -103,11 +104,11 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
if (szCounts && szCounts[0])
tmp = max(tmp,dat->fontModernInfo[contact->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS].fontHeight);
}
- tmp = max(tmp, ICON_HEIGHT);
+ tmp = max(tmp, ICON_HEIGHT);
tmp = max(tmp,dat->row_min_heigh);
tmp += dat->row_border*2;
- if (contact->type == CLCIT_GROUP &&
- contact->group->parent->groupId == 0 &&
+ if (contact->type == CLCIT_GROUP &&
+ contact->group->parent->groupId == 0 &&
contact->group->parent->cl.items[0] != contact)
tmp += dat->row_before_group_space;
if (item != -1) dat->row_heights[item] = tmp;
@@ -138,7 +139,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
if (contact->type == CLCIT_GROUP)
{
char * szCounts = pcli->pfnGetGroupCountsText(dat, contact);
- if (szCounts && strlen(szCounts)>0)
+ if (szCounts && strlen(szCounts)>0)
{
RECT count_rc = {0};
// calc width and height
@@ -210,13 +211,13 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
DeleteDC(hdc);
}
}
- gl_RowTabAccess[i]->h = tmp;
+ gl_RowTabAccess[i]->h = tmp;
}
break;
case TC_STATUS:
- if ((contact->type == CLCIT_GROUP && !dat->row_hide_group_icon) ||
- (contact->type == CLCIT_CONTACT && contact->iImage != -1 &&
+ if ((contact->type == CLCIT_GROUP && !dat->row_hide_group_icon) ||
+ (contact->type == CLCIT_CONTACT && contact->iImage != -1 &&
!(dat->icon_hide_on_avatar && dat->avatars_show && (hasAvatar || (!hasAvatar && dat->icon_draw_on_avatar_space && contact->iImage != -1)) && !contact->image_is_special)))
{
gl_RowTabAccess[i]->h = ICON_HEIGHT;
@@ -225,8 +226,8 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
break;
case TC_AVATAR:
- if (dat->avatars_show &&
- contact->type == CLCIT_CONTACT &&
+ if (dat->avatars_show &&
+ contact->type == CLCIT_CONTACT &&
(hasAvatar || (dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage != -1)))
{
int iW = 0, iH = 0;
@@ -239,7 +240,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
else if (dat->avatar_cache.nodes) {
iW = dat->avatar_cache.nodes[contact->avatar_pos].width;
iH = dat->avatar_cache.nodes[contact->avatar_pos].height;
- }
+ }
SIZE sz = GetAvatarSize(iW,iH,dat->avatars_maxwidth_size,dat->avatars_maxheight_size);
if ((sz.cx == 0 || sz.cy == 0) && dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage != -1)
sz.cx = ICON_HEIGHT, sz.cy = ICON_HEIGHT;
@@ -252,7 +253,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
case TC_EXTRA:
// Draw extra icons
- if (contact->type == CLCIT_CONTACT &&
+ if (contact->type == CLCIT_CONTACT &&
(!contact->isSubcontact || db_get_b(NULL,"CLC","MetaHideExtra",SETTING_METAHIDEEXTRA_DEFAULT) == 0 && dat->extraColumnsCount > 0))
{
BOOL hasExtra = FALSE;
@@ -279,7 +280,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
case TC_EXTRA7:
case TC_EXTRA8:
case TC_EXTRA9:
- if (contact->type == CLCIT_CONTACT &&
+ if (contact->type == CLCIT_CONTACT &&
(!contact->isSubcontact || db_get_b(NULL,"CLC","MetaHideExtra",SETTING_METAHIDEEXTRA_DEFAULT) == 0 && dat->extraColumnsCount > 0))
{
int eNum = gl_RowTabAccess[i]->type-TC_EXTRA1;
@@ -313,7 +314,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
gl_RowTabAccess[i]->w = text_size.cx;
}
}
- }
+ }
break;
}
}
@@ -396,10 +397,10 @@ BOOL RowHeights_Alloc(ClcData *dat, int size)
// Calc and store max row height
static int contact_fonts[] = {
- FONTID_CONTACTS, FONTID_INVIS, FONTID_OFFLINE, FONTID_NOTONLIST, FONTID_OFFINVIS,
- FONTID_AWAY,FONTID_DND, FONTID_NA, FONTID_OCCUPIED, FONTID_CHAT, FONTID_INVISIBLE,
+ FONTID_CONTACTS, FONTID_INVIS, FONTID_OFFLINE, FONTID_NOTONLIST, FONTID_OFFINVIS,
+ FONTID_AWAY,FONTID_DND, FONTID_NA, FONTID_OCCUPIED, FONTID_CHAT, FONTID_INVISIBLE,
FONTID_PHONE, FONTID_LUNCH };
-
+
static int other_fonts[] = {FONTID_OPENGROUPS, FONTID_OPENGROUPCOUNTS,FONTID_CLOSEDGROUPS, FONTID_CLOSEDGROUPCOUNTS, FONTID_DIVIDERS, FONTID_CONTACT_TIME};
int RowHeights_GetMaxRowHeight(ClcData *dat, HWND hwnd)
@@ -417,20 +418,20 @@ int RowHeights_GetMaxRowHeight(ClcData *dat, HWND hwnd)
if (dat->text_replace_smileys && dat->first_line_draw_smileys && !dat->text_resize_smileys)
tmp = max(tmp, dat->text_smiley_height);
- max_height += tmp;
+ max_height += tmp;
if (dat->second_line_show) {
tmp = dat->fontModernInfo[FONTID_SECONDLINE].fontHeight;
if (dat->text_replace_smileys && dat->second_line_draw_smileys && !dat->text_resize_smileys)
tmp = max(tmp, dat->text_smiley_height);
- max_height += dat->second_line_top_space + tmp;
+ max_height += dat->second_line_top_space + tmp;
}
if (dat->third_line_show) {
tmp = dat->fontModernInfo[FONTID_THIRDLINE].fontHeight;
if (dat->text_replace_smileys && dat->third_line_draw_smileys && !dat->text_resize_smileys)
tmp = max(tmp, dat->text_smiley_height);
- max_height += dat->third_line_top_space + tmp;
+ max_height += dat->third_line_top_space + tmp;
}
// Get other font sizes
@@ -586,16 +587,16 @@ int RowHeights_GetRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact,
}
// Avatar size
- if (dat->avatars_show && !dat->avatars_ignore_size_for_row_height &&
- contact->type == CLCIT_CONTACT &&
+ if (dat->avatars_show && !dat->avatars_ignore_size_for_row_height &&
+ contact->type == CLCIT_CONTACT &&
((dat->use_avatar_service && contact->avatar_data != NULL) || (!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE)) && !minimalistic )
{
height = max(height, dat->avatars_maxheight_size);
}
// Checkbox size
- if ((style & CLS_CHECKBOXES && contact->type == CLCIT_CONTACT) ||
- (style & CLS_GROUPCHECKBOXES && contact->type == CLCIT_GROUP) ||
+ if ((style & CLS_CHECKBOXES && contact->type == CLCIT_CONTACT) ||
+ (style & CLS_GROUPCHECKBOXES && contact->type == CLCIT_GROUP) ||
(contact->type == CLCIT_INFO && contact->flags & CLCIIF_CHECKBOX))
{
height = max(height, dat->checkboxSize);
@@ -603,10 +604,10 @@ int RowHeights_GetRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact,
// Icon size
if ( !dat->icon_ignore_size_for_row_height) {
- if (contact->type == CLCIT_GROUP
- || (contact->type == CLCIT_CONTACT && contact->iImage != -1
+ if (contact->type == CLCIT_GROUP
+ || (contact->type == CLCIT_CONTACT && contact->iImage != -1
&& !(dat->icon_hide_on_avatar && dat->avatars_show
- && ((dat->use_avatar_service && contact->avatar_data != NULL) ||
+ && ((dat->use_avatar_service && contact->avatar_data != NULL) ||
(!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE))
&& !contact->image_is_special)))
{
@@ -678,7 +679,7 @@ int cliRowHitTest(ClcData *dat, int pos_y)
}
int cliGetRowHeight(ClcData *dat, int item)
-{
+{
if ( item >= dat->row_heights_size || item < 0 )
return dat->rowHeight;
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
index a04e791d11..d6a9376d67 100644
--- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
+++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
@@ -30,9 +32,9 @@ static char* rowOptTmplStr;
static ROWCELL* rowOptTmplRoot;
static ROWCELL* rowOptTA[100];
TCHAR *types[] = {
- _T("none"), _T("text1"), _T("text2"), _T("text3"), _T("status"),
- _T("avatar"), _T("extra"), _T("extra1"), _T("extra2"), _T("extra3"),
- _T("extra4"), _T("extra5"), _T("extra6"), _T("extra7"), _T("extra8"),
+ _T("none"), _T("text1"), _T("text2"), _T("text3"), _T("status"),
+ _T("avatar"), _T("extra"), _T("extra1"), _T("extra2"), _T("extra3"),
+ _T("extra4"), _T("extra5"), _T("extra6"), _T("extra7"), _T("extra8"),
_T("extra9"), _T("time"), _T("space"), _T("fspace")
};
@@ -58,7 +60,7 @@ void rowOptShowSettings(HWND hwnd)
TreeView_GetItem(GetDlgItem(hwnd, IDC_ROWTREE), &tvi);
cell = (pROWCELL)tvi.lParam;
-
+
if ( !tvi.hItem) {
EnableWindow(GetDlgItem(hwnd,IDC_CONTTYPE) ,0);
EnableWindow(GetDlgItem(hwnd,IDC_VALIGN),0);
@@ -96,7 +98,7 @@ void rowOptShowSettings(HWND hwnd)
}
SendDlgItemMessage(hwnd, IDC_CONTTYPE, CB_SETCURSEL, cell->type, 0);
-
+
switch (cell->valign) {
case TC_VCENTER:
param = 1;
@@ -198,13 +200,13 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti)
cell = cell->next;
}
else {
- rowAddCell(cell->child, ((ROWCELL*)tviparent.lParam)->cont == TC_ROW?TC_COL:TC_ROW);
+ rowAddCell(cell->child, ((ROWCELL*)tviparent.lParam)->cont == TC_ROW?TC_COL:TC_ROW);
cell = cell->child;
}
tvis.hInsertAfter = TVI_LAST;
}
-
+
tvis.item.lParam = (LPARAM)cell;
tvis.hParent = hti;
@@ -213,7 +215,7 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti)
tvis.item.iImage = 2;
tvis.item.iSelectedImage = 2;
- TreeView_InsertItem(htree,&tvis);
+ TreeView_InsertItem(htree,&tvis);
TreeView_Expand(htree, hti, TVM_EXPAND);
@@ -259,11 +261,11 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
}
else
{
-
- tvpi.lParam = 0;
+
+ tvpi.lParam = 0;
rowOptTmplRoot = (pROWCELL)tvpi.lParam;
}
-
+
}
((pROWCELL)tvi.lParam)->next = NULL;
@@ -276,11 +278,11 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
}
TreeView_DeleteItem(htree, hti);
-
+
// Change icon at parent item
if ( !prnt || (prnt != prev)) return;
-
+
if ( TreeView_GetChild(htree, prnt))
{
tvpi.iImage = 1;
@@ -292,7 +294,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
tvpi.iSelectedImage = 2;
}
TreeView_SetItem(htree, &tvpi);
-
+
}
void RefreshTree(HWND hwndDlg,HTREEITEM hti)
@@ -302,7 +304,7 @@ void RefreshTree(HWND hwndDlg,HTREEITEM hti)
TVITEM tvi = {0};
if (hti == NULL) hti = TreeView_GetRoot(htree);
while (hti)
- {
+ {
tvi.hItem = hti;
tvi.mask = TVIF_HANDLE;//|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_TEXT;
TreeView_GetItem(htree, &tvi);
@@ -336,7 +338,7 @@ void RefreshTree(HWND hwndDlg,HTREEITEM hti)
hti = TreeView_GetNextSibling(htree,hti);
}
- RedrawWindow(hwndDlg,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ RedrawWindow(hwndDlg,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW|RDW_ALLCHILDREN);
}
INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -347,7 +349,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
int hbuf = 0, seq = 0;
HWND htree = GetDlgItem(hwndDlg,IDC_ROWTREE);
- TranslateDialogDefault(hwndDlg);
+ TranslateDialogDefault(hwndDlg);
rowOptTmplStr = db_get_sa(NULL, "ModernData", "RowTemplate");
if ( !rowOptTmplStr)
rowOptTmplStr = mir_strdup("<TR />");
@@ -409,7 +411,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (HIWORD(wParam) == CBN_SELENDOK) {
TVITEM tv = {0};
int index = SendMessage(GetDlgItem(hwndDlg,IDC_CONTTYPE),CB_GETCURSEL, 0, 0);
- cell->type = index;
+ cell->type = index;
RefreshTree(hwndDlg,NULL);
}
@@ -447,9 +449,9 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
if (HIWORD(wParam) == BN_CLICKED) {
- if (lParam == (LPARAM)GetDlgItem(hwndDlg,IDC_ADDCONTAINER))
+ if (lParam == (LPARAM)GetDlgItem(hwndDlg,IDC_ADDCONTAINER))
// Adding new container
- {
+ {
rowOptAddContainer(htree, hti);
}
else if (lParam == (LPARAM)GetDlgItem(hwndDlg,IDC_DELCONTAINER))
@@ -463,7 +465,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
RedrawWindow(htree,&da,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW|RDW_ALLCHILDREN);
}
RefreshTree(hwndDlg,NULL);
- RedrawWindow(GetParent(hwndDlg),NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ RedrawWindow(GetParent(hwndDlg),NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW|RDW_ALLCHILDREN);
}
return TRUE;
}
@@ -539,7 +541,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
i++;
}
- rowSizeWithReposition(rowOptTmplRoot, da.right-da.left);
+ rowSizeWithReposition(rowOptTmplRoot, da.right-da.left);
i = -1;
while (rowOptTA[++i]) {
@@ -550,11 +552,11 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case 0:
//if (rowOptTA[i] != (pROWCELL)curItem.lParam)
continue;
- }
- Rectangle(hdc,
- rowOptTA[i]->r.left + da.left,
- rowOptTA[i]->r.top + da.top,
- rowOptTA[i]->r.right + da.left,
+ }
+ Rectangle(hdc,
+ rowOptTA[i]->r.left + da.left,
+ rowOptTA[i]->r.top + da.top,
+ rowOptTA[i]->r.right + da.left,
rowOptTA[i]->r.bottom + da.top);
}
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp
index 7949f1eecf..57fe0f2293 100644
--- a/plugins/Clist_modern/src/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/src/modern_skinbutton.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -24,15 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/*
This file contains code related to new modern free positioned skinned buttons
*/
-#include "hdr/modern_commonheaders.h"
+
+#include "hdr/modern_commonheaders.h"
#include "hdr/modern_skinengine.h"
#include "hdr/modern_clcpaint.h"
#include "m_api/m_skinbutton.h"
-
-
-
-
#define MODERNSKINBUTTONCLASS "MirandaModernSkinButtonClass"
BOOL ModernSkinButtonModuleIsLoaded = FALSE;
static HANDLE hookSystemShutdown_ModernSkinButton = NULL;
@@ -52,7 +50,7 @@ typedef struct _ModernSkinButtonCtrl
char * ID;
char * CommandService;
char * StateService;
- char * HandleService;
+ char * HandleService;
char * ValueDBSection;
char * ValueTypeDef;
int Left, Top, Bottom, Right;
@@ -72,9 +70,9 @@ typedef struct _HandleServiceParams
static CRITICAL_SECTION csTips;
static HWND hwndToolTips = NULL;
-int ModernSkinButtonLoadModule()
+int ModernSkinButtonLoadModule()
{
- WNDCLASSEX wc;
+ WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.lpszClassName = _T(MODERNSKINBUTTONCLASS);
@@ -108,7 +106,7 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
if ( !whdc && !g_CluiData.fLayered) InvalidateRect(hwnd,NULL,FALSE);
if (whdc && g_CluiData.fLayered) hdc = whdc;
- else
+ else
{
//sdc = GetWindowDC(GetParent(hwnd));
hdc = CreateCompatibleDC(NULL);
@@ -135,7 +133,7 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
section = key;
if (bct->ValueTypeDef[0] != 's')
defval = (DWORD)atol(bct->ValueTypeDef+1);
- do
+ do
{
if (key[0] == '/') {key[0] = '\0'; key++; break;}
key++;
@@ -148,7 +146,7 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
if ( !Value)
Value = mir_strdup(bct->ValueTypeDef+1);
break;
- }
+ }
case 'd':
defval = db_get_dw(NULL,section,key,defval);
Value = mir_strdup(_ltoa(defval,buf,SIZEOF(buf)));
@@ -163,7 +161,7 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
break;
}
mir_free(section);
- }
+ }
}
g_clcPainter.AddParam(&Request,mod_CalcHash("Module"),"MButton",0);
@@ -174,13 +172,13 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
if (Value) {
g_clcPainter.AddParam(&Request,mod_CalcHash("Value"),Value,0);
mir_free(Value);
- }
+ }
SkinDrawGlyphMask(hdc,&rc,&rc,&Request);
SkinSelector_DeleteMask(&Request);
// DeleteObject(br);
}
- if ( !whdc && g_CluiData.fLayered)
+ if ( !whdc && g_CluiData.fLayered)
{
RECT r;
SetRect(&r,bct->Left,bct->Top,bct->Right,bct->Bottom);
@@ -195,12 +193,12 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
}
SelectObject(hdc,oldbmp);
DeleteObject(bmp);
- if ( !whdc || !g_CluiData.fLayered)
- {
+ if ( !whdc || !g_CluiData.fLayered)
+ {
SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT));
DeleteDC(hdc);
}
- // if (sdc)
+ // if (sdc)
// ReleaseDC(GetParent(hwnd),sdc);
return 0;
}
@@ -219,7 +217,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection,char *ValueTypeDe
// char buf[20];
key = mir_strdup(ValueDBSection);
section = key;
- do
+ do
{
if (key[0] == '/') {key[0] = '\0'; key++; break;}
key++;
@@ -227,7 +225,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection,char *ValueTypeDe
val = mir_strdup(ValueTypeDef+1);
val2 = val;
- do
+ do
{
if (val2[0] == '/') {val2[0] = '\0'; val2++; break;}
val2++;
@@ -244,12 +242,12 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection,char *ValueTypeDe
Value = db_get_sa(NULL,section,key);
if ( !Value || (Value && mir_bool_strcmpi(Value,val2)))
Value = mir_strdup(val);
- else
+ else
Value = mir_strdup(val2);
db_set_s(NULL,section,key,Value);
mir_free(Value);
break;
-
+
case 'd':
curval = db_get_dw(NULL,section,key,l2);
curval = (curval == l2)?l1:l2;
@@ -259,18 +257,18 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection,char *ValueTypeDe
case 'w':
curval = db_get_w(NULL,section,key,l2);
curval = (curval == l2)?l1:l2;
- db_set_w(NULL,section,key,(WORD)curval);
+ db_set_w(NULL,section,key,(WORD)curval);
break;
case 'b':
curval = db_get_b(NULL,section,key,l2);
curval = (curval == l2)?l1:l2;
- db_set_b(NULL,section,key,(BYTE)curval);
+ db_set_b(NULL,section,key,(BYTE)curval);
break;
- }
+ }
mir_free(section);
mir_free(val);
- }
+ }
return 0;
}
@@ -279,9 +277,9 @@ static char *_skipblank(char * str) //str will be modified;
char * endstr = str+strlen(str);
while ((*str == ' ' || *str == '\t') && *str != '\0') str++;
while ((*endstr == ' ' || *endstr == '\t') && *endstr != '\0' && endstr < str) endstr--;
- if (*endstr != '\0')
+ if (*endstr != '\0')
{
- endstr++;
+ endstr++;
*endstr = '\0';
}
return str;
@@ -300,7 +298,7 @@ static int _CallServiceStrParams(IN char * toParce, OUT int *Return)
{
paramCount++;
*param2 = '\0'; param2++;
- _skipblank(param2);
+ _skipblank(param2);
if (strlen(param2) == 0) param2 = NULL;
}
param1 = strrchr(pszService, '%');
@@ -333,7 +331,7 @@ static int _CallServiceStrParams(IN char * toParce, OUT int *Return)
else if (param2)
param2 = (char*)atoi(param2);
- if (paramCount == 1)
+ if (paramCount == 1)
{
param1 = param2;
param2 = NULL;
@@ -342,10 +340,10 @@ static int _CallServiceStrParams(IN char * toParce, OUT int *Return)
{
result = 0;
}
- else
+ else
{
int ret = 0;
- result = 1;
+ result = 1;
ret = CallService(pszService, (WPARAM)param1, (WPARAM)param2);
if (Return) *Return = ret;
}
@@ -375,7 +373,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
case WM_NCCREATE:
SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
- if (((CREATESTRUCT *)lParam)->lpszName) SetWindowText(hwndDlg, ((CREATESTRUCT *)lParam)->lpszName);
+ if (((CREATESTRUCT *)lParam)->lpszName) SetWindowText(hwndDlg, ((CREATESTRUCT *)lParam)->lpszName);
return TRUE;
case WM_DESTROY:
@@ -399,9 +397,9 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
LeaveCriticalSection(&csTips);
mir_free(bct->ID);
mir_free(bct->CommandService);
- mir_free(bct->StateService);
- mir_free(bct->HandleService);
- mir_free(bct->Hint);
+ mir_free(bct->StateService);
+ mir_free(bct->HandleService);
+ mir_free(bct->Hint);
mir_free(bct->ValueDBSection);
mir_free(bct->ValueTypeDef);
mir_free(bct);
@@ -415,7 +413,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
if (hCurs1) SetCursor(hCurs1);
if (bct) SetToolTip(hwndDlg, bct->Hint);
}
- return 1;
+ return 1;
case WM_PRINT:
if (IsWindowVisible(hwndDlg))
@@ -429,7 +427,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
ModernSkinButtonPaintWorker(hwndDlg,(HDC)ps.hdc);
EndPaint(hwndDlg,&ps);
}
- return DefWindowProc(hwndDlg, msg, wParam, lParam);
+ return DefWindowProc(hwndDlg, msg, wParam, lParam);
case WM_CAPTURECHANGED:
bct->hover = 0;
@@ -460,7 +458,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
if (bct->fCallOnPress) {
if (bct->CommandService) {
if ( !_CallServiceStrParams(bct->CommandService, NULL) && (bct->ValueDBSection && bct->ValueTypeDef))
- ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
+ ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
}
bct->down = 0;
@@ -479,8 +477,8 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
if (bct->CommandService)
if (_CallServiceStrParams(bct->CommandService, NULL))
{}
- else if (bct->ValueDBSection && bct->ValueTypeDef)
- ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
+ else if (bct->ValueDBSection && bct->ValueTypeDef)
+ ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
}
}
return DefWindowProc(hwndDlg, msg, wParam, lParam);
@@ -501,7 +499,7 @@ HWND SetToolTip(HWND hwnd, TCHAR * tip)
hwnd, NULL, GetModuleHandle(NULL),
NULL);
- SetWindowPos(hwndToolTips, HWND_TOPMOST, 0, 0, 0, 0,
+ SetWindowPos(hwndToolTips, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
@@ -543,11 +541,11 @@ int ModernSkinButton_AddButton(HWND parent,
char * ID,
char * CommandService,
char * StateDefService,
- char * HandeService,
- int Left,
- int Top,
- int Right,
- int Bottom,
+ char * HandeService,
+ int Left,
+ int Top,
+ int Right,
+ int Bottom,
DWORD sbFlags,
TCHAR * Hint,
char * DBkey,
@@ -566,20 +564,20 @@ int ModernSkinButton_AddButton(HWND parent,
ModernSkinButtonCtrl* bct;
int l,r,b,t;
if (parent) GetClientRect(parent,&rc);
- l = ( sbFlags & SBF_ALIGN_TL_RIGHT ) ? ( rc.right + Left ) :
- ( sbFlags & SBF_ALIGN_TL_HCENTER ) ? ( _center_h( &rc ) + Left ) :
+ l = ( sbFlags & SBF_ALIGN_TL_RIGHT ) ? ( rc.right + Left ) :
+ ( sbFlags & SBF_ALIGN_TL_HCENTER ) ? ( _center_h( &rc ) + Left ) :
( rc.left + Left );
-
- t = ( sbFlags & SBF_ALIGN_TL_BOTTOM ) ? ( rc.bottom + Top ) :
+
+ t = ( sbFlags & SBF_ALIGN_TL_BOTTOM ) ? ( rc.bottom + Top ) :
( sbFlags & SBF_ALIGN_TL_VCENTER ) ? ( _center_v( &rc ) + Top ) :
( rc.top+Top );
-
+
r = ( sbFlags & SBF_ALIGN_BR_RIGHT ) ? ( rc.right + Right ) :
( sbFlags & SBF_ALIGN_BR_HCENTER ) ? ( _center_h( &rc) + Right ) :
( rc.left + Right );
-
- b = ( sbFlags & SBF_ALIGN_BR_BOTTOM ) ? ( rc.bottom + Bottom ) :
- ( sbFlags & SBF_ALIGN_BR_VCENTER ) ? ( _center_v( &rc ) + Bottom ) :
+
+ b = ( sbFlags & SBF_ALIGN_BR_BOTTOM ) ? ( rc.bottom + Bottom ) :
+ ( sbFlags & SBF_ALIGN_BR_VCENTER ) ? ( _center_v( &rc ) + Bottom ) :
( rc.top + Bottom );
bct = (ModernSkinButtonCtrl *)mir_alloc(sizeof(ModernSkinButtonCtrl));
memset(bct, 0, sizeof(ModernSkinButtonCtrl));
@@ -601,7 +599,7 @@ int ModernSkinButton_AddButton(HWND parent,
Buttons[ButtonsCount].OrT = Top;
Buttons[ButtonsCount].OrR = Right;
Buttons[ButtonsCount].OrB = Bottom;
- Buttons[ButtonsCount].ConstrainPositionFrom = (BYTE)sbFlags;
+ Buttons[ButtonsCount].ConstrainPositionFrom = (BYTE)sbFlags;
Buttons[ButtonsCount].minH = MinHeight;
Buttons[ButtonsCount].minW = MinWidth;
ButtonsCount++;
@@ -623,7 +621,7 @@ static int ModernSkinButtonErase(int l,int t,int r, int b)
{
for (i=0; i < ButtonsCount; i++)
{
- if (pcli->hwndContactList && Buttons[i].hwnd != NULL)
+ if (pcli->hwndContactList && Buttons[i].hwnd != NULL)
{
//TODO: Erase button
BitBlt(g_pCachedWindow->hImageDC,Buttons[i].bct->Left,Buttons[i].bct->Top,Buttons[i].bct->Right-Buttons[i].bct->Left,Buttons[i].bct->Bottom-Buttons[i].bct->Top,
@@ -646,11 +644,11 @@ static HWND ModernSkinButtonCreateWindow(ModernSkinButtonCtrl * bct, HWND parent
{
TCHAR *UnicodeID;
UnicodeID = mir_a2u(bct->ID);
- hwnd = CreateWindow(_T(MODERNSKINBUTTONCLASS),UnicodeID,WS_VISIBLE|WS_CHILD,bct->Left,bct->Top,bct->Right-bct->Left,bct->Bottom-bct->Top,parent,NULL,g_hInst,NULL);
+ hwnd = CreateWindow(_T(MODERNSKINBUTTONCLASS),UnicodeID,WS_VISIBLE|WS_CHILD,bct->Left,bct->Top,bct->Right-bct->Left,bct->Bottom-bct->Top,parent,NULL,g_hInst,NULL);
mir_free(UnicodeID);
}
- bct->hwnd = hwnd;
+ bct->hwnd = hwnd;
bct->focus = 0;
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)bct);
return hwnd;
@@ -665,7 +663,7 @@ int ModernSkinButtonRedrawAll(HDC hdc)
{
if (pcli->hwndContactList && Buttons[i].hwnd == NULL)
Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct,pcli->hwndContactList);
- ModernSkinButtonPaintWorker(Buttons[i].hwnd,0);
+ ModernSkinButtonPaintWorker(Buttons[i].hwnd,0);
}
g_mutex_bLockUpdating--;
return 0;
@@ -697,7 +695,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT *r)
GetWindowRect(parent,&rd);
GetClientRect(parent,&clr);
if ( !r)
- GetWindowRect(parent,&rc);
+ GetWindowRect(parent,&rc);
else
rc = *r;
if (g_CluiData.fLayered && ( draw & SBRF_DO_ALT_DRAW ))
@@ -725,32 +723,32 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT *r)
altDraw = FALSE;
}
- l = ( sbFlags & SBF_ALIGN_TL_RIGHT ) ? ( rc.right + Buttons[i].OrL ) :
- ( sbFlags & SBF_ALIGN_TL_HCENTER ) ? ( _center_h( &rc ) + Buttons[i].OrL ) :
+ l = ( sbFlags & SBF_ALIGN_TL_RIGHT ) ? ( rc.right + Buttons[i].OrL ) :
+ ( sbFlags & SBF_ALIGN_TL_HCENTER ) ? ( _center_h( &rc ) + Buttons[i].OrL ) :
( rc.left + Buttons[i].OrL );
-
- t = ( sbFlags & SBF_ALIGN_TL_BOTTOM ) ? ( rc.bottom + Buttons[i].OrT ) :
+
+ t = ( sbFlags & SBF_ALIGN_TL_BOTTOM ) ? ( rc.bottom + Buttons[i].OrT ) :
( sbFlags & SBF_ALIGN_TL_VCENTER ) ? ( _center_v( &rc ) + Buttons[i].OrT ) :
( rc.top + Buttons[i].OrT );
-
+
r = ( sbFlags & SBF_ALIGN_BR_RIGHT ) ? ( rc.right + Buttons[i].OrR ) :
( sbFlags & SBF_ALIGN_BR_HCENTER ) ? ( _center_h( &rc) + Buttons[i].OrR ) :
( rc.left + Buttons[i].OrR );
-
- b = ( sbFlags & SBF_ALIGN_BR_BOTTOM ) ? ( rc.bottom + Buttons[i].OrB ) :
- ( sbFlags & SBF_ALIGN_BR_VCENTER ) ? ( _center_v( &rc ) + Buttons[i].OrB ) :
+
+ b = ( sbFlags & SBF_ALIGN_BR_BOTTOM ) ? ( rc.bottom + Buttons[i].OrB ) :
+ ( sbFlags & SBF_ALIGN_BR_VCENTER ) ? ( _center_v( &rc ) + Buttons[i].OrB ) :
( rc.top + Buttons[i].OrB );
-
+
SetWindowPos(Buttons[i].hwnd,HWND_TOP,l,t,r-l,b-t,0);
- if ( (rc.right-rc.left < Buttons[i].minW /* && Buttons[i].minW != 0*/)
+ if ( (rc.right-rc.left < Buttons[i].minW /* && Buttons[i].minW != 0*/)
|| (rc.bottom-rc.top < Buttons[i].minH /* && Buttons[i].minH != 0*/))
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_HIDE);
- else
+ else
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_SHOW);
- if ((1 || altDraw) &&
- (Buttons[i].bct->Left != l ||
- Buttons[i].bct->Top != t ||
- Buttons[i].bct->Right != r ||
+ if ((1 || altDraw) &&
+ (Buttons[i].bct->Left != l ||
+ Buttons[i].bct->Top != t ||
+ Buttons[i].bct->Right != r ||
Buttons[i].bct->Bottom != b))
{
//Need to erase in old location
diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp
index 14d81f762d..c30ac25df9 100644
--- a/plugins/Clist_modern/src/modern_skineditor.cpp
+++ b/plugins/Clist_modern/src/modern_skineditor.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
@@ -39,14 +41,14 @@ int gl_controlID = 0;
int EnableGroup(HWND hwndDlg, HWND first, BOOL bEnable);
int ShowGroup(HWND hwndDlg, HWND first, BOOL bEnable);
BOOL glOtherSkinWasLoaded = FALSE;
-BYTE glSkinWasModified = 0; //1- but not applied, 2-stored to DB
+BYTE glSkinWasModified = 0; //1- but not applied, 2-stored to DB
HTREEITEM FindChild(HWND hTree, HTREEITEM Parent, TCHAR *Caption)
{
HTREEITEM res = NULL, tmp = NULL;
- if (Parent)
+ if (Parent)
tmp = TreeView_GetChild(hTree,Parent);
- else
+ else
tmp = TreeView_GetRoot(hTree);
while (tmp)
{
@@ -78,8 +80,8 @@ int TreeAddObject(HWND hwndDlg, int ID, OPT_OBJECT_DATA * data)
}
ptr = path;
- ptrE = path;
- do
+ ptrE = path;
+ do
{
while (*ptrE != '/' && *ptrE != '\0') ptrE++;
if (*ptrE == '/')
@@ -98,15 +100,15 @@ int TreeAddObject(HWND hwndDlg, int ID, OPT_OBJECT_DATA * data)
tvis.item.pszText = ptr;
tvis.item.lParam = 0;
cItem = TreeView_InsertItem(GetDlgItem(hwndDlg, ID), &tvis);
-
- }
+
+ }
rootItem = cItem;
}
ptr = ptrE;
}
else ext = TRUE;
}while (!ext);
-
+
//Insert item node
{
TVINSERTSTRUCT tvis;
@@ -142,8 +144,8 @@ int enumDB_SkinObjectsForEditorProc(const char *szSetting,LPARAM lParam)
mir_free(value);
mir_free(desc);
}
- mir_free(descKey);
- }
+ mir_free(descKey);
+ }
return 0;
}
@@ -168,12 +170,12 @@ void SetAppropriateGroups(HWND hwndDlg, int Type)
switch (Type)
{
case -1:
- {
+ {
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_1),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_COLOUR),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_ALPHA),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_2),FALSE);
- EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_3),FALSE);
+ EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_3),FALSE);
ShowWindow(GetDlgItem(hwndDlg,IDC_S_SIZE),FALSE);
}
break;
@@ -183,7 +185,7 @@ void SetAppropriateGroups(HWND hwndDlg, int Type)
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_COLOUR),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_ALPHA),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_2),FALSE);
- EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_3),FALSE);
+ EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_3),FALSE);
ShowWindow(GetDlgItem(hwndDlg,IDC_S_SIZE),FALSE);
}
break;
@@ -192,7 +194,7 @@ void SetAppropriateGroups(HWND hwndDlg, int Type)
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_1),TRUE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_COLOUR),TRUE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_ALPHA),TRUE);
- EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_2),FALSE);
+ EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_2),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_3),FALSE);
ShowWindow(GetDlgItem(hwndDlg,IDC_S_SIZE),FALSE);
//Set Color and alpha
@@ -227,7 +229,7 @@ void SetControls(HWND hwndDlg, TCHAR *str)
{
if ( !str)
{
- SetAppropriateGroups(hwndDlg,-1);
+ SetAppropriateGroups(hwndDlg,-1);
return;
}
@@ -256,27 +258,27 @@ void SetControls(HWND hwndDlg, TCHAR *str)
case 2:
{
int fitmode = 0;
-
+
int l = _ttoi(GetParamN(str,buf,SIZEOF(buf),4,',',TRUE));
int t = _ttoi(GetParamN(str,buf,SIZEOF(buf),5,',',TRUE));
int r = _ttoi(GetParamN(str,buf,SIZEOF(buf),6,',',TRUE));
int b = _ttoi(GetParamN(str,buf,SIZEOF(buf),7,',',TRUE));
int a = _ttoi(GetParamN(str,buf,SIZEOF(buf),8,',',TRUE));
-
+
SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(a,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS, 0, MAKELONG(l,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS, 0, MAKELONG(t,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETPOS, 0, MAKELONG(r,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETPOS, 0, MAKELONG(b,0));
-
+
GetParamN(str,buf,SIZEOF(buf),2,',',TRUE);
SetDlgItemText(hwndDlg,IDC_FILE,buf);
-
+
GetParamN(str,buf,SIZEOF(buf),3,',',TRUE);
if (!lstrcmpi(buf,_T("TileBoth"))) fitmode = FM_TILE_BOTH;
else if (!lstrcmpi(buf,_T("TileVert"))) fitmode = FM_TILE_VERT;
else if (!lstrcmpi(buf,_T("TileHorz"))) fitmode = FM_TILE_HORZ;
- else fitmode = 0;
+ else fitmode = 0;
SendDlgItemMessage(hwndDlg,IDC_FIT,CB_SETCURSEL,(WPARAM)fitmode,0);
}
@@ -284,7 +286,7 @@ void SetControls(HWND hwndDlg, TCHAR *str)
case 3:
{
int fitmode = 0;
-
+
int x = _ttoi(GetParamN(str,buf,SIZEOF(buf),3,',',TRUE));
int y = _ttoi(GetParamN(str,buf,SIZEOF(buf),4,',',TRUE));
int w = _ttoi(GetParamN(str,buf,SIZEOF(buf),5,',',TRUE));
@@ -295,7 +297,7 @@ void SetControls(HWND hwndDlg, TCHAR *str)
int r = _ttoi(GetParamN(str,buf,SIZEOF(buf),10, ',',TRUE));
int b = _ttoi(GetParamN(str,buf,SIZEOF(buf),11,',',TRUE));
int a = _ttoi(GetParamN(str,buf,SIZEOF(buf),12,',',TRUE));
-
+
SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(a,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS, 0, MAKELONG(l,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS, 0, MAKELONG(t,0));
@@ -306,15 +308,15 @@ void SetControls(HWND hwndDlg, TCHAR *str)
SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETPOS, 0, MAKELONG(y,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETPOS, 0, MAKELONG(w,0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETPOS, 0, MAKELONG(h,0));
-
+
GetParamN(str,buf,SIZEOF(buf),2,',',TRUE);
SetDlgItemText(hwndDlg,IDC_FILE,buf);
-
+
GetParamN(str,buf,SIZEOF(buf),7,',',TRUE);
if (!lstrcmpi(buf,_T("TileBoth"))) fitmode = FM_TILE_BOTH;
else if (!lstrcmpi(buf,_T("TileVert"))) fitmode = FM_TILE_VERT;
else if (!lstrcmpi(buf,_T("TileHorz"))) fitmode = FM_TILE_HORZ;
- else fitmode = 0;
+ else fitmode = 0;
SendDlgItemMessage(hwndDlg,IDC_FIT,CB_SETCURSEL,(WPARAM)fitmode,0);
}
@@ -336,13 +338,13 @@ int GetShortFileName(TCHAR *FullFile)
mir_free(file);
return 1; //skin folder relative
}
-
+
PathToRelativeT(FullFile, buf);
if (buf[0] != '\\' && buf[1] != ':')
mir_sntprintf(FullFile, MAX_PATH, _T("\\%s"), buf);
else
_tcsncpy(FullFile, buf, MAX_PATH);
-
+
mir_free(file);
return 2; //mirand folder relative
}
@@ -419,7 +421,7 @@ TCHAR* MadeString(HWND hwndDlg)
void UpdateInfo(HWND hwndDlg)
{
TCHAR *b = MadeString(hwndDlg);
- if (!b)
+ if (!b)
{
SetDlgItemText(hwndDlg,IDC_EDIT1,_T(""));
return;
@@ -497,7 +499,7 @@ int GetFileSizes(HWND hwndDlg)
ske_UnloadGlyphImage(hbmp);
}
- mir_sntprintf(buf, MAX_PATH, _T("%s %d x %d %s"),TranslateT("Image size is"), sz.cx, sz.cy, TranslateT("pixels"));
+ mir_sntprintf(buf, MAX_PATH, _T("%s %d x %d %s"),TranslateT("Image size is"), sz.cx, sz.cy, TranslateT("pixels"));
SetDlgItemText(hwndDlg, IDC_S_SIZE, buf);
return 0;
}
@@ -548,7 +550,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETRANGE, 0, MAKELONG(1000, 0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETRANGE, 0, MAKELONG(1000, 0));
SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETRANGE, 0, MAKELONG(1000, 0));
- }
+ }
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_1),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_COLOUR),FALSE);
EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_ALPHA),FALSE);
@@ -560,8 +562,8 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
glOtherSkinWasLoaded = FALSE;
break;
- case WM_COMMAND:
- {
+ case WM_COMMAND:
+ {
if (LOWORD(wParam) == IDC_TYPE)
{
if (HIWORD(wParam) == CBN_SELCHANGE)
@@ -581,7 +583,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
mir_free_and_nil(object_clipboard);
- OPT_OBJECT_DATA *sd = NULL;
+ OPT_OBJECT_DATA *sd = NULL;
HTREEITEM hti = TreeView_GetSelection(GetDlgItem(hwndDlg,IDC_OBJECT_TREE));
if (hti != 0)
{
@@ -591,7 +593,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TreeView_GetItem(GetDlgItem(hwndDlg,IDC_OBJECT_TREE),&tvi);
sd = (OPT_OBJECT_DATA*)(tvi.lParam);
}
- if (sd && sd->szValue)
+ if (sd && sd->szValue)
object_clipboard = mir_tstrdup(sd->szValue);
EnableWindow(GetDlgItem(hwndDlg,IDC_PASTE),object_clipboard != NULL);
@@ -602,7 +604,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
if (HIWORD(wParam) == BN_CLICKED)
{
- if (object_clipboard)
+ if (object_clipboard)
SetControls(hwndDlg, object_clipboard);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
UpdateInfo(hwndDlg);
@@ -621,7 +623,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
int res = 0;
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
- ofn.hInstance = NULL;
+ ofn.hInstance = NULL;
ofn.lpstrFilter = _T("Images (*.png,*.jpg,*.bmp,*.gif,*.tga)\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tga\0All files (*.*)\0*.*\0\0");
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
GetDlgItemText(hwndDlg, IDC_FILE, str, SIZEOF(str));
@@ -675,7 +677,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
|| LOWORD(wParam) == IDC_E_W
|| LOWORD(wParam) == IDC_E_H
|| LOWORD(wParam) == IDC_EDIT_ALPHA
- )
+ )
&& HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
{
return 0;
@@ -744,10 +746,10 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
StoreTreeToDB(GetDlgItem(hwndDlg,IDC_OBJECT_TREE),SKIN);
//ReloadSkin
- ske_LoadSkinFromDB();
+ ske_LoadSkinFromDB();
pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, 0, 0);
Sync(CLUIFrames_OnClistResize_mod, 0, 0);
- ske_RedrawCompleteWindow();
+ ske_RedrawCompleteWindow();
Sync(CLUIFrames_OnClistResize_mod, 0, 0);
{
HWND hwnd = pcli->hwndContactList;
@@ -757,13 +759,13 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
return TRUE;
}
- else
+ else
return TRUE;
}
break;
}
- case WM_DESTROY:
+ case WM_DESTROY:
mir_free(object_clipboard);
break;
@@ -781,7 +783,7 @@ int EnableGroup(HWND hwndDlg, HWND first, BOOL bEnable)
EnableWindow(hwnd,bEnable);
hwnd = GetWindow(hwnd,GW_HWNDNEXT);
if ( !hwnd || GetWindowLongPtr(hwnd,GWL_STYLE)&WS_GROUP) exit = TRUE;
- }
+ }
while (!exit);
return 0;
}
@@ -800,4 +802,3 @@ int ShowGroup(HWND hwndDlg, HWND first, BOOL bEnable)
while (!exit);
return 0;
}
-
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 1154dd2e3f..114532d0a2 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index aa5a246e9c..aa0323f9dc 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index 2e242807b6..9253351990 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -1,8 +1,9 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 729814fc7d..a8de213731 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -1,9 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,11 +21,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_commonprototypes.h"
#include "hdr/modern_defsettings.h"
-//#include "hdr/modern_effectenum.h"
typedef struct _StatusBarProtocolOptions
{
@@ -314,8 +315,8 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
return TRUE;
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_BUTTON1)
- {
+ if (LOWORD(wParam) == IDC_BUTTON1)
+ {
if (HIWORD(wParam) == BN_CLICKED)
{
CHOOSEFONTA fnt;
@@ -327,7 +328,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
ChooseFontA(&fnt);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
return 0;
- }
+ }
}
else if (LOWORD(wParam) == IDC_COLOUR || (LOWORD(wParam) == IDC_SBAR_HORIZ_ALIGN && HIWORD(wParam) == CBN_SELCHANGE)) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
else if (LOWORD(wParam) == IDC_SHOWSBAR) {
@@ -369,7 +370,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
UpdateStatusBarOptionsDisplay(hwndDlg);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
else if (LOWORD(wParam) == IDC_STATUSBAR_PER_PROTO)
{
@@ -383,10 +384,10 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
else if (
- LOWORD(wParam) == IDC_SHOWXSTATUS ||
- LOWORD(wParam) == IDC_SHOWBOTH ||
- LOWORD(wParam) == IDC_SHOWNORMAL ||
- LOWORD(wParam) == IDC_TRANSPARENTOVERLAY ||
+ LOWORD(wParam) == IDC_SHOWXSTATUS ||
+ LOWORD(wParam) == IDC_SHOWBOTH ||
+ LOWORD(wParam) == IDC_SHOWNORMAL ||
+ LOWORD(wParam) == IDC_TRANSPARENTOVERLAY ||
LOWORD(wParam) == IDC_SHOWXSTATUSNAME)
{
UpdateXStatusIconOptions(hwndDlg, perProto, dat, curSelProto);
@@ -449,17 +450,17 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
_GlobalOptions.PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS, 0, 0);
}
else if ((
- LOWORD(wParam) == IDC_MULTI_COUNT ||
- LOWORD(wParam) == IDC_OFFSETICON ||
- LOWORD(wParam) == IDC_OFFSETICON2 ||
- LOWORD(wParam) == IDC_OFFSETICON3 ||
- LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM ||
+ LOWORD(wParam) == IDC_MULTI_COUNT ||
+ LOWORD(wParam) == IDC_OFFSETICON ||
+ LOWORD(wParam) == IDC_OFFSETICON2 ||
+ LOWORD(wParam) == IDC_OFFSETICON3 ||
+ LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM ||
LOWORD(wParam) == IDC_SBAR_BORDER_TOP
) && (
- HIWORD(wParam) != EN_CHANGE ||
+ HIWORD(wParam) != EN_CHANGE ||
(HWND)lParam != GetFocus()
))
- return 0; // dont make apply enabled during buddy set crap
+ return 0; // dont make apply enabled during buddy set crap
else if ( LOWORD(wParam) == IDC_STATUSBAR_PROTO_LIST )
{
UpdateStatusBarOptionsDisplay(hwndDlg);
@@ -523,7 +524,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
db_set_b(NULL,"CLUI","ShowSBar",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
LoadStatusBarData();
- cliCluiProtocolStatusChanged(0, 0);
+ cliCluiProtocolStatusChanged(0, 0);
return TRUE;
}
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 0968afe4b6..8541674d50 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -1,11 +1,12 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-
+Miranda NG: the free IM client for Microsoft* Windows*
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
Copyright 2007 Artem Shpynov
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -37,7 +38,7 @@ struct
BOOL bVisByDefault;
HANDLE hButton;
}
-static BTNS[] =
+static BTNS[] =
{
{ "MainMenu", LPGEN("Main menu"), "CList/ShowMainMenu", LPGEN("Main menu"), NULL, 100 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE },
{ "StatusMenu", LPGEN("Status menu"), "CList/ShowStatusMenu", LPGEN("Status menu"), NULL, 105 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE },
@@ -107,7 +108,7 @@ struct
HBITMAP mtb_hBmpBackground;
COLORREF mtb_bkColour;
WORD mtb_backgroundBmpUse;
- BOOL mtb_useWinColors;
+ BOOL mtb_useWinColors;
}
static tbdat = { NULL, CLCDEFAULT_BKCOLOUR, CLCDEFAULT_BKBMPUSE, CLCDEFAULT_USEWINDOWSCOLOURS };
@@ -129,18 +130,18 @@ static int ehhToolBarSettingsChanged(WPARAM wParam, LPARAM lParam)
if (!mir_strcmp(cws->szSetting,"UseSound"))
SetButtonPressed(7, cws->value.bVal);
}
-
+
return 0;
}
static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT *rect, ModernToolbarCtrl* pMTBInfo)
{
BOOL bFloat = (GetParent(hwnd)!=pcli->hwndContactList);
- if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) {
+ if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) {
HBRUSH hbr;
RECT rc;
- if (rect)
+ if (rect)
rc=*rect;
else
GetClientRect(hwnd,&rc);
@@ -153,7 +154,7 @@ static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT *rect, ModernToolb
FillRect(hdc, &rc, hbr);
}
}
- else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) {
+ else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) {
hbr = CreateSolidBrush(tbdat.mtb_bkColour);
FillRect(hdc, &rc, hbr);
DeleteObject(hbr);
@@ -171,7 +172,7 @@ static void sttDrawNonLayeredSkinedBar(HWND hwnd, HDC hdc)
rc.bottom++;
HDC hdc2 = CreateCompatibleDC(hdc);
HBITMAP hbmp = ske_CreateDIB32(rc.right, rc.bottom);
- HBITMAP hbmpo = (HBITMAP)SelectObject(hdc2, hbmp);
+ HBITMAP hbmpo = (HBITMAP)SelectObject(hdc2, hbmp);
if (GetParent(hwnd) != pcli->hwndContactList) {
HBRUSH br = GetSysColorBrush(COLOR_3DFACE);
FillRect(hdc2, &rc, br);
@@ -185,7 +186,7 @@ static void sttDrawNonLayeredSkinedBar(HWND hwnd, HDC hdc)
DeleteDC(hdc2);
SelectObject(hdc, (HFONT)GetStockObject(DEFAULT_GUI_FONT));
- ValidateRect(hwnd, NULL);
+ ValidateRect(hwnd, NULL);
}
static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -196,7 +197,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case WM_ERASEBKGND:
return (g_CluiData.fDisableSkinEngine) ? sttDrawToolBarBackground(hwnd, (HDC)wParam, NULL, pMTBInfo) : 0;
- case WM_NCPAINT:
+ case WM_NCPAINT:
case WM_PAINT:
{
PAINTSTRUCT ps;
@@ -206,7 +207,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
if ((!g_CluiData.fLayered || bFloat) && !g_CluiData.fDisableSkinEngine)
sttDrawNonLayeredSkinedBar(hwnd, ps.hdc);
else
- sttDrawToolBarBackground(hwnd, ps.hdc, &ps.rcPaint, pMTBInfo);
+ sttDrawToolBarBackground(hwnd, ps.hdc, &ps.rcPaint, pMTBInfo);
EndPaint(hwnd,&ps);
}
}
@@ -222,7 +223,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
RECT MyRect={0};
HDC hDC=(HDC)wParam;
GetWindowRect(hwnd,&MyRect);
-
+
RECT rcClient;
GetClientRect(hwnd, &rcClient);
SkinDrawGlyph(hDC, &rcClient, &rcClient, "Bar,ID=ToolBar,Part=Background");
@@ -235,7 +236,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
Offset.x = childRect.left - MyRect.left;
Offset.y = childRect.top - MyRect.top;
SendMessage(mtbi->hWindow, BUTTONDRAWINPARENT, (WPARAM)hDC, (LPARAM)&Offset);
- }
+ }
}
return 0;
@@ -293,7 +294,7 @@ static void CopySettings(const char* to, const char* from, int defValue)
void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam);
static int Toolbar_ModuleReloaded(WPARAM wParam, LPARAM lParam)
-{
+{
PLUGININFOEX *pInfo = (PLUGININFOEX*)wParam;
if ( !_stricmp(pInfo->shortName, "TopToolBar"))
TopToolbar_SetCustomProc(CustomizeButton, 0);
@@ -304,7 +305,7 @@ static int Toolbar_ModuleReloaded(WPARAM wParam, LPARAM lParam)
static int Toolbar_ModulesLoaded(WPARAM, LPARAM)
{
CallService(MS_BACKGROUNDCONFIG_REGISTER, (WPARAM)(LPGEN("ToolBar Background")"/ToolBar"),0);
-
+
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ehhToolBarSettingsChanged);
TopToolbar_SetCustomProc(CustomizeButton, 0);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 47ad286f06..fdd9b79130 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -1,8 +1,10 @@
/*
-Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -165,7 +167,7 @@ static void ShowPage(HWND hwnd, int page)
static int UpdateClistItem(HANDLE hContact, DWORD mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
- SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
+ SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
(1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage));
return 0;
@@ -226,7 +228,7 @@ static int FillDialog(HWND hwnd)
item.mask = LVIF_TEXT;
item.iItem = 1000;
- for (i=0; i < protoCount; i++)
+ for (i=0; i < protoCount; i++)
{
item.pszText = accs[i]->szModuleName;
newItem = SendMessageA(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&item);
@@ -301,7 +303,7 @@ static void SetAllChildIcons(HWND hwndList,HANDLE hFirstItem,int iColumn,int iIm
//check groups
if (typeOfFirst == CLCIT_GROUP) hItem = hFirstItem;
else hItem = (HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_NEXTGROUP,(LPARAM)hFirstItem);
- while(hItem)
+ while(hItem)
{
hChildItem = (HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_CHILD,(LPARAM)hItem);
if (hChildItem)
@@ -452,7 +454,7 @@ void SaveState()
HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem == NULL)
continue;
-
+
if (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
DWORD dwLocalMask = GetMaskForItem(hItem);
db_set_dw(hContact, CLVM_MODULE, szModeName, MAKELONG(1, (unsigned short)dwLocalMask));
@@ -479,7 +481,7 @@ void SaveState()
MAKEWORD(SendDlgItemMessage(clvmHwnd, IDC_LASTMESSAGEOP, CB_GETCURSEL, 0, 0),
SendDlgItemMessage(clvmHwnd, IDC_LASTMESSAGEUNIT, CB_GETCURSEL, 0, 0)));
- SaveViewMode(szModeName, newGroupFilter, newProtoFilter, statusMask, dwGlobalMask, options,
+ SaveViewMode(szModeName, newGroupFilter, newProtoFilter, statusMask, dwGlobalMask, options,
stickies, operators, lmdat);
if (szModeName && szModeName != (char*)szTempModeName)
@@ -532,7 +534,7 @@ static void UpdateFilters()
if (db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv_gf))
goto cleanup;
mir_snprintf(szSetting, 128, "%c%s_OPT", 246, szBuf);
- if ((opt = db_get_dw(NULL, CLVM_MODULE, szSetting, -1)) != -1)
+ if ((opt = db_get_dw(NULL, CLVM_MODULE, szSetting, -1)) != -1)
{
SendDlgItemMessage(clvmHwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
}
@@ -552,7 +554,7 @@ static void UpdateFilters()
item.pszText = szTemp;
item.cchTextMax = 255;
- for (i=0; i < ListView_GetItemCount(hwndList); i++)
+ for (i=0; i < ListView_GetItemCount(hwndList); i++)
{
item.iItem = i;
SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item);
@@ -667,7 +669,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
clvmHwnd = hwndDlg;
switch(msg) {
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
xpt_EnableThemeDialogTexture(hwndDlg, ETDT_ENABLETAB);
himlViewModes = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 12, 0);
{
@@ -713,7 +715,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT,10, 0);
for (i=0; i <= FONTID_MAX; i++)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT));
-
+
CLCINFOITEM cii = { sizeof(cii) };
cii.hParentGroup = 0;
cii.pszText = TranslateT("*** All contacts ***");
@@ -889,7 +891,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
if (nm->iColumn == -1)
break;
-
+
DWORD hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
if (hItem == NULL)
@@ -897,7 +899,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if ( !(hitFlags & CLCHT_ONITEMEXTRA))
break;
-
+
int iImage = SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(nm->iColumn,0));
if (iImage == nullImage)
iImage = nm->iColumn;
@@ -970,31 +972,31 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case WM_CREATE:
{
RECT rcMargins = {12, 0, 2,0};
- hwndSelector = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP , 0, 0, 20, 20,
+ hwndSelector = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP , 0, 0, 20, 20,
hwnd, (HMENU) IDC_SELECTMODE, g_hInst, NULL);
MakeButtonSkinned(hwndSelector);
SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_TCHAR);
- SendMessage(hwndSelector, BUTTONSETMARGINS,0 ,(LPARAM) &rcMargins);
- SendMessage(hwndSelector, BUTTONSETID,0 ,(LPARAM) "ViewMode.Select");
+ SendMessage(hwndSelector, BUTTONSETMARGINS,0 ,(LPARAM) &rcMargins);
+ SendMessage(hwndSelector, BUTTONSETID,0 ,(LPARAM) "ViewMode.Select");
SendMessage(hwndSelector, WM_SETFONT,0 ,(LPARAM) FONTID_VIEMODES+1 );
SendMessage(hwndSelector, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndSelector, MBM_UPDATETRANSPARENTFLAG, 0, 2);
- SendMessage(hwndSelector, BUTTONSETSENDONDOWN, 0 ,(LPARAM) 1 );
+ SendMessage(hwndSelector, BUTTONSETSENDONDOWN, 0 ,(LPARAM) 1 );
//SendMessage(hwndSelector, BM_SETASMENUACTION, 1, 0);
- HWND hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ HWND hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_CONFIGUREMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_TCHAR);
- SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Setup");
+ SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Setup");
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
- hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_RESETMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_TCHAR);
- SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Clear");
+ SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Clear");
SendMessage(hwnd, WM_USER + 100, 0, 0);
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
@@ -1009,22 +1011,22 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
RECT rcCLVMFrame;
HDWP PosBatch = BeginDeferWindowPos(3);
GetClientRect(hwnd, &rcCLVMFrame);
- PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_RESETMODES), 0,
+ PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_RESETMODES), 0,
rcCLVMFrame.right - 23, 1, 22, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
- PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_CONFIGUREMODES), 0,
+ PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_CONFIGUREMODES), 0,
rcCLVMFrame.right - 45, 1, 22, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
- PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_SELECTMODE), 0,
+ PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_SELECTMODE), 0,
1, 1, rcCLVMFrame.right - 46, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
EndDeferWindowPos(PosBatch);
}
break;
case WM_USER + 100:
- SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), MBM_SETICOLIBHANDLE, 0,
+ SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), MBM_SETICOLIBHANDLE, 0,
(LPARAM) RegisterIcolibIconHandle("CLN_CLVM_reset", "Contact List", LPGEN("Reset view mode"), NULL, 0, g_hInst, IDI_RESETVIEW ));
- SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), MBM_SETICOLIBHANDLE, 0,
- (LPARAM) RegisterIcolibIconHandle("CLN_CLVM_set", "Contact List", LPGEN("Setup view modes"), NULL, 0, g_hInst, IDI_SETVIEW ));
+ SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), MBM_SETICOLIBHANDLE, 0,
+ (LPARAM) RegisterIcolibIconHandle("CLN_CLVM_set", "Contact List", LPGEN("Setup view modes"), NULL, 0, g_hInst, IDI_SETVIEW ));
{
for (int i=0; _buttons[i] != 0; i++) {
@@ -1053,7 +1055,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case WM_NCPAINT:
case WM_PAINT:
- if (GetParent(hwnd) == pcli->hwndContactList && g_CluiData.fLayered)
+ if (GetParent(hwnd) == pcli->hwndContactList && g_CluiData.fLayered)
ValidateRect(hwnd,NULL);
else if (GetParent(hwnd) != pcli->hwndContactList || !g_CluiData.fLayered) {
@@ -1077,7 +1079,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
else ske_BltBackImage(hwnd,hdc2,&rc);
- DrawViewModeBar(hwnd,hdc2);
+ DrawViewModeBar(hwnd,hdc2);
}
for (int i=0; _buttons[i] != 0; i++) {
@@ -1205,7 +1207,7 @@ static BOOL sttDrawViewModeBackground(HWND hwnd, HDC hdc, RECT *rect)
{
BOOL bFloat = (GetParent(hwnd) != pcli->hwndContactList);
if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat)
- {
+ {
RECT rc;
if (rect) rc = *rect;
@@ -1282,7 +1284,7 @@ void CreateViewModeFrame()
frame.align = alBottom;
frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU) 0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
- hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&frame,0);
+ hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&frame,0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)frame.hWnd,(LPARAM)ViewModePaintCallbackProc); //$$$$$ register sub for frame
@@ -1391,7 +1393,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
db_set_s(NULL, CLVM_MODULE, szSetting, name);
}
strncpy(g_CluiData.current_viewmode, name, 256);
- g_CluiData.current_viewmode[255] = 0;
+ g_CluiData.current_viewmode[255] = 0;
if (g_CluiData.filterFlags & CLVM_USELASTMSG)
{