diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/Ping/src/pingthread.cpp | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/Ping/src/pingthread.cpp')
-rw-r--r-- | plugins/Ping/src/pingthread.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index f17298f6e1..7eff156372 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -356,11 +356,11 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if ((dis->itemState & ODS_SELECTED && dis->itemState & ODS_FOCUS)
|| (context_point_valid && (x >= dis->rcItem.left && x <= dis->rcItem.right) && (y >= dis->rcItem.top && y <= dis->rcItem.bottom))) {
- tcol = db_get_dw(NULL, "CLC", "SelBkColour", GetSysColor(COLOR_HIGHLIGHT));
+ tcol = db_get_dw(0, "CLC", "SelBkColour", GetSysColor(COLOR_HIGHLIGHT));
SetBkColor(dis->hDC, tcol);
FillRect(dis->hDC, &dis->rcItem, (ttbrush = CreateSolidBrush(tcol)));
- tcol = db_get_dw(NULL, "CLC", "SelTextColour", GetSysColor(COLOR_HIGHLIGHTTEXT));
+ tcol = db_get_dw(0, "CLC", "SelTextColour", GetSysColor(COLOR_HIGHLIGHTTEXT));
SetTextColor(dis->hDC, tcol);
}
else {
@@ -368,7 +368,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar SetBkColor(dis->hDC, tcol);
FillRect(dis->hDC, &dis->rcItem, (ttbrush = CreateSolidBrush(tcol)));
- tcol = db_get_dw(NULL, MODULENAME, "FontCol", GetSysColor(COLOR_WINDOWTEXT));
+ tcol = g_plugin.getDword("FontCol", GetSysColor(COLOR_WINDOWTEXT));
SetTextColor(dis->hDC, tcol);
}
@@ -475,7 +475,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar (WS_VISIBLE | WS_CHILD | LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_NOTIFY)
& ~WS_BORDER, 0, 0, 0, 0, hwnd, nullptr, g_plugin.getInst(), nullptr);
- if (db_get_b(NULL, "CList", "Transparent", 0)) {
+ if (db_get_b(0, "CList", "Transparent", 0)) {
if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
}
@@ -484,7 +484,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
#endif
#ifdef LWA_ALPHA
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
#endif
}
}
@@ -499,15 +499,15 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_ACTIVATE:
if (wParam == WA_INACTIVE) {
if ((HWND)wParam != hwnd)
- if (db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT))
+ if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT))
if (transparentFocus)
SetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
else {
- if (db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
+ if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
KillTimer(hwnd, TM_AUTOALPHA);
#ifdef LWA_ALPHA
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
#endif
transparentFocus = 1;
}
@@ -515,10 +515,10 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar return DefWindowProc(hwnd, msg, wParam, lParam);
case WM_SETCURSOR:
- if (db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
+ if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
if (!transparentFocus && GetForegroundWindow() != hwnd) {
#ifdef LWA_ALPHA
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
#endif
transparentFocus = 1;
SetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
@@ -545,8 +545,8 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (inwnd != transparentFocus) { //change
transparentFocus = inwnd;
#ifdef LWA_ALPHA
- if (transparentFocus) SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
- else SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ if (transparentFocus) SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ else SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)db_get_b(0, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
#endif
}
if (!transparentFocus) KillTimer(hwnd, TM_AUTOALPHA);
@@ -559,7 +559,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar static int noRecurse = 0;
if (lParam) break;
if (noRecurse) break;
- if (!db_get_b(NULL, "CLUI", "FadeInOut", 0))
+ if (!db_get_b(0, "CLUI", "FadeInOut", 0))
break;
#ifdef WS_EX_LAYERED
if (GetWindowLongPtr(hwnd, GWL_EXSTYLE)&WS_EX_LAYERED) {
@@ -567,7 +567,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar int sourceAlpha, destAlpha;
if (wParam) {
sourceAlpha = 0;
- destAlpha = (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
+ destAlpha = (BYTE)db_get_b(0, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
#ifdef LWA_ALPHA
SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LWA_ALPHA);
#endif
@@ -576,7 +576,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar noRecurse = 0;
}
else {
- sourceAlpha = (BYTE)db_get_b(NULL, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
+ sourceAlpha = (BYTE)db_get_b(0, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
destAlpha = 0;
}
for (startTick = GetTickCount();;) {
|