From 68d6271552d4b9bdb27efda50c457f0d56b23457 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Nov 2018 18:24:56 +0300 Subject: other minor code cleaning considering g_plugin --- plugins/GmailNotifier/src/notify.cpp | 8 ++++---- plugins/GmailNotifier/src/options.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/GmailNotifier') diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index f47c0792cd..42804b3322 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -82,7 +82,7 @@ int OpenBrowser(WPARAM hContact, LPARAM) return FALSE; if (curAcc->oldResults_num != 0) { - db_set_w(curAcc->hContact, MODULENAME, "Status", ID_STATUS_NONEW); + g_plugin.setWord(curAcc->hContact, "Status", ID_STATUS_NONEW); curAcc->oldResults_num = 0; DeleteResults(curAcc->results.next); curAcc->results.next = nullptr; @@ -134,15 +134,15 @@ void NotifyUser(Account *curAcc) PUDeletePopup(curAcc->popUpHwnd); g_clistApi.pfnRemoveEvent(curAcc->hContact, 1); if (curAcc->oldResults_num != 0) - db_set_w(curAcc->hContact, MODULENAME, "Status", ID_STATUS_NONEW); + g_plugin.setWord(curAcc->hContact, "Status", ID_STATUS_NONEW); break; case -1: - db_set_w(curAcc->hContact, MODULENAME, "Status", ID_STATUS_AWAY); + g_plugin.setWord(curAcc->hContact, "Status", ID_STATUS_AWAY); break; default: - db_set_w(curAcc->hContact, MODULENAME, "Status", ID_STATUS_OCCUPIED); + g_plugin.setWord(curAcc->hContact, "Status", ID_STATUS_OCCUPIED); int newMails = (curAcc->oldResults_num == -1) ? (curAcc->results_num) : (curAcc->results_num - curAcc->oldResults_num); if (opt.LogThreads&&newMails > 0) { DBEVENTINFO dbei = {}; diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index e9bc4bab5c..3a520b6cd2 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -13,11 +13,11 @@ static void SaveButton(HWND hwndDlg, HWND hwndCombo, int curIndex) SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0); SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LPARAM)acc.name); SendMessageA(hwndCombo, CB_SETCURSEL, curIndex, 0); - db_set_s(acc.hContact, MODULENAME, "name", acc.name); - db_set_s(acc.hContact, MODULENAME, "Nick", acc.name); + g_plugin.setString(acc.hContact, "name", acc.name); + g_plugin.setString(acc.hContact, "Nick", acc.name); GetDlgItemTextA(hwndDlg, IDC_PASS, acc.pass, _countof(acc.pass)); - db_set_s(acc.hContact, MODULENAME, "Password", acc.pass); + g_plugin.setString(acc.hContact, "Password", acc.pass); } } @@ -259,7 +259,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; for (auto &it : g_accs) - db_set_w(it->hContact, MODULENAME, "Status", ID_STATUS_NONEW); + g_plugin.setWord(it->hContact, "Status", ID_STATUS_NONEW); } return TRUE; -- cgit v1.2.3