diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
commit | 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 (patch) | |
tree | 10da2f8951d20103af0215c38d07ea96ba61c191 /plugins/YAMN/src | |
parent | 91b13500b47a51f3a284d9f409b7b8dac167a06d (diff) |
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 8 | ||||
-rw-r--r-- | plugins/YAMN/src/main.cpp | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index b5ffce0881..627ea22e04 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -645,7 +645,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D evt.lParam = ActualAccount->hContact; evt.pszService = MS_YAMN_CLISTDBLCLICK; evt.szTooltip.w = tszMsg; - pcli->pfnAddEvent(&evt); + g_CLI.pfnAddEvent(&evt); } db_set_ws(ActualAccount->hContact, "CList", "StatusMsg", tszMsg); @@ -684,7 +684,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D // and remove the event if ((nflags & YAMN_ACC_CONT) && (!(nflags & YAMN_ACC_CONTNOEVENT)) && (MN->Real.UnSeen + MN->Virtual.UnSeen == 0)) - pcli->pfnRemoveEvent(ActualAccount->hContact, ActualAccount->hContact); + g_CLI.pfnRemoveEvent(ActualAccount->hContact, ActualAccount->hContact); if ((MN->Real.BrowserUC + MN->Virtual.BrowserUC == 0) && (hDlg != nullptr)) { if (!IsWindowVisible(hDlg) && !(nflags & YAMN_ACC_MSG)) @@ -843,7 +843,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa #endif } if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) - pcli->pfnRemoveEvent(hContact, hContact); + g_CLI.pfnRemoveEvent(hContact, hContact); } __fallthrough; @@ -1683,7 +1683,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR SetTimer(hDlg, TIMER_FLASHING, 500, nullptr); if (ActualAccount->hContact != NULL) - pcli->pfnRemoveEvent(ActualAccount->hContact, (LPARAM)"yamn new mail message"); + g_CLI.pfnRemoveEvent(ActualAccount->hContact, (LPARAM)"yamn new mail message"); mir_subclassWindow(GetDlgItem(hDlg, IDC_LISTMAILS), ListViewSubclassProc); } diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 763bbe0492..4cd7b8dd43 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -30,7 +30,6 @@ static int iDllPlugins = 0; YAMN_VARIABLES YAMNVar; CMPlugin g_plugin; -CLIST_INTERFACE *pcli; HANDLE hNewMailHook; HANDLE NoWriterEV; @@ -235,8 +234,6 @@ static void LoadPlugins() extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - YAMN_STATUS = ID_STATUS_OFFLINE; // we get the Miranda Root Path |