diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_clistmod.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
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);
}
|