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/YAMN | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/YAMN')
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 10 | ||||
-rw-r--r-- | plugins/YAMN/src/main.cpp | 22 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3opt.cpp | 18 | ||||
-rw-r--r-- | plugins/YAMN/src/services.cpp | 14 |
4 files changed, 32 insertions, 32 deletions
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index d3b093e8d9..654f529e31 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -1719,10 +1719,10 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR SizeX = coord.right - coord.left; PosY = coord.top; SizeY = coord.bottom - coord.top; - db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSX, PosX); - db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSY, PosY); - db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEX, SizeX); - db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEY, SizeY); + db_set_dw(0, YAMN_DBMODULE, YAMN_DBPOSX, PosX); + db_set_dw(0, YAMN_DBMODULE, YAMN_DBPOSY, PosY); + db_set_dw(0, YAMN_DBMODULE, YAMN_DBSIZEX, SizeX); + db_set_dw(0, YAMN_DBMODULE, YAMN_DBSIZEY, SizeY); } KillTimer(hDlg, TIMER_FLASHING); @@ -2047,7 +2047,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR } } CloseHandle(ThreadRunningEV); - if (db_get_b(NULL, YAMN_DBMODULE, YAMN_CLOSEDELETE, 0)) + if (db_get_b(0, YAMN_DBMODULE, YAMN_CLOSEDELETE, 0)) DestroyWindow(hDlg); } break; diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index f40bc54a1e..db6fb2039c 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -116,7 +116,7 @@ BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) void CheckMenuItems() { - Menu_ShowItem(hMenuItemMain, db_get_b(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1) != 0); + Menu_ShowItem(hMenuItemMain, db_get_b(0, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1) != 0); } int SystemModulesLoaded(WPARAM, LPARAM) @@ -264,18 +264,18 @@ int CMPlugin::Load() if (nullptr == (ExitEV = CreateEvent(nullptr, TRUE, FALSE, nullptr))) return 1; - PosX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSX, 0); - PosY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSY, 0); - SizeX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEX, 800); - SizeY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEY, 200); + PosX = db_get_dw(0, YAMN_DBMODULE, YAMN_DBPOSX, 0); + PosY = db_get_dw(0, YAMN_DBMODULE, YAMN_DBPOSY, 0); + SizeX = db_get_dw(0, YAMN_DBMODULE, YAMN_DBSIZEX, 800); + SizeY = db_get_dw(0, YAMN_DBMODULE, YAMN_DBSIZEY, 200); - HeadPosX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSX, 0); - HeadPosY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSY, 0); - HeadSizeX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEX, 690); - HeadSizeY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEY, 300); - HeadSplitPos = db_get_w(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSSPLIT, 250); + HeadPosX = db_get_dw(0, YAMN_DBMODULE, YAMN_DBMSGPOSX, 0); + HeadPosY = db_get_dw(0, YAMN_DBMODULE, YAMN_DBMSGPOSY, 0); + HeadSizeX = db_get_dw(0, YAMN_DBMODULE, YAMN_DBMSGSIZEX, 690); + HeadSizeY = db_get_dw(0, YAMN_DBMODULE, YAMN_DBMSGSIZEY, 300); + HeadSplitPos = db_get_w(0, YAMN_DBMODULE, YAMN_DBMSGPOSSPLIT, 250); - optDateTime = db_get_b(NULL, YAMN_DBMODULE, YAMN_DBTIMEOPTIONS, optDateTime); + optDateTime = db_get_b(0, YAMN_DBMODULE, YAMN_DBTIMEOPTIONS, optDateTime); // Create new window queues for broadcast messages YAMNVar.MessageWnds = WindowList_Create(); diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 8516144847..ff4b4f33d6 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -20,13 +20,13 @@ INT_PTR CALLBACK DlgProcYAMNOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hDlg);
- CheckDlgButton(hDlg, IDC_CHECKTTB, db_get_b(NULL, YAMN_DBMODULE, YAMN_TTBFCHECK, 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_CHECKTTB, db_get_b(0, YAMN_DBMODULE, YAMN_TTBFCHECK, 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_LONGDATE, (optDateTime&SHOWDATELONG) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_SMARTDATE, (optDateTime&SHOWDATENOTODAY) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_NOSECONDS, (optDateTime&SHOWDATENOSECONDS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hDlg, IDC_MAINMENU, db_get_b(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hDlg, IDC_YAMNASPROTO, db_get_b(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hDlg, IDC_CLOSEONDELETE, db_get_b(NULL, YAMN_DBMODULE, YAMN_CLOSEDELETE, 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_MAINMENU, db_get_b(0, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_YAMNASPROTO, db_get_b(0, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_CLOSEONDELETE, db_get_b(0, YAMN_DBMODULE, YAMN_CLOSEDELETE, 0) ? BST_CHECKED : BST_UNCHECKED);
break;
case WM_COMMAND:
@@ -48,10 +48,10 @@ INT_PTR CALLBACK DlgProcYAMNOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, IsDlgButtonChecked(hDlg, IDC_YAMNASPROTO));
- db_set_b(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, IsDlgButtonChecked(hDlg, IDC_MAINMENU));
- db_set_b(NULL, YAMN_DBMODULE, YAMN_CLOSEDELETE, IsDlgButtonChecked(hDlg, IDC_CLOSEONDELETE));
- db_set_b(NULL, YAMN_DBMODULE, YAMN_TTBFCHECK, IsDlgButtonChecked(hDlg, IDC_CHECKTTB));
+ db_set_b(0, YAMN_DBMODULE, YAMN_SHOWASPROTO, IsDlgButtonChecked(hDlg, IDC_YAMNASPROTO));
+ db_set_b(0, YAMN_DBMODULE, YAMN_SHOWMAINMENU, IsDlgButtonChecked(hDlg, IDC_MAINMENU));
+ db_set_b(0, YAMN_DBMODULE, YAMN_CLOSEDELETE, IsDlgButtonChecked(hDlg, IDC_CLOSEONDELETE));
+ db_set_b(0, YAMN_DBMODULE, YAMN_TTBFCHECK, IsDlgButtonChecked(hDlg, IDC_CHECKTTB));
AddTopToolbarIcon(0, 0);
CheckMenuItems();
@@ -60,7 +60,7 @@ INT_PTR CALLBACK DlgProcYAMNOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara if (IsDlgButtonChecked(hDlg, IDC_LONGDATE))optDateTime |= SHOWDATELONG;
if (IsDlgButtonChecked(hDlg, IDC_SMARTDATE))optDateTime |= SHOWDATENOTODAY;
if (IsDlgButtonChecked(hDlg, IDC_NOSECONDS))optDateTime |= SHOWDATENOSECONDS;
- db_set_b(NULL, YAMN_DBMODULE, YAMN_DBTIMEOPTIONS, optDateTime);
+ db_set_b(0, YAMN_DBMODULE, YAMN_DBTIMEOPTIONS, optDateTime);
}
}
break;
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index c8517bda3e..392e6be674 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -11,7 +11,7 @@ static INT_PTR Service_GetCaps(WPARAM wParam, LPARAM) if (wParam == PFLAGNUM_2)
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
if (wParam == PFLAGNUM_5) {
- if (db_get_b(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1))
+ if (db_get_b(0, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1))
return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
}
@@ -292,7 +292,7 @@ HBITMAP LoadBmpFromIcon(HICON hIcon) int AddTopToolbarIcon(WPARAM, LPARAM)
{
- if (db_get_b(NULL, YAMN_DBMODULE, YAMN_TTBFCHECK, 1)) {
+ if (db_get_b(0, YAMN_DBMODULE, YAMN_TTBFCHECK, 1)) {
if (ServiceExists(MS_TTB_REMOVEBUTTON) && hTTButton == nullptr) {
TTBButton btn = {};
btn.pszService = MS_YAMN_FORCECHECK;
@@ -318,11 +318,11 @@ int Shutdown(WPARAM, LPARAM) {
CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0);
- db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSX, HeadPosX);
- db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSY, HeadPosY);
- db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEX, HeadSizeX);
- db_set_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEY, HeadSizeY);
- db_set_w(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSSPLIT, HeadSplitPos);
+ db_set_dw(0, YAMN_DBMODULE, YAMN_DBMSGPOSX, HeadPosX);
+ db_set_dw(0, YAMN_DBMODULE, YAMN_DBMSGPOSY, HeadPosY);
+ db_set_dw(0, YAMN_DBMODULE, YAMN_DBMSGSIZEX, HeadSizeX);
+ db_set_dw(0, YAMN_DBMODULE, YAMN_DBMSGSIZEY, HeadSizeY);
+ db_set_w(0, YAMN_DBMODULE, YAMN_DBMSGPOSSPLIT, HeadSplitPos);
YAMNVar.Shutdown = TRUE;
KillTimer(nullptr, SecTimer);
|