diff options
Diffstat (limited to 'plugins/Clist_modern/src')
49 files changed, 247 insertions, 690 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 4413554500..b980f7b9cf 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -138,17 +138,10 @@ int SetAlpha(uint8_t Alpha) HWND hwnd = F.OwnerWindow;
long l = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
if (!(l & WS_EX_LAYERED)) {
- HWND parent = nullptr;
- if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan))
- parent = hProgMan;
- }
-
CLUI_ShowWindowMod(hwnd, SW_HIDE);
SetParent(hwnd, nullptr);
SetWindowLongPtr(hwnd, GWL_EXSTYLE, l | WS_EX_LAYERED);
- SetParent(hwnd, parent);
+ SetParent(hwnd, nullptr);
if (l&WS_VISIBLE) CLUI_ShowWindowMod(hwnd, SW_SHOW);
}
SetLayeredWindowAttributes(hwnd, g_CluiData.dwKeyColor, Alpha, LWA_ALPHA | LWA_COLORKEY);
@@ -174,21 +167,14 @@ int CLUIFrames_ActivateSubContainers(BOOL active) {
for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
- if (active && !F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide) {
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- SetWindowPos(F.OwnerWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- }
- else SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
- }
+ if (active && !F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide)
+ SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
}
return 0;
}
int CLUIFrames_SetParentForContainers(HWND parent)
{
- g_CluiData.fOnDesktop = (parent && parent != g_clistApi.hwndContactList);
-
for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
if (!F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide) {
@@ -218,11 +204,7 @@ int CLUIFrames_OnShowHide(int mode) if (mode != SW_HIDE) {
SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- SetWindowPos(F.OwnerWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- }
- else SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
+ SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
}
}
@@ -1348,9 +1330,6 @@ static int _us_DoCollapseFrame(WPARAM wParam, LPARAM lParam) if (FrameId >= 0 && FrameId < g_nFramesCount) {
// do not collapse/uncollapse client/locked/invisible frames
if (g_pfwFrames[FrameId].align == alClient && !(g_pfwFrames[FrameId].Locked || (!g_pfwFrames[FrameId].visible) || g_pfwFrames[FrameId].floating)) {
- if (Clist_IsDocked())
- return 0;
-
if (g_CluiData.fDocked || !g_CluiData.fAutoSize) {
RECT rc;
GetWindowRect(g_clistApi.hwndContactList, &rc);
@@ -2620,8 +2599,8 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam //ScreenToClient(Frames[framepos].ContainerWnd,&Frames[framepos].TitleBar.oldpos);
- if ((!(wParam&MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if ((!(wParam & MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
//pt = nm->pt;
@@ -2939,12 +2918,11 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP switch (msg) {
case WM_ACTIVATE:
if (g_bTransparentFlag) {
- uint8_t alpha;
if ((wParam != WA_INACTIVE || ((HWND)lParam == hwnd) || GetParent((HWND)lParam) == hwnd)) {
HWND hw = lParam ? GetParent((HWND)lParam) : nullptr;
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
- if (hw) SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
- CLUI_SmoothAlphaTransition(hwnd, alpha, 1);
+ if (hw)
+ SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
}
}
@@ -2989,12 +2967,6 @@ static HWND CreateSubContainerWindow(HWND parent, int x, int y, int width, int h {
HWND hwnd = CreateWindowEx(WS_EX_LAYERED, CLUIFrameSubContainerClassName, L"SubContainerWindow", WS_POPUP | (!g_CluiData.fLayered ? WS_BORDER : 0), x, y, width, height, parent, nullptr, g_plugin.getInst(), nullptr);
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_BORDER));
- if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan))
- SetParent(hwnd, hProgMan);
- }
-
return hwnd;
}
@@ -3121,7 +3093,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP return 0;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp index 282c7c6f3e..b7421d955e 100644 --- a/plugins/Clist_modern/src/groupmenu.cpp +++ b/plugins/Clist_modern/src/groupmenu.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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/init.cpp b/plugins/Clist_modern/src/init.cpp index ac9a10af72..16ee18c048 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -207,7 +207,6 @@ static HRESULT SubclassClistInterface() g_clistApi.pfnProcessExternalMessages = cli_ProcessExternalMessages;
g_clistApi.pfnAddEvent = cli_AddEvent;
g_clistApi.pfnFreeEvent = cli_RemoveEvent;
- g_clistApi.pfnDocking_ProcessWindowMessage = Docking_ProcessWindowMessage;
return S_OK;
}
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 4531793dd3..f6c72bfa52 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index ca9d6c7c54..c4f77a5c1a 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_awaymsg.h b/plugins/Clist_modern/src/modern_awaymsg.h index c456151d5b..265bb314bc 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.h +++ b/plugins/Clist_modern/src/modern_awaymsg.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_cache_funcs.h b/plugins/Clist_modern/src/modern_cache_funcs.h index 9067a99cc9..c1ff953a75 100644 --- a/plugins/Clist_modern/src/modern_cache_funcs.h +++ b/plugins/Clist_modern/src/modern_cache_funcs.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index b7a06e969b..957fc38634 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 7c5a866e33..fdf0aead83 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -159,11 +159,11 @@ static int clcHookDbEventAdded(WPARAM hContact, LPARAM hDbEvent) if (hContact && hDbEvent) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !(dbei.flags & DBEF_SENT)) {
- g_plugin.setDword(hContact, "mf_lastmsg", dbei.timestamp);
+ if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !dbei.bSent) {
+ g_plugin.setDword(hContact, "mf_lastmsg", dbei.getUnixtime());
ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact);
if (pdnce) {
- pdnce->dwLastMsgTime = dbei.timestamp;
+ pdnce->dwLastMsgTime = dbei.getUnixtime();
if (g_CluiData.hasSort(SORTBY_LASTMSG))
Clist_Broadcast(CLM_AUTOREBUILD, hContact, 0);
}
@@ -240,7 +240,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_ int foundindex;
for (; group; group = group->parent)
Clist_SetGroupExpand(hwnd, dat, group, 1);
- foundindex = g_clistApi.pfnGetRowsPriorTo(&dat->list, contactGroup, contactScanIndex);
+ foundindex = g_clistApi.pfnGetRowsPriorTo(dat, contactGroup, contactScanIndex);
if (fReturnAsFound)
return foundindex;
else if (nLastFound != -1 && fSearchUp && foundindex == index)
@@ -508,7 +508,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM }
else if (!contact->iSubNumber && contact->iSubAllocated > 0) {
if (changeGroupExpand == 1 && !contact->bSubExpanded) {
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (changeGroupExpand == 1 && contact->bSubExpanded) {
@@ -540,7 +540,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM ClcContact *contact2;
ClcGroup *group2;
if (Clist_FindItem(hwnd, dat, contact->hContact, &contact2, &group2)) {
- int i = cliGetRowsPriorTo(&dat->list, group2, group2->cl.indexOf(contact2));
+ int i = cliGetRowsPriorTo(dat, group2, group2->cl.indexOf(contact2));
Clist_EnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0);
}
}
@@ -551,7 +551,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM else {
if (changeGroupExpand == 1 && contact->type == CLCIT_CONTACT) {
if (group == &dat->list) { SetCapture(hwnd); return 0; }
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (contact->type == CLCIT_GROUP) {
@@ -635,7 +635,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR ClcContact *contact;
ClcGroup *group;
if (Clist_FindItem(hwnd, dat, hitcontact->hContact, &contact, &group)) {
- int i = cliGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact));
+ int i = cliGetRowsPriorTo(dat, group, group->cl.indexOf(contact));
Clist_EnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0);
}
}
@@ -662,7 +662,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR static LRESULT clcOnActivate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TRACE("clcOnActivate\n");
+ // TRACE("clcOnActivate\n");
if (dat->bCompactMode) {
cliRecalcScrollBar(hwnd, dat);
if (dat->hwndRenameEdit == nullptr)
@@ -757,9 +757,9 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP dat->selection = cliGetRowByIndex(dat, dat->selection, &selcontact, &selgroup);
Clist_SetGroupExpand(hwnd, dat, contact->group, -1);
if (dat->selection != -1) {
- dat->selection = cliGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = cliGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
if (dat->selection == -1)
- dat->selection = cliGetRowsPriorTo(&dat->list, contact->group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, contact->group, -1);
}
if (dat->bCompactMode)
@@ -1401,7 +1401,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (hSelItem) {
ClcGroup *selgroup;
if (Clist_FindItem(hwnd, dat, hSelItem, &selcontact, &selgroup))
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else
dat->selection = -1;
}
@@ -1645,11 +1645,11 @@ HRESULT ClcLoadModule() int ClcUnloadModule()
{
if (g_CluiData.bOldUseGroups != -1)
- Clist::UseGroups = g_CluiData.bOldUseGroups;
+ Clist::bUseGroups = g_CluiData.bOldUseGroups;
if (g_CluiData.bOldHideOffline != -1)
- Clist::HideOffline = g_CluiData.bOldHideOffline;
+ Clist::bHideOffline = g_CluiData.bOldHideOffline;
if (g_CluiData.bOldHideEmptyGroups != -1)
- Clist::HideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
+ Clist::bHideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index acd00b27d2..40c17311c3 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -37,12 +37,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define NIIF_INTERN_UNICODE 0x00000100
-#define SETTING_STATE_HIDDEN 0
-#define SETTING_STATE_MINIMIZED 1
-#define SETTING_STATE_NORMAL 2
-
-#define SETTING_BRINGTOFRONT_DEFAULT 0
-
#define SETTING_AVATAR_OVERLAY_TYPE_NORMAL 0
#define SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL 1
#define SETTING_AVATAR_OVERLAY_TYPE_CONTACT 2
@@ -93,11 +87,6 @@ void clcSetDelayTimer(UINT_PTR uIDEvent, HWND hwnd, int nDelay = -1); #define DROPTARGET_ONMETACONTACT 6
#define DROPTARGET_ONSUBCONTACT 7
-#define CONTACTF_ONLINE 1
-#define CONTACTF_NOTONLIST 8
-#define CONTACTF_CHECKED 16
-#define CONTACTF_IDLE 32
-
#define AVATAR_POS_DONT_HAVE -1
#define AVATAR_POS_ANIMATED -2
@@ -327,7 +316,6 @@ typedef struct tagOVERLAYICONINFO void ClcOptionsChanged(void);
// clcidents.c
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int cliGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
// clcitems.c
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 2268bf627b..71b1051653 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -24,8 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
+int cliGetRowsPriorTo(ClcData *dat, ClcGroup *subgroup, int contactIndex)
{
+ auto *group = &dat->list;
int count = 0;
int subcontactscount = 0;
bool bMetaExpanding = db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) != 0;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 35ac94c13e..13c04b8ea9 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -40,7 +40,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) cont->subcontacts = (ClcContact *)mir_calloc(sizeof(ClcContact) * subcount);
cont->iSubAllocated = subcount;
int i = 0;
- int bHideOffline = Clist::HideOffline;
+ int bHideOffline = Clist::bHideOffline;
for (int j = 0; j < subcount; j++) {
MCONTACT hsub = db_mc_getSub(cont->hContact, j);
if (!hsub)
@@ -202,9 +202,9 @@ int RestoreSelection(ClcData *dat, MCONTACT hSelected) }
if (!selcontact->iSubNumber)
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else {
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact->subcontacts));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact->subcontacts));
if (dat->selection != -1)
dat->selection += selcontact->iSubNumber;
}
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 9c0a0715ea..8885269a05 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -59,19 +59,6 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP cliInvalidateRect(hwnd, nullptr, FALSE);
return 0;
- case CLM_SETHIDEEMPTYGROUPS:
- {
- BOOL old = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (wParam)
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
- else
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) &~CLS_HIDEEMPTYGROUPS);
- BOOL newval = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (newval != old)
- Clist_InitAutoRebuild(hwnd);
- }
- return 0;
-
case CLM_SETTEXTCOLOR:
if (wParam > FONTID_MODERN_MAX) break;
@@ -209,7 +196,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP }
}
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, group, index);
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, group, index);
Clist_EnsureVisible(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 a556d00ce9..d1a596982b 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -303,13 +303,13 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT)); /// by FYR
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SUBINDENT), 0);
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
@@ -362,23 +362,23 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar {
uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
- CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg));
UDACCEL accel[2] = { { 0, 10 }, { 2, 50 } };
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, _countof(accel), (LPARAM)&accel);
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(0, "CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME), 0));
}
- CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0, MAKELONG(db_get_b(0, "CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT), 0));
- CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS));
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
EnableWindow(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, _countof(greyoutValues), db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
- CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL));
return TRUE;
case WM_VSCROLL:
@@ -464,7 +464,7 @@ static wchar_t* sortby[] = LPGENW("Name (use locale settings)"),
LPGENW("Status"),
LPGENW("Last message time"),
- LPGENW("Account name"),
+ LPGENW("Account order"),
LPGENW("Rate"),
LPGENW("Last online"),
LPGENW("-Nothing-")
@@ -478,11 +478,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT));
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3);
{
for (auto &it : sortby) {
int item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(it));
@@ -506,8 +506,8 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
- CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
}
return TRUE;
@@ -562,12 +562,12 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
{
uint8_t trayOption = db_get_b(0, "CLUI", "XStatusTray", SETTING_TRAYOPTION_DEFAULT);
- CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3));
+ CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2));
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4));
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS));
EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL));
@@ -602,7 +602,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L // setting icon cycling period
SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
// setting icon mode
switch (g_plugin.getByte("tiModeS", TRAY_ICON_MODE_GLOBAL)) {
@@ -691,7 +691,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L }
// icon cycling timeout.
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::iCycleTime = SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
// icon modes
g_plugin.setByte("tiModeS",
@@ -734,27 +734,26 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, Clist::bClientAreaDrag);
+ CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag));
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize);
+ CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, Clist::bBringToFront);
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MinSizeHeight", SETTING_MINSIZEHEIGHT_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE, g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, Clist::bAutoHide);
SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
@@ -855,9 +854,9 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM db_set_w(0, "ModernData", "HideBehindBorderSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
+ Clist::bBringToFront = IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT);
g_bChangingMode = true;
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG));
+ Clist::bClientAreaDrag = IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG);
db_set_b(0, "CLUI", "AutoSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
db_set_b(0, "CLUI", "LockSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_LOCKSIZING));
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
@@ -865,13 +864,11 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZEUPWARD));
db_set_b(0, "CLUI", "SnapToEdges", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SNAPTOEDGES));
- db_set_b(0, "CLUI", "DockToSides", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DOCKTOSIDES));
-
db_set_b(0, "CLUI", "EventArea",
(uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA_ALWAYS) ? 2 : (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA) ? 1 : 0));
- g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::bAutoHide = IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE);
+ Clist::iHideTime = SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
CLUI_ChangeWindowMode();
SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
@@ -894,7 +891,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
g_hCLUIOptionsWnd = hwndDlg;
- CheckDlgButton(hwndDlg, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, Clist::bOnTop);
{
//====== Activate/Deactivate Non-Layered items =======
fEnabled = !g_CluiData.fLayered || g_CluiData.fDisableSkinEngine;
@@ -912,14 +909,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP }
{
//====== Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TOOLWND, Clist::bToolWindow);
+ CheckDlgButton(hwndDlg, IDC_MIN2TRAY, Clist::bMinimizeToTray);
+ CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT));
if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, Clist::bShowCaption);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, Clist::bShowMainMenu);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
@@ -931,12 +928,12 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), FALSE);
}
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT));
} //====== End of Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT));
+
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETPOS, 0, db_get_dw(0, "CLUIFrames", "GapBetweenFrames", SETTING_GAPFRAMES_DEFAULT));
@@ -950,8 +947,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT));
EnableWindow(GetDlgItem(hwndDlg, IDC_LAYERENGINE), !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (db_get_b(0, "ModernData", "EnableLayering", SETTING_ENABLELAYERING_DEFAULT) && !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED : BST_CHECKED);
@@ -968,7 +965,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
}
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT, g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, Clist::bTransparent);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), FALSE);
@@ -979,8 +976,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP }
SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, Clist::iAlpha);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, Clist::iAutoAlpha);
SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
return TRUE;
@@ -1013,12 +1010,6 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP CheckDlgButton(hwndDlg, IDC_LAYERENGINE, BST_CHECKED);
}
}
- else if (LOWORD(wParam) == IDC_ONDESKTOP && IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- CheckDlgButton(hwndDlg, IDC_ONTOP, BST_UNCHECKED);
- }
- else if (LOWORD(wParam) == IDC_ONTOP && IsDlgButtonChecked(hwndDlg, IDC_ONTOP)) {
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, BST_UNCHECKED);
- }
else if (LOWORD(wParam) == IDC_TOOLWND) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
}
@@ -1072,15 +1063,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP db_unset(0, "ModernData", "EnableLayering");
}
g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
- g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
+ Clist::bOnTop = IsDlgButtonChecked(hwndDlg, IDC_ONTOP);
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
//====== Non-Layered Mode ======
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
+ Clist::bToolWindow = IsDlgButtonChecked(hwndDlg, IDC_TOOLWND);
+ Clist::bShowCaption = IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION);
+ Clist::bShowMainMenu = IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU);
g_plugin.setByte("ThinBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BORDER));
g_plugin.setByte("NoBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND));
{
@@ -1088,28 +1078,18 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
g_plugin.setWString("TitleText", title);
}
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
+ Clist::bMinimizeToTray = IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
db_set_b(0, "CLC", "RoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS));
//====== End of Non-Layered Mode ======
g_bChangingMode = true;
- if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan)) {
- SetParent(g_clistApi.hwndContactList, hProgMan);
- Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
- g_CluiData.fOnDesktop = true;
- }
- }
- else {
- if (GetParent(g_clistApi.hwndContactList)) {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- }
- g_CluiData.fOnDesktop = false;
+ if (GetParent(g_clistApi.hwndContactList)) {
+ SetParent(g_clistApi.hwndContactList, nullptr);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
}
+
AniAva_UpdateParent();
db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT));
g_CluiData.fSmoothAnimation = IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT) != 0;
@@ -1121,10 +1101,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (uint32_t)i2);
Sync(CLUIFramesOnClistResize, (WPARAM)g_clistApi.hwndContactList, 0);
}
- g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
- g_plugin.setByte("Alpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
+ Clist::bTransparent = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT);
+ Clist::iAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
ske_LoadSkinFromDB();
CLUI_UpdateLayeredMode();
@@ -1276,8 +1255,8 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, int flags = dat->item[indx].flags;
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
- CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap);
+ CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), !dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_SELCOLOUR), !dat->item[indx].useWinColours);
@@ -1288,13 +1267,13 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].selColor);
SetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename);
- CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH);
+ CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV);
+ CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH);
+ CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV);
+ CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL);
+ CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL);
+ CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT);
SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
}
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 7bcd57bc33..260974ea3a 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 5bcc28e9b1..f248821d45 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -649,7 +649,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk) int ccScanIndex = group->scanIndex;
for (; group; group = group->parent)
Clist_SetGroupExpand(hwnd, dat, group, 1);
- return g_clistApi.pfnGetRowsPriorTo(&dat->list, ccGroup, ccScanIndex + SubCount);
+ return g_clistApi.pfnGetRowsPriorTo(dat, ccGroup, ccScanIndex + SubCount);
}
if (cc->type == CLCIT_GROUP) {
@@ -682,7 +682,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk) Clist_SetGroupExpand(hwnd, dat, group, 1);
if (!cc->bSubExpanded)
ExpandMetaContact(hwnd, cc, dat);
- return g_clistApi.pfnGetRowsPriorTo(&dat->list, ccGroup, ccScanIndex + SubCount + i + 1);
+ return g_clistApi.pfnGetRowsPriorTo(dat, ccGroup, ccScanIndex + SubCount + i + 1);
}
}
}
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index e67208047c..6cb09d990b 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 01c014273e..90b223b819 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index cd0eaeb9fb..ad6bb41778 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index eb6deb64e7..cba1eb9792 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -127,7 +127,6 @@ int CListMod_ContactListShutdownProc(WPARAM, LPARAM) HRESULT PreLoadContactListModule()
{
/* Global data initialization */
- g_CluiData.fOnDesktop = false;
g_CluiData.dwKeyColor = RGB(255, 0, 255);
g_CluiData.bCurrentAlpha = 255;
@@ -180,7 +179,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) || !g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (!Clist::bBringToFront)
return GWVS_VISIBLE;
HWND hwndFocused = GetFocus();
@@ -220,7 +219,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) GetWindowRect(hWnd, &rc);
RECT rcMonitor = { 0 };
- Docking_GetMonitorRectFromWindow(hWnd, &rcMonitor);
+ GetMonitorRectFromWindow(hWnd, &rcMonitor);
rc.top = rc.top < rcMonitor.top ? rcMonitor.top : rc.top;
rc.left = rc.left < rcMonitor.left ? rcMonitor.left : rc.left;
@@ -336,19 +335,13 @@ int cliShowHide(bool bAlwaysShow) Sync(CLUIFrames_ActivateSubContainers, TRUE);
CLUI_ShowWindowMod(g_clistApi.hwndContactList, SW_RESTORE);
- if (!g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- Sync(CLUIFrames_OnShowHide, 1); //TO BE PROXIED
- SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- g_bCalledFromShowHide = 1;
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
- SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- g_bCalledFromShowHide = 0;
- }
- else {
+ Sync(CLUIFrames_OnShowHide, 1); //TO BE PROXIED
+ SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ g_bCalledFromShowHide = 1;
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- Sync(CLUIFrames_OnShowHide, 1);
- SetForegroundWindow(g_clistApi.hwndContactList);
- }
+ g_bCalledFromShowHide = 0;
+
g_plugin.setByte("State", SETTING_STATE_NORMAL);
RECT rcWindow;
@@ -362,7 +355,7 @@ int cliShowHide(bool bAlwaysShow) CListMod_HideWindow();
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
- else if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ else if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(g_clistApi.hwndContactList, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 3650e5f77c..9a05f7cb61 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index de38d49fc9..0d7e639a00 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 5a7b2f9245..40bd10acfc 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -77,12 +77,11 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd, UINT, UINT_PTR idEvent, DW int cliTrayIconPauseAutoHide(WPARAM, LPARAM)
{
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide)
if (GetActiveWindow() != g_clistApi.hwndContactList && GetWindow(GetParent(GetActiveWindow()), GW_OWNER) != g_clistApi.hwndContactList) {
KillTimer(nullptr, autoHideTimerId);
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
}
- }
return 0;
}
@@ -100,7 +99,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) break;
case TIM_CALLBACK:
- if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::Tray1Click) {
+ if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::bTray1Click) {
POINT pt;
HMENU hMenu = Menu_GetStatusMenu();
g_bOnTrayRightClick= true;
@@ -126,9 +125,9 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) {
HWND h1 = (HWND)msg->lParam;
HWND h2 = h1 ? GetParent(h1) : nullptr;
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide) {
if (LOWORD(msg->wParam) == WA_INACTIVE && h2 != g_clistApi.hwndContactList)
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
else {
KillTimer(nullptr, autoHideTimerId);
autoHideTimerId = 0;
@@ -173,9 +172,8 @@ VOID CALLBACK cliTrayCycleTimerProc(HWND, UINT, UINT_PTR, DWORD) void SettingsMigrate(void)
{
- uint8_t TrayIcon = g_plugin.getByte("TrayIcon");
uint8_t AlwaysPrimary = g_plugin.getByte("AlwaysPrimary");
- uint8_t AlwaysMulti = g_plugin.getByte("AlwaysMulti");
+ uint8_t AlwaysMulti = Clist::bAlwaysMulti;
ptrA PrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
// these strings must always be set
@@ -188,8 +186,8 @@ void SettingsMigrate(void) g_plugin.setString("tiAccV", "");
}
- switch (TrayIcon) {
- case 0: // global or single acc
+ switch (Clist::iTrayIcon) {
+ case SETTING_TRAYICON_SINGLE:
if (AlwaysPrimary) {
if (!PrimaryStatus) { // global always
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_GLOBAL);
@@ -206,12 +204,12 @@ void SettingsMigrate(void) }
break;
- case 1: // cycle
+ case SETTING_TRAYICON_CYCLE:
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_CYCLE);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_CYCLE);
break;
- case 2: // multiple
+ case SETTING_TRAYICON_MULTI:
g_plugin.setByte("tiModeS", (AlwaysMulti) ? TRAY_ICON_MODE_ALL : TRAY_ICON_MODE_GLOBAL);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_ALL);
break;
@@ -313,7 +311,7 @@ int cliTrayIconInit(HWND hwnd) cliTrayCycleTimerProc(nullptr, 0, 0, 0); // force icon update
// Не сохраняем ID таймера в pcli, чтобы fnTrayIconUpdateBase не убивала его.
- TimerID = CLUI_SafeSetTimer(nullptr, 0, g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, cliTrayCycleTimerProc);
+ TimerID = CLUI_SafeSetTimer(nullptr, 0, Clist::iCycleTime * 1000, cliTrayCycleTimerProc);
break;
case TRAY_ICON_MODE_ALL:
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index c93412404d..ec29f6c318 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -303,13 +303,13 @@ CLUI::CLUI() : LoadCLUIFramesModule();
g_CluiData.bOldHideEmptyGroups = -1;
- bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ bOldHideEmptyGroups = Clist::bHideEmptyGroups;
g_CluiData.bOldHideOffline = -1;
- bOldHideOffline = Clist::HideOffline;
+ bOldHideOffline = Clist::bHideOffline;
g_CluiData.bOldUseGroups = -1;
- bOldUseGroups = Clist::UseGroups;
+ bOldUseGroups = Clist::bUseGroups;
g_CluiData.bOldFoldGroups = -1;
}
@@ -375,7 +375,7 @@ HRESULT CLUI::RegisterAvatarMenu() HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
{
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
+ WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
0, 0, 0, 0, hwndClui, nullptr, g_plugin.getInst(), nullptr);
return S_OK;
@@ -635,7 +635,7 @@ void CLUI_ChangeWindowMode() if (!g_clistApi.hwndContactList) return;
g_bChangingMode = true;
- g_bTransparentFlag = g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT);
+ g_bTransparentFlag = Clist::bTransparent;
g_CluiData.fSmoothAnimation = db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) != 0;
if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0)
g_CluiData.bCurrentAlpha = 255;
@@ -649,12 +649,12 @@ void CLUI_ChangeWindowMode() styleEx = WS_EX_TOOLWINDOW;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) && g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT)) {
+ else if (Clist::bShowCaption && Clist::bToolWindow) {
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
style = WS_CAPTION | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT))
+ else if (Clist::bShowCaption)
style = WS_CAPTION | WS_SYSMENU | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME | WS_MINIMIZEBOX;
else {
style = WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
@@ -683,15 +683,6 @@ void CLUI_ChangeWindowMode() }
SetWindowText(g_clistApi.hwndContactList, titleText);
- // < ->
- // 1 - If visible store it and hide
- if (g_CluiData.fLayered && (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT))) {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- UpdateWindow(g_clistApi.hwndContactList);
- g_CluiData.fOnDesktop = false;
- }
-
// 5 - TODO Apply Style
oldStyleEx = curStyleEx = GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE);
oldStyle = curStyle = GetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE);
@@ -711,28 +702,14 @@ void CLUI_ChangeWindowMode() CLUI_UpdateAeroGlass();
- if (g_CluiData.fLayered || !db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT))
+ if (g_CluiData.fLayered || !Clist::bShowMainMenu)
SetMenu(g_clistApi.hwndContactList, nullptr);
else
SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
- if (g_CluiData.fLayered && (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)))
- ske_UpdateWindowImage();
-
// 6 - Pin to desktop mode
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan)) {
- SetParent(g_clistApi.hwndContactList, hProgMan);
- Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
- g_CluiData.fOnDesktop = true;
- }
- }
- else {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- g_CluiData.fOnDesktop = false;
- }
+ SetParent(g_clistApi.hwndContactList, nullptr);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
// 7 - if it was visible - show
if (storedVisMode) {
@@ -751,7 +728,7 @@ void CLUI_ChangeWindowMode() int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
HRGN hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
+ if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT))
SetWindowRgn(g_clistApi.hwndContactList, hRgn1, 1);
else {
DeleteObject(hRgn1);
@@ -808,7 +785,7 @@ int CLUI_HideBehindEdge() //Need to be moved out of screen
bShowEventStarted = 0;
//1. get work area rectangle
- Docking_GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
+ GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
//SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen,FALSE);
//2. move out
int bordersize = wBehindEdgeBorderSize;
@@ -848,7 +825,7 @@ int CLUI_ShowFromBehindEdge() // Need to be moved out of screen
// 1. get work area rectangle
RECT rcScreen;
- Docking_GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
+ GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
// 2. move out
RECT rcWindow;
@@ -1270,7 +1247,7 @@ int CLUI_TestCursorOnBorders() if (CLUI_CheckOwnedByClui(hAux)) {
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != hwnd) {
- CLUI_SmoothAlphaTransition(hwnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -1693,12 +1670,10 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving, m_hWnd, &rc);
if (!IsIconic(m_hWnd)) {
- if (!Clist_IsDocked()) { // if g_CluiData.fDocked, dont remember pos (except for width)
- g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
- g_plugin.setDword("x", (uint32_t)rc.left);
- g_plugin.setDword("y", (uint32_t)rc.top);
- }
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
}
return TRUE;
@@ -1730,14 +1705,11 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) }
// if g_CluiData.fDocked, dont remember pos (except for width)
- if (!Clist_IsDocked()) {
- g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
- g_plugin.setDword("x", (uint32_t)rc.left);
- g_plugin.setDword("y", (uint32_t)rc.top);
- }
- else SetWindowRgn(m_hWnd, nullptr, 0);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
-
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
+
if (!g_CluiData.fLayered) {
HRGN hRgn1;
RECT r;
@@ -1747,7 +1719,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
+ if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT))
SetWindowRgn(m_hWnd, hRgn1, FALSE);
else {
DeleteObject(hRgn1);
@@ -1757,7 +1729,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) }
}
else {
- if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(m_hWnd, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
@@ -1801,7 +1773,7 @@ LRESULT CLUI::OnInitMenu(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) LRESULT CLUI::OnNcPaint(UINT msg, WPARAM wParam, LPARAM lParam)
{
int lRes = DefWindowProc(m_hWnd, msg, wParam, lParam);
- if (!g_CluiData.fLayered && db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT)) {
+ if (!g_CluiData.fLayered && Clist::bShowMainMenu) {
HDC hdc = nullptr;
if (msg == WM_PRINT) hdc = (HDC)wParam;
if (!hdc) hdc = GetWindowDC(m_hWnd);
@@ -2008,9 +1980,9 @@ LRESULT CLUI::OnAutoAlphaTimer(UINT, WPARAM, LPARAM) // change
bTransparentFocus = inwnd;
if (bTransparentFocus)
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
else
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? Clist::iAutoAlpha : 255), 1);
}
if (!bTransparentFocus)
KillTimer(m_hWnd, TM_AUTOALPHA);
@@ -2119,11 +2091,11 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam) CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
else {
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
Sync(CLUIFrames_ActivateSubContainers, TRUE);
if (g_bTransparentFlag) {
KillTimer(m_hWnd, TM_AUTOALPHA);
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
}
}
@@ -2131,9 +2103,9 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam) if (g_bTransparentFlag) {
uint8_t alpha;
if (wParam != WA_INACTIVE || CLUI_CheckOwnedByClui((HWND)lParam) || ((HWND)lParam == m_hWnd) || GetParent((HWND)lParam) == m_hWnd)
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
+ alpha = Clist::iAlpha;
else
- alpha = g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255;
+ alpha = g_bTransparentFlag ? Clist::iAutoAlpha : 255;
CLUI_SmoothAlphaTransition(m_hWnd, alpha, 1);
return 1;
}
@@ -2146,7 +2118,7 @@ LRESULT CLUI::OnSetCursor(UINT, WPARAM, LPARAM) if (g_CluiData.nBehindEdgeState >= 0) CLUI_UpdateTimer();
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != m_hWnd) {
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -2198,14 +2170,14 @@ LRESULT CLUI::OnNcHitTest(UINT, WPARAM wParam, LPARAM lParam) if (result == HTMENU) {
POINT pt = UNPACK_POINT(lParam);
int t = MenuItemFromPoint(m_hWnd, g_clistApi.hMenuMain, pt);
- if (t == -1 && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (t == -1 && Clist::bClientAreaDrag)
return HTCAPTION;
}
if (result == HTCLIENT) {
POINT pt = UNPACK_POINT(lParam);
int k = CLUI_SizingOnBorder(pt, 0);
- if (!k && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (!k && Clist::bClientAreaDrag)
return HTCAPTION;
else return k + 9;
}
@@ -2217,7 +2189,7 @@ LRESULT CLUI::OnShowWindow(UINT, WPARAM wParam, LPARAM lParam) if (lParam) return 0;
if (mutex_bShowHideCalledFromAnimation) return 1;
- uint8_t gAlpha = (!wParam) ? 0 : (g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT) : 255);
+ uint8_t gAlpha = (!wParam) ? 0 : Clist::bTransparent ? Clist::iAlpha : 255;
if (wParam) {
g_CluiData.bCurrentAlpha = 0;
Sync(CLUIFrames_OnShowHide, 1);
@@ -2239,8 +2211,6 @@ LRESULT CLUI::OnSysCommand(UINT msg, WPARAM wParam, LPARAM lParam) }
DefWindowProc(m_hWnd, msg, wParam, lParam);
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT))
- Sync(CLUIFrames_ActivateSubContainers, TRUE);
return FALSE;
}
@@ -2282,7 +2252,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL *pnmc) rcWindow = rcSizingRect;
else
GetWindowRect(m_hWnd, &rcWindow);
- if (!g_CluiData.fAutoSize || g_clistApi.hwndContactTree == nullptr || Clist_IsDocked())
+ if (!g_CluiData.fAutoSize || g_clistApi.hwndContactTree == nullptr)
return FALSE;
maxHeight = db_get_b(0, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT);
@@ -2364,7 +2334,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc) if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc);
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
pt = pnmc->pt;
@@ -2373,7 +2343,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc) return res;
}
- if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT))
+ if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag)
return ClcEnterDragToScroll(g_clistApi.hwndContactTree, pnmc->pt.y);
return 0;
diff --git a/plugins/Clist_modern/src/modern_clui.h b/plugins/Clist_modern/src/modern_clui.h index b32f677d5d..b67eec05b5 100644 --- a/plugins/Clist_modern/src/modern_clui.h +++ b/plugins/Clist_modern/src/modern_clui.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp index 79441cd62f..3c7ee4e638 100644 --- a/plugins/Clist_modern/src/modern_cluiservices.cpp +++ b/plugins/Clist_modern/src/modern_cluiservices.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index d84b89c2a3..3569a6c74e 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -152,7 +152,6 @@ int SetAlpha(uint8_t Alpha); /* others TODO: move above */
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse);
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
@@ -181,7 +180,7 @@ INT_PTR ToggleHideOffline(WPARAM wParam, LPARAM lParam); INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam); //contact.c
INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam); //contact.c
void ClcOptionsChanged(); //clc.c
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha); //gdiplus.cpp
void InitGdiPlus(); //gdiplus.cpp
void ShutdownGdiPlus(); //gdiplus.cpp
@@ -214,7 +213,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat); void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
+int cliGetRowsPriorTo(ClcData *dat, ClcGroup *subgroup, int contactIndex);
int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact);
int cli_RemoveEvent(CListEvent *cle);
void cli_FreeContact(ClcContact*);
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index abce4af1c8..0f40996ef8 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -66,8 +66,8 @@ uint32_t CompareContacts2_getLMTime(MCONTACT hContact) while (MEVENT hDbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !(dbei.flags & DBEF_SENT))
- return dbei.timestamp;
+ if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !dbei.bSent)
+ return dbei.getUnixtime();
}
return 0;
}
@@ -169,7 +169,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM) if (!newVal == (int)wParam) return 0;
newVal = wParam;
}
- Clist::UseGroups = newVal;
+ Clist::bUseGroups = newVal;
SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h index 18f29f537f..868484cf14 100644 --- a/plugins/Clist_modern/src/modern_defsettings.h +++ b/plugins/Clist_modern/src/modern_defsettings.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
Copyright 2007 Artem Shpynov
@@ -30,20 +30,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once
-#define SETTING_TOOLWINDOW_DEFAULT 1
-#define SETTING_ONTOP_DEFAULT 1
#define SETTING_MIN2TRAY_DEFAULT 1
#define SETTING_PLACEOFFLINETOROOT_DEFAULT 0
#define SETTING_THINBORDER_DEFAULT 0
#define SETTING_NOBORDER_DEFAULT 0
#define SETTING_WINDOWSHADOW_DEFAULT 0
-#define SETTING_ONDESKTOP_DEFAULT 0
#define SETTING_DISABLEWORKINGSET_DEFAULT 1
#define SETTING_ALWAYSVISICON_DEFAULT 0
-#define SETTING_SHOWMAINMENU_DEFAULT 1
-#define SETTING_SHOWCAPTION_DEFAULT 1
-#define SETTING_CLIENTDRAG_DEFAULT 1
#define SETTING_SHOWSBAR_DEFAULT 1
#define SETTING_SBARPERPROTO_DEFAULT 0
#define SETTING_USECONNECTINGICON_DEFAULT 1
@@ -188,13 +182,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_THIRDLINE_STATUSIFNOAWAY_DEFAULT 0
#define SETTING_THIRDLINE_LISTENINGIFNOAWAY_DEFAULT 0
-#define SETTING_TRANSPARENT_DEFAULT 0
-#define SETTING_AUTOALPHA_DEFAULT 150
-#define SETTING_AUTOHIDE_DEFAULT 0
-#define SETTING_HIDETIME_DEFAULT 30
-#define SETTING_CYCLETIME_DEFAULT 4
-#define SETTING_TRAYICON_DEFAULT SETTING_TRAYICON_SINGLE
-
#define SETTING_BLENDINACTIVESTATE_DEFAULT 0
#define CLCDEFAULT_MODERN_SELTEXTCOLOUR (g_CluiData.fDisableSkinEngine?GetSysColor(COLOR_HIGHLIGHTTEXT):RGB(0,0,128))
diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp deleted file mode 100644 index 810d262f19..0000000000 --- a/plugins/Clist_modern/src/modern_docking.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-24 Miranda NG team (https://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
-of the License, or (at your option) any later version.
-
-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.
-
-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 "stdafx.h"
-#include "modern_sync.h"
-
-#define WM_DOCKCALLBACK (WM_USER+121)
-#define WM_CREATEDOCKED (WM_USER+122)
-#define EDGESENSITIVITY 3
-
-#define DOCKED_NONE 0
-#define DOCKED_LEFT 1
-#define DOCKED_RIGHT 2
-
-BOOL LockSubframeMoving = 0;
-static int TempDock = 0;
-static int dock_drag_dx = 0;
-static int dock_drag_dy = 0;
-
-static void Docking_GetMonitorRectFromPoint(POINT pt, RECT *rc)
-{
- MONITORINFO monitorInfo;
- HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
- monitorInfo.cbSize = sizeof(MONITORINFO);
-
- if (GetMonitorInfo(hMonitor, &monitorInfo))
- {
- memcpy(rc, &monitorInfo.rcMonitor, sizeof(RECT));
- return;
- }
-
- // "generic" win95/NT support, also serves as failsafe
- rc->left = 0;
- rc->top = 0;
- rc->bottom = GetSystemMetrics(SM_CYSCREEN);
- rc->right = GetSystemMetrics(SM_CXSCREEN);
-}
-
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc)
-{
- POINT ptWindow;
- GetWindowRect(hWnd, rc);
- ptWindow.x = rc->left;
- ptWindow.y = rc->top;
- Docking_GetMonitorRectFromPoint(ptWindow, rc);
-}
-
-static void Docking_AdjustPosition(HWND hwnd, RECT *rcDisplay, RECT *rc)
-{
- APPBARDATA abd;
-
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = hwnd;
- abd.uEdge = g_CluiData.fDocked == DOCKED_LEFT ? ABE_LEFT : ABE_RIGHT;
- abd.rc = *rc;
- abd.rc.top = rcDisplay->top;
- abd.rc.bottom = rcDisplay->bottom;
- if (g_CluiData.fDocked == DOCKED_LEFT) {
- abd.rc.right = rcDisplay->left + abd.rc.right - abd.rc.left;
- abd.rc.left = rcDisplay->left;
- }
- else {
- abd.rc.left = rcDisplay->right - (abd.rc.right - abd.rc.left);
- abd.rc.right = rcDisplay->right;
-
- }
- SHAppBarMessage(ABM_SETPOS, &abd);
- *rc = abd.rc;
-}
-
-int Docking_IsDocked(WPARAM, LPARAM)
-{
- return g_CluiData.fDocked;
-}
-
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
-{
- APPBARDATA abd;
- static int draggingTitle;
- MSG *msg = (MSG*)wParam;
-
- if (msg->message == WM_DESTROY)
- g_plugin.setByte("Docked", (uint8_t)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 (g_plugin.getByte("Docked", 0) && db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT))
- {
- PostMessage(msg->hwnd, WM_CREATEDOCKED, 0, 0);
- }
- draggingTitle = 0;
- return 0;
-
- case WM_CREATEDOCKED:
- //we need to post a message just after creation to let main message function do some work
- g_CluiData.fDocked = (BOOL)g_plugin.getByte("Docked", 0);
- if (IsWindowVisible(msg->hwnd) && !IsIconic(msg->hwnd)) {
- RECT rc, rcMonitor;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
- g_CluiData.mutexPreventDockMoving = 0;
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rc);
- g_CluiData.mutexPreventDockMoving = 1;
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- break;
- case WM_CAPTURECHANGED:
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return 0;
- case WM_ACTIVATE:
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_ACTIVATE, &abd);
- return 0;
- case WM_SIZE:
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_REDRAW_ALL, nullptr);
- return 0;
-
- case WM_WINDOWPOSCHANGED:
- {
- if (g_CluiData.fDocked)
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return 0;
- }
- case WM_MOVING:
- {
- RECT rcMonitor;
- RECT rcWindow;
- RECT *rc;
- int dx = 0;
- POINT ptCursor;
- if (g_CluiData.fDocked) return 0;
-
- // GetMessagePos() is no good, position is always unsigned
- GetCursorPos(&ptCursor);
- GetWindowRect(msg->hwnd, &rcWindow);
- dock_drag_dx = rcWindow.left - ptCursor.x;
- dock_drag_dy = rcWindow.top - ptCursor.y;
- Docking_GetMonitorRectFromPoint(ptCursor, &rcMonitor);
-
- if (((ptCursor.x < rcMonitor.left + EDGESENSITIVITY)
- || (ptCursor.x >= rcMonitor.right - EDGESENSITIVITY))
- && db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT))
- {
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- if (ptCursor.x < rcMonitor.left + EDGESENSITIVITY) g_CluiData.fDocked = DOCKED_LEFT;
- else g_CluiData.fDocked = DOCKED_RIGHT;
- // TempDock = 1;
- GetWindowRect(msg->hwnd, (LPRECT)msg->lParam);
- rc = (RECT*)msg->lParam;
- if (g_CluiData.fDocked == DOCKED_RIGHT)
- dx = (rc->right > rcMonitor.right) ? rc->right - rcMonitor.right : 0;
- else
- 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);
- g_CluiData.mutexPreventDockMoving = 0;
- Sync(CLUIFrames_OnMoving, msg->hwnd, (LPRECT)msg->lParam);
- g_CluiData.mutexPreventDockMoving = 1;
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
- g_plugin.setByte("Docked", (uint8_t)g_CluiData.fDocked);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return TRUE;
- }
- return 0;
- }
- case WM_EXITSIZEMOVE:
- {
- RECT rcMonitor;
- RECT rcWindow;
- if (TempDock) TempDock = 0;
- GetWindowRect(msg->hwnd, &rcWindow);
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rcWindow);
- *((LRESULT*)lParam) = TRUE;
- g_CluiData.mutexPreventDockMoving = 0;
- SetWindowPos(msg->hwnd, nullptr, 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, nullptr);// -= -= -=
- g_CluiData.mutexPreventDockMoving = 1;
- return 1;
- }
-
- case WM_MOVE:
- {
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_ALT_DRAW, nullptr);
- return 0;
- }
- case WM_SIZING:
- {
- if (g_CluiData.fDocked) ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return FALSE;
- }
- case WM_SHOWWINDOW:
- {
- if (msg->lParam)
- return 0;
- if ((msg->wParam && g_CluiData.fDocked < 0) || (!msg->wParam && g_CluiData.fDocked>0))
- g_CluiData.fDocked = -g_CluiData.fDocked;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- if (msg->wParam) {
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- 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, nullptr);// -= -= -=
- }
- else {
- SHAppBarMessage(ABM_REMOVE, &abd);
- }
- }
- return 0;
- case WM_NCHITTEST:
- { LONG result;
- result = DefWindowProc(msg->hwnd, WM_NCHITTEST, msg->wParam, msg->lParam);
- 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; }
-
-
- return 0;
- }
- case WM_SYSCOMMAND:
- if ((msg->wParam & 0xFFF0) != SC_MOVE) return 0;
- SetActiveWindow(msg->hwnd);
- SetCapture(msg->hwnd);
- draggingTitle = 1;
- *((LRESULT*)lParam) = 0;
- return TRUE;
- case WM_MOUSEMOVE:
-
- if (!draggingTitle) return 0;
- { 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) ||
- ((g_CluiData.fDocked == DOCKED_RIGHT || g_CluiData.fDocked == -DOCKED_RIGHT) && (short)LOWORD(msg->lParam) < 0)) {
- ReleaseCapture();
- draggingTitle = 0;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- g_CluiData.fDocked = 0;
- GetCursorPos(&pt);
- PostMessage(msg->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(pt.x, pt.y));
- SetWindowPos(msg->hwnd, nullptr, pt.x - rc.right / 2, pt.y - GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYSMCAPTION) / 2, g_plugin.getDword("Width", 0), g_plugin.getDword("Height", 0), SWP_NOZORDER);
- g_plugin.setByte("Docked", (uint8_t)g_CluiData.fDocked);
- // ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- return 1;
- }
- case WM_LBUTTONUP:
- if (draggingTitle) {
- ReleaseCapture();
- draggingTitle = 0;
- }
- return 0;
- case WM_DOCKCALLBACK:
- switch (msg->wParam) {
- case ABN_WINDOWARRANGE:
- CLUI_ShowWindowMod(msg->hwnd, msg->lParam ? SW_HIDE : SW_SHOW);
- {
-
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- GetWindowRect(msg->hwnd, &rc);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rc); // -= -= -=
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
-
- g_CluiData.mutexPreventDockMoving = 1;
- }
- break;
- }
- return TRUE;
- case WM_DESTROY:
- if (g_CluiData.fDocked > 0) {
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- return 0;
- }
- return 0;
-}
diff --git a/plugins/Clist_modern/src/modern_global.cpp b/plugins/Clist_modern/src/modern_global.cpp index aeeff9d86e..b70a506e9d 100644 --- a/plugins/Clist_modern/src/modern_global.cpp +++ b/plugins/Clist_modern/src/modern_global.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h index 689d06b7de..28cd3507a8 100644 --- a/plugins/Clist_modern/src/modern_global_structure.h +++ b/plugins/Clist_modern/src/modern_global_structure.h @@ -44,7 +44,6 @@ struct CLUIDATA bool bEventAreaEnabled;
bool bNotifyActive;
bool fDisableSkinEngine;
- bool fOnDesktop;
bool fSmoothAnimation;
bool fLayered;
bool fSortOfflineBottom;
diff --git a/plugins/Clist_modern/src/modern_image_array.cpp b/plugins/Clist_modern/src/modern_image_array.cpp index 3af166cdac..8a5b3eb4e2 100644 --- a/plugins/Clist_modern/src/modern_image_array.cpp +++ b/plugins/Clist_modern/src/modern_image_array.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_image_array.h b/plugins/Clist_modern/src/modern_image_array.h index a62ce2bfb1..6bb459c1c9 100644 --- a/plugins/Clist_modern/src/modern_image_array.h +++ b/plugins/Clist_modern/src/modern_image_array.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp index 12765c2754..3ed1698f8b 100644 --- a/plugins/Clist_modern/src/modern_keyboard.cpp +++ b/plugins/Clist_modern/src/modern_keyboard.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index 8ef47bdf1e..adf3b32a4a 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_rowheight_funcs.h b/plugins/Clist_modern/src/modern_rowheight_funcs.h index 7318c45008..72341d5724 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.h +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index 61772baee1..44f2b3fc81 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 651896d422..3246fd5776 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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 160429b338..33b5cc17b0 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index f4ca98a19a..d6e2a9bd1b 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_skinselector.h b/plugins/Clist_modern/src/modern_skinselector.h index 842fed0578..033a555d32 100644 --- a/plugins/Clist_modern/src/modern_skinselector.h +++ b/plugins/Clist_modern/src/modern_skinselector.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_static_clui.h b/plugins/Clist_modern/src/modern_static_clui.h index 3777e3b6e7..475d389997 100644 --- a/plugins/Clist_modern/src/modern_static_clui.h +++ b/plugins/Clist_modern/src/modern_static_clui.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -62,7 +62,7 @@ int CListMod_HideWindow(HWND hwndContactList, int mode); int CLUIServices_LoadModule(void);
INT_PTR CLUIServices_SortList(WPARAM wParam, LPARAM lParam);
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc);
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc);
int EventArea_Create(HWND hCluiWnd);
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 1ab7247a93..3c0c50613c 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 73575ff49c..d891cbaa90 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
Copyright 2007 Artem Shpynov
@@ -85,8 +85,8 @@ void Modern_InitButtons() it.hButton = g_plugin.addTTB(&tbb);
}
- SetButtonPressed(3, Clist::HideOffline);
- SetButtonPressed(6, Clist::UseGroups);
+ SetButtonPressed(3, Clist::bHideOffline);
+ SetButtonPressed(6, Clist::bUseGroups);
SetButtonPressed(7, db_get_b(0, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT));
}
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index 2cea1b9a1a..2210a2c3ab 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -62,3 +62,27 @@ BOOL DestroyIcon_protect(HICON icon) if (icon) return DestroyIcon(icon);
return FALSE;
}
+
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc)
+{
+ POINT pt;
+ GetWindowRect(hWnd, rc);
+ pt.x = rc->left;
+ pt.y = rc->top;
+
+ MONITORINFO monitorInfo;
+ HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
+ monitorInfo.cbSize = sizeof(MONITORINFO);
+
+ if (GetMonitorInfoW(hMonitor, &monitorInfo)) {
+ memcpy(rc, &monitorInfo.rcMonitor, sizeof(RECT));
+ return;
+ }
+
+ // "generic" win95/NT support, also serves as failsafe
+ rc->left = 0;
+ rc->top = 0;
+ rc->bottom = GetSystemMetrics(SM_CYSCREEN);
+ rc->right = GetSystemMetrics(SM_CXSCREEN);
+
+}
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 6557e5dc8e..78b428ac52 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
@@ -1340,7 +1340,7 @@ void ApplyViewMode(const char *szName) if (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) {
if (g_CluiData.bOldHideOffline == -1)
- g_CluiData.bOldHideOffline = Clist::HideOffline;
+ g_CluiData.bOldHideOffline = Clist::bHideOffline;
g_clistApi.pfnSetHideOffline(false);
}
@@ -1352,7 +1352,7 @@ void ApplyViewMode(const char *szName) int iValue = (g_CluiData.filterFlags & CLVM_USEGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_DONOTUSEGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldUseGroups == -1)
- g_CluiData.bOldUseGroups = Clist::UseGroups;
+ g_CluiData.bOldUseGroups = Clist::bUseGroups;
CallService(MS_CLIST_SETUSEGROUPS, iValue, 0);
}
@@ -1364,7 +1364,7 @@ void ApplyViewMode(const char *szName) iValue = (g_CluiData.filterFlags & CLVM_HIDEEMPTYGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_SHOWEMPTYGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldHideEmptyGroups == -1)
- g_CluiData.bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ g_CluiData.bOldHideEmptyGroups = Clist::bHideEmptyGroups;
SendMessage(g_clistApi.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, iValue, 0);
}
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index 8e46e99484..a82aa3812b 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -250,7 +250,6 @@ #define IDC_HILIGHTMODE2 1659
#define IDC_HILIGHTMODE1 1660
#define IDC_HILIGHTMODE3 1661
-#define IDC_ONDESKTOP 1662
#define IDC_HILIGHTMODE4 1663
#define IDC_USECONNECTINGICON 1761
#define IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK 1761
@@ -302,7 +301,6 @@ #define IDC_AVATAR_SIZE_PIXELS3 1806
#define IDC_LAYERENGINE 1807
#define IDC_SNAPTOEDGES 1808
-#define IDC_DOCKTOSIDES 1809
#define IDC_AVATAR_OVERLAY_ICON_NORMAL 1811
#define IDC_EVENTAREA_NONE 1811
#define IDC_AVATAR_OVERLAY_ICON_PROTOCOL 1812
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h index 7a1bb97db5..9af21c4a65 100644 --- a/plugins/Clist_modern/src/stdafx.h +++ b/plugins/Clist_modern/src/stdafx.h @@ -5,7 +5,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://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.
|