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/TopToolBar/src | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r-- | plugins/TopToolBar/src/InternalButtons.cpp | 12 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 4 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbarwnd.cpp | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 7ce86882b9..012b96bcc1 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -52,8 +52,8 @@ INT_PTR TTBInternalStatusMenuButt(WPARAM, LPARAM) INT_PTR TTBInternalSoundsOnOff(WPARAM, LPARAM)
{
- int newVal = !(db_get_b(NULL, "Skin", "UseSound", 1));
- db_set_b(NULL, "Skin", "UseSound", (BYTE)newVal);
+ int newVal = !(db_get_b(0, "Skin", "UseSound", 1));
+ db_set_b(0, "Skin", "UseSound", (BYTE)newVal);
return 0;
}
@@ -159,16 +159,16 @@ void InitInternalButtons() hExit = g_plugin.addTTB(&ttb);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hShowHideOffline,
- db_get_b(NULL, "CList", "HideOffline", 0) ? 0 : TTBST_PUSHED);
+ db_get_b(0, "CList", "HideOffline", 0) ? 0 : TTBST_PUSHED);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups,
- db_get_b(NULL, "CList", "UseGroups", 1) ? TTBST_PUSHED : 0);
+ db_get_b(0, "CList", "UseGroups", 1) ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hSounds,
- db_get_b(NULL, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);
+ db_get_b(0, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hMetaContacts,
- db_get_b(NULL, "MetaContacts", "Enabled", 1) ? TTBST_PUSHED : 0);
+ db_get_b(0, "MetaContacts", "Enabled", 1) ? TTBST_PUSHED : 0);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanging);
}
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index da81db4300..633f9ad155 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -623,9 +623,9 @@ static LRESULT CALLBACK TTBButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA int LoadToolbarModule()
{
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- if (!db_get_b(NULL, TTB_OPTDIR, "WarningDone", 0))
+ if (!db_get_b(0, TTB_OPTDIR, "WarningDone", 0))
MessageBox(nullptr, TranslateT("Frames service has not been found, so plugin will be disabled.\nTo run it you need to install and / or enable contact list plugin that supports it:\n- Modern contact list\n- Clist nicer\nYou can get them at https://wiki.miranda-ng.org/Download"), TranslateT("TopToolBar"), 0);
- db_set_b(NULL, TTB_OPTDIR, "WarningDone", 1);
+ db_set_b(0, TTB_OPTDIR, "WarningDone", 1);
return 1;
}
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index 3eb9e78cde..88a918cc29 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -162,7 +162,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return 0; case WM_LBUTTONDOWN: - if (db_get_b(NULL, "CLUI", "ClientAreaDrag", 0)) { + if (db_get_b(0, "CLUI", "ClientAreaDrag", 0)) { POINT pt; GetCursorPos(&pt); return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE|HTCAPTION, MAKELPARAM(pt.x, pt.y)); @@ -289,18 +289,18 @@ void CALLBACK OnEventFire() int LoadBackgroundOptions() { - bkColour = db_get_dw(NULL, TTB_OPTDIR, "BkColour", TTBDEFAULT_BKCOLOUR); + bkColour = db_get_dw(0, TTB_OPTDIR, "BkColour", TTBDEFAULT_BKCOLOUR); if (hBmpBackground) { DeleteObject(hBmpBackground); hBmpBackground = nullptr; } - if (db_get_b(NULL, TTB_OPTDIR, "UseBitmap", TTBDEFAULT_USEBITMAP)) { + if (db_get_b(0, TTB_OPTDIR, "UseBitmap", TTBDEFAULT_USEBITMAP)) { ptrW tszBitmapName(db_get_wsa(NULL, TTB_OPTDIR, "BkBitmap")); if (tszBitmapName != NULL) hBmpBackground = Bitmap_Load(tszBitmapName); } - backgroundBmpUse = db_get_w(NULL, TTB_OPTDIR, "BkBmpUse", TTBDEFAULT_BKBMPUSE); + backgroundBmpUse = db_get_w(0, TTB_OPTDIR, "BkBmpUse", TTBDEFAULT_BKBMPUSE); RECT rc; GetClientRect(g_ctrl->hWnd, &rc); |