summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-22 15:59:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-22 15:59:28 +0000
commitdde622d64e2c3ef843c70971b4f108189f19195f (patch)
tree5a09847eba74f7c487f34273655e5a432a0f0f99
parent3ed7d45f598746e4ab0495a9caff96fe4b2127d9 (diff)
clist_nicer: option to display xStatus icon instead of a usual one doesn't work
git-svn-id: http://svn.miranda-ng.org/main/trunk@7827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_nicer/src/Include/clc.h20
-rw-r--r--plugins/Clist_nicer/src/clc.cpp60
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp6
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp6
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp167
-rw-r--r--plugins/Clist_nicer/src/init.cpp33
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp1
8 files changed, 152 insertions, 143 deletions
diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h
index b53e466079..08a89895c9 100644
--- a/plugins/Clist_nicer/src/Include/clc.h
+++ b/plugins/Clist_nicer/src/Include/clc.h
@@ -118,18 +118,20 @@ struct TExtraCache
struct ClcContact : public ClcContactBase
{
- BOOL bIsMeta;
+ BOOL bIsMeta;
+ BYTE xStatus;
+ int xStatusIcon;
HANDLE hSubContact;
- BYTE xStatus;
- char *metaProto;
- DWORD codePage;
+ char *metaProto;
+ DWORD codePage;
+ WORD wStatus;
+ int avatarLeft, extraIconRightBegin;
+ int isRtl;
+ DWORD cFlags;
+ BYTE bSecondLine;
+
avatarCacheEntry *ace;
- WORD wStatus;
TExtraCache* pExtra;
- int avatarLeft, extraIconRightBegin;
- int isRtl;
- DWORD cFlags;
- BYTE bSecondLine;
};
#define DRAGSTAGE_NOTMOVED 0
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 91bcc34b79..e8187cd572 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -312,35 +312,39 @@ LBL_Def:
case INTM_ICONCHANGED:
{
int recalcScrollBar = 0;
+ HANDLE hContact = (HANDLE)wParam;
WORD status = ID_STATUS_OFFLINE;
int contactRemoved = 0;
HANDLE hSelItem = NULL;
ClcContact *selcontact = NULL;
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
status = ID_STATUS_OFFLINE;
else
- status = cfg::getWord((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ status = cfg::getWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- int shouldShow = (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);// XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
+ int shouldShow = (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN ||
+ !CLVM_GetContactHiddenStatus(hContact, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) ||
+ pcli->pfnGetContactIcon(hContact) != lParam); // XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
- if ( !FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
+ if (!FindItem(hwnd, dat, hContact, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
- pcli->pfnAddContactToTree(hwnd, dat, (HANDLE)wParam, 0, 0);
+ pcli->pfnAddContactToTree(hwnd, dat, hContact, 0, 0);
recalcScrollBar = 1;
- FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
+ FindItem(hwnd, dat, hContact, &contact, NULL, NULL);
if (contact) {
- contact->iImage = (WORD) lParam;
- pcli->pfnNotifyNewContact(hwnd, (HANDLE)wParam);
+ contact->iImage = (WORD)lParam;
+ pcli->pfnNotifyNewContact(hwnd, hContact);
}
}
- } else {
+ }
+ else {
//item in list already
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- if (contact->iImage == (WORD) lParam)
+ if (contact->iImage == (WORD)lParam)
break;
if ( !shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
@@ -348,8 +352,9 @@ LBL_Def:
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, 0);
contactRemoved = TRUE;
recalcScrollBar = 1;
- } else {
- contact->iImage = (WORD) lParam;
+ }
+ else {
+ contact->iImage = (WORD)lParam;
if ( !pcli->pfnIsHiddenMode(dat, status))
contact->flags |= CONTACTF_ONLINE;
else
@@ -378,7 +383,7 @@ LBL_Def:
if (contact->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
contact->hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) contact->hContact, 0);
contact->metaProto = GetContactProto(contact->hSubContact);
- contact->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) contact->hSubContact, 0);
+ contact->iImage = pcli->pfnGetContactIcon(contact->hSubContact);
if (contact->pExtra) {
TExtraCache *pSub = cfg::getCache(contact->hSubContact, contact->metaProto);
ClcContact *subContact;
@@ -552,26 +557,37 @@ LBL_Def:
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
char *szProto = (char *)cws->szModule;
+ HANDLE hContact = (HANDLE)wParam;
TExtraCache *p;
- if ( !FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- p = cfg::getCache((HANDLE)wParam, szProto);
- if ( !dat->bisEmbedded && cfg::dat.bMetaAvail && szProto) { // may be a subcontact, forward the xstatus
- if (cfg::getByte((HANDLE)wParam, cfg::dat.szMetaName, "IsSubcontact", 0)) {
- HANDLE hMasterContact = (HANDLE)cfg::getDword((HANDLE)wParam, cfg::dat.szMetaName, "Handle", 0);
- if (hMasterContact && hMasterContact != (HANDLE)wParam) // avoid recursive call of settings handler
+ if (!FindItem(hwnd, dat, hContact, &contact, NULL, NULL)) {
+ p = cfg::getCache(hContact, szProto);
+ if (!dat->bisEmbedded && cfg::dat.bMetaAvail && szProto) { // may be a subcontact, forward the xstatus
+ if (cfg::getByte(hContact, cfg::dat.szMetaName, "IsSubcontact", 0)) {
+ HANDLE hMasterContact = (HANDLE)cfg::getDword(hContact, cfg::dat.szMetaName, "Handle", 0);
+ if (hMasterContact && hMasterContact != hContact) // avoid recursive call of settings handler
cfg::writeByte(hMasterContact, cfg::dat.szMetaName, "XStatusId",
- (BYTE)cfg::getByte((HANDLE)wParam, szProto, "XStatusId", 0));
+ (BYTE)cfg::getByte(hContact, szProto, "XStatusId", 0));
break;
}
}
- } else {
- contact->xStatus = cfg::getByte((HANDLE)wParam, szProto, "XStatusId", 0);
+ }
+ else {
+ contact->xStatus = cfg::getByte(hContact, szProto, "XStatusId", 0);
p = contact->pExtra;
}
+
if (szProto == NULL)
break;
+ if (contact) {
+ if (ProtoServiceExists(szProto, PS_GETADVANCEDSTATUSICON)) {
+ int iconId = ProtoCallService(szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
+ if (iconId != -1)
+ contact->xStatusIcon = iconId >> 16;
+ }
+ }
+
GetCachedStatusMsg(p, szProto);
PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)(contact ? contact->hContact : 0));
}
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 58ae1e9948..7b26c3cefc 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -38,7 +38,7 @@ ClcContact* CreateClcContact( void )
ClcContact* p = (ClcContact*)mir_alloc( sizeof( ClcContact ));
if ( p != NULL ) {
ZeroMemory(p, sizeof(ClcContact));
- p->avatarLeft = p->extraIconRightBegin = -1;
+ p->avatarLeft = p->extraIconRightBegin = p->xStatusIcon = -1;
}
return p;
}
@@ -107,10 +107,10 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HANDLE hContact)
if (p->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
p->hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
p->metaProto = GetContactProto(p->hSubContact);
- p->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) p->hSubContact, 0);
+ p->iImage = pcli->pfnGetContactIcon(p->hSubContact);
}
else {
- p->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) hContact, 0);
+ p->iImage = pcli->pfnGetContactIcon(hContact);
p->metaProto = NULL;
}
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index bdef00c0ec..039dc6300f 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -205,7 +205,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
int iCount = GetMenuItemCount(cfg::dat.hMenuNotify);
if (cfg::dat.hUpdateContact != 0) {
TCHAR *szName = pcli->pfnGetContactDisplayName(cfg::dat.hUpdateContact, 0);
- int iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) cfg::dat.hUpdateContact, 0);
+ int iIcon = pcli->pfnGetContactIcon(cfg::dat.hUpdateContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
@@ -221,7 +221,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
TCHAR *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
- int iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) nmi->hContact, 0);
+ int iIcon = pcli->pfnGetContactIcon(nmi->hContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
ImageList_DrawEx(hCListImages, nmi->iIcon, hDC, 4, (rc->bottom + rc->top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -927,6 +927,8 @@ bgskipped:
if ((dwFlags & CLUI_FRAME_STATUSICONS && !pi_selectiveIcon) || type != CLCIT_CONTACT || (pi_selectiveIcon && !avatar_done)) {
HIMAGELIST hImgList = hCListImages;
+ if (!dat->bisEmbedded && type == CLCIT_CONTACT && contact->xStatusIcon != -1 && (dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS))
+ iImage = contact->xStatusIcon;
if (g_hottrack)
colourFg = dat->hotTextColour;
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 0d1e5845de..ef42eab6bd 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -141,7 +141,7 @@ LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if (GetMenuItemInfoA(cfg::dat.hMenuNotify, (UINT) dis->itemID, FALSE, &mii) != 0) {
nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
if (nmi) {
- iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) nmi->hContact, 0);
+ iIcon = pcli->pfnGetContactIcon(nmi->hContact);
hIcon = ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
pcli->pfnDrawMenuItem(dis, hIcon, nmi->hIcon);
return TRUE;
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp
index d8e97bcd7f..8b23d00f02 100644
--- a/plugins/Clist_nicer/src/clistmod.cpp
+++ b/plugins/Clist_nicer/src/clistmod.cpp
@@ -55,9 +55,10 @@ int IconFromStatusMode(const char *szProto, int status, HANDLE hContact, HICON *
int finalStatus;
if (szProto != NULL && !strcmp(szProto, cfg::dat.szMetaName) && cfg::dat.bMetaAvail && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
+ HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
szFinalProto = GetContactProto(hSubContact);
finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status;
+ hContact = hSubContact;
}
else {
szFinalProto = (char*) szProto;
@@ -71,6 +72,7 @@ int IconFromStatusMode(const char *szProto, int status, HANDLE hContact, HICON *
*phIcon = Skin_GetIcon(szBuf);
}
}
+
return saveIconFromStatusMode(szFinalProto, finalStatus, hContact);
}
@@ -124,8 +126,8 @@ Begin of Hrk's code for bug
int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
{
- RECT rc = {0}, rcUpdate = {0};
- POINT pt = {0};
+ RECT rc = { 0 }, rcUpdate = { 0 };
+ POINT pt = { 0 };
register int i = 0, j = 0, width = 0, height = 0, iCountedDots = 0, iNotCoveredDots = 0;
BOOL bPartiallyCovered = FALSE;
HWND hAux = 0;
@@ -138,79 +140,67 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- else {
- HRGN rgn = 0;
- POINT ptOrig;
- RECT rcClient;
- int clip = (int)cfg::dat.bClipBorder;
-
- GetClientRect(hWnd, &rcClient);
- ptOrig.x = ptOrig.y = 0;
- ClientToScreen(hWnd, &ptOrig);
- rc.left = ptOrig.x;
- rc.top = ptOrig.y;
- rc.right = rc.left + rcClient.right;
- rc.bottom = rc.top + rcClient.bottom;
-
- //GetWindowRect(hWnd, &rc);
- width = rc.right - rc.left;
- height = rc.bottom - rc.top;
-
- if (iStepX <= 0)
- iStepX = 4;
- if (iStepY <= 0)
- iStepY = 16;
-
- /*
- * use a rounded clip region to determine which pixels are covered
- * this will avoid problems with certain XP themes which are using transparency for rounded
- * window frames (reluna being one popular example).
-
- * the radius of 8 should be sufficient for most themes as they usually don't use bigger
- * radii.
- * also, clip at least 2 pixels from the border (same reason)
- */
-
- if (g_CLUIImageItem)
- clip = 5;
- else
- clip = 0;
- //clip = max(clip, db_get_b(NULL, "CLUI", "ignoreframepixels", 2));
- //rgn = CreateRoundRectRgn(rc.left + clip, rc.top + clip, rc.right - clip, rc.bottom - clip, 10 + clip, 10 + clip);
- //rgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
- //for (i = rc.top + 3 + clip; i < rc.bottom - 3 - clip; i += (height / iStepY)) {
- for (i = rc.top + clip; i < rc.bottom; i += (height / iStepY)) {
- pt.y = i;
- //for (j = rc.left + 3 + clip; j < rc.right - 3 - clip; j += (width / iStepX)) {
- for (j = rc.left + clip; j < rc.right; j += (width / iStepX)) {
- /*if (rgn) {
- ptTest.x = j;
- ptTest.y = i;
- if ( !PtInRegion(rgn, ptTest.x, ptTest.y)) {
- continue;
- }
- }*/
- pt.x = j;
- hAux = WindowFromPoint(pt);
- while (GetParent(hAux) != NULL)
- hAux = GetParent(hAux);
- if (hAux != hWnd && hAux) //There's another window!
- bPartiallyCovered = TRUE;
- else
- iNotCoveredDots++; //Let's count the not covered dots.
- iCountedDots++; //Let's keep track of how many dots we checked.
- }
+
+ HRGN rgn = 0;
+ POINT ptOrig;
+ RECT rcClient;
+ int clip = (int)cfg::dat.bClipBorder;
+
+ GetClientRect(hWnd, &rcClient);
+ ptOrig.x = ptOrig.y = 0;
+ ClientToScreen(hWnd, &ptOrig);
+ rc.left = ptOrig.x;
+ rc.top = ptOrig.y;
+ rc.right = rc.left + rcClient.right;
+ rc.bottom = rc.top + rcClient.bottom;
+
+ //GetWindowRect(hWnd, &rc);
+ width = rc.right - rc.left;
+ height = rc.bottom - rc.top;
+
+ if (iStepX <= 0)
+ iStepX = 4;
+ if (iStepY <= 0)
+ iStepY = 16;
+
+ /*
+ * use a rounded clip region to determine which pixels are covered
+ * this will avoid problems with certain XP themes which are using transparency for rounded
+ * window frames (reluna being one popular example).
+
+ * the radius of 8 should be sufficient for most themes as they usually don't use bigger
+ * radii.
+ * also, clip at least 2 pixels from the border (same reason)
+ */
+
+ if (g_CLUIImageItem)
+ clip = 5;
+ else
+ clip = 0;
+
+ for (i = rc.top + clip; i < rc.bottom; i += (height / iStepY)) {
+ pt.y = i;
+ for (j = rc.left + clip; j < rc.right; j += (width / iStepX)) {
+ pt.x = j;
+ hAux = WindowFromPoint(pt);
+ while (GetParent(hAux) != NULL)
+ hAux = GetParent(hAux);
+ if (hAux != hWnd && hAux) //There's another window!
+ bPartiallyCovered = TRUE;
+ else
+ iNotCoveredDots++; //Let's count the not covered dots.
+ iCountedDots++; //Let's keep track of how many dots we checked.
}
- if (rgn)
- DeleteObject(rgn);
-
- if (iNotCoveredDots == iCountedDots) //Every dot was not covered: the window is visible.
- return GWVS_VISIBLE;
- else if (iNotCoveredDots == 0) //They're all covered!
- return GWVS_COVERED;
- else //There are dots which are visible, but they are not as many as the ones we counted: it's partially covered.
- return GWVS_PARTIALLY_COVERED;
}
+ if (rgn)
+ DeleteObject(rgn);
+
+ if (iNotCoveredDots == iCountedDots) //Every dot was not covered: the window is visible.
+ return GWVS_VISIBLE;
+ if (iNotCoveredDots == 0) //They're all covered!
+ return GWVS_COVERED;
+ //There are dots which are visible, but they are not as many as the ones we counted: it's partially covered.
+ return GWVS_PARTIALLY_COVERED;
}
int ShowHide(WPARAM wParam, LPARAM lParam)
@@ -225,19 +215,19 @@ int ShowHide(WPARAM wParam, LPARAM lParam)
}
else {
switch (iVisibleState) {
- case GWVS_PARTIALLY_COVERED:
- //If we don't want to bring it to top, we can use a simple break. This goes against readability ;-) but the comment explains it.
- if ( !cfg::getByte("CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
- break;
- case GWVS_COVERED: //Fall through (and we're already falling)
- case GWVS_HIDDEN:
- bShow = TRUE;
- break;
- case GWVS_VISIBLE: //This is not needed, but goes for readability.
- bShow = FALSE;
+ case GWVS_PARTIALLY_COVERED:
+ //If we don't want to bring it to top, we can use a simple break. This goes against readability ;-) but the comment explains it.
+ if (!cfg::getByte("CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
break;
- case -1: //We can't get here, both cli.hwndContactList and iStepX and iStepY are right.
- return 0;
+ case GWVS_COVERED: //Fall through (and we're already falling)
+ case GWVS_HIDDEN:
+ bShow = TRUE;
+ break;
+ case GWVS_VISIBLE: //This is not needed, but goes for readability.
+ bShow = FALSE;
+ break;
+ case -1: //We can't get here, both cli.hwndContactList and iStepX and iStepY are right.
+ return 0;
}
}
@@ -245,7 +235,7 @@ int ShowHide(WPARAM wParam, LPARAM lParam)
RECT rcWindow;
SetWindowPos(pcli->hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
- if ( !cfg::getByte("CList", "OnTop", SETTING_ONTOP_DEFAULT))
+ if (!cfg::getByte("CList", "OnTop", SETTING_ONTOP_DEFAULT))
SetWindowPos(pcli->hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
SetForegroundWindow(pcli->hwndContactList);
//SetActiveWindow(pcli->hwndContactList);
@@ -253,8 +243,7 @@ int ShowHide(WPARAM wParam, LPARAM lParam)
cfg::writeByte("CList", "State", SETTING_STATE_NORMAL);
GetWindowRect(pcli->hwndContactList, &rcWindow);
- if (Utils_AssertInsideScreen(&rcWindow) == 1)
- {
+ if (Utils_AssertInsideScreen(&rcWindow) == 1) {
MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index bd087c7b0a..b657100533 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -54,39 +54,39 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
int ShowHide(WPARAM wParam, LPARAM lParam);
int ClcShutdown(WPARAM wParam, LPARAM lParam);
-void ( *saveLoadClcOptions )(HWND hwnd,struct ClcData *dat);
-void LoadClcOptions(HWND hwnd,struct ClcData *dat);
+void (*saveLoadClcOptions)(HWND hwnd, struct ClcData *dat);
+void LoadClcOptions(HWND hwnd, struct ClcData *dat);
-int ( *saveAddContactToGroup )(struct ClcData *dat, ClcGroup *group, HANDLE hContact);
+int (*saveAddContactToGroup)(struct ClcData *dat, ClcGroup *group, HANDLE hContact);
int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HANDLE hContact);
-struct CListEvent* ( *saveAddEvent )(CLISTEVENT *cle);
-struct CListEvent* AddEvent(CLISTEVENT *cle);
+CListEvent* (*saveAddEvent)(CLISTEVENT *cle);
+CListEvent* AddEvent(CLISTEVENT *cle);
-int ( *saveAddInfoItemToGroup )(ClcGroup *group, int flags, const TCHAR *pszText);
+int (*saveAddInfoItemToGroup)(ClcGroup *group, int flags, const TCHAR *pszText);
int AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText);
-ClcGroup* ( *saveAddGroup )(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
+ClcGroup* (*saveAddGroup)(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
-LRESULT ( CALLBACK *saveContactListWndProc )(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+LRESULT (CALLBACK *saveContactListWndProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
-LRESULT ( CALLBACK *saveContactListControlWndProc )(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT (CALLBACK *saveContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-int ( *saveIconFromStatusMode )( const char *szProto, int status, HANDLE hContact );
+int (*saveIconFromStatusMode)(const char *szProto, int status, HANDLE hContact);
-LRESULT ( *saveProcessExternalMessages )(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT(*saveProcessExternalMessages)(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
-int ( *saveRemoveEvent )(HANDLE hContact, HANDLE hDbEvent);
+int (*saveRemoveEvent)(HANDLE hContact, HANDLE hDbEvent);
int RemoveEvent(HANDLE hContact, HANDLE hDbEvent);
-INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam);
+INT_PTR (*saveTrayIconProcessMessage)(WPARAM wParam, LPARAM lParam);
INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
-void ( *saveRecalcScrollBar )(HWND hwnd, struct ClcData *dat);
+void (*saveRecalcScrollBar)(HWND hwnd, struct ClcData *dat);
void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
PLUGININFOEX pluginInfo =
@@ -194,8 +194,9 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int fnIconFromStatusMode( const char* szProto, int status, HANDLE hContact )
-{ return IconFromStatusMode( szProto, status, hContact, NULL );
+static int fnIconFromStatusMode(const char* szProto, int status, HANDLE hContact)
+{
+ return IconFromStatusMode(szProto, status, hContact, NULL);
}
extern "C" int __declspec(dllexport) CListInitialise()
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 7ad568d0ea..946191403c 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -1106,7 +1106,6 @@ INT_PTR CIcqProto::RequestAdvStatusIconIdx(WPARAM wParam, LPARAM lParam)
return -1;
BYTE bXStatus = getContactXStatus((HANDLE)wParam);
-
if (bXStatus) {
if (!bXStatusCListIconsValid[bXStatus-1]) { // adding icon
int idx = hXStatusCListIcons[bXStatus-1];