diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-14 18:24:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-14 18:24:56 +0300 |
commit | 68d6271552d4b9bdb27efda50c457f0d56b23457 (patch) | |
tree | 0221f56a8545815514eb3350afe92a2d0262251b /plugins/GmailNotifier | |
parent | 64e3214c2222543350f51b517a6b75b6b02b81cf (diff) |
other minor code cleaning considering g_plugin
Diffstat (limited to 'plugins/GmailNotifier')
-rw-r--r-- | plugins/GmailNotifier/src/notify.cpp | 8 | ||||
-rw-r--r-- | plugins/GmailNotifier/src/options.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
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;
|