summaryrefslogtreecommitdiff
path: root/plugins/IEHistory/src/services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-10-30 16:54:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-10-30 16:54:51 +0300
commit757b64f04ea74dabb2b70a04b68e00458787b221 (patch)
treeef62f4accf5a7a0daed7a8cef828e2197c3d659e /plugins/IEHistory/src/services.cpp
parent9ce55e2efc6d4f5e53ef3c1bf9f1dd95e77a7b08 (diff)
IEHistory : options code cleaning
Diffstat (limited to 'plugins/IEHistory/src/services.cpp')
-rw-r--r--plugins/IEHistory/src/services.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/plugins/IEHistory/src/services.cpp b/plugins/IEHistory/src/services.cpp
index ec5210e8df..bae78b396b 100644
--- a/plugins/IEHistory/src/services.cpp
+++ b/plugins/IEHistory/src/services.cpp
@@ -21,36 +21,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "services.h"
-int InitServices()
-{
- CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, ShowContactHistoryService);
- return 0;
-}
-
-INT_PTR ShowContactHistoryService(WPARAM wParam, LPARAM)
+INT_PTR ShowContactHistoryService(WPARAM hContact, LPARAM)
{
Log("%s", "Entering function " __FUNCTION__);
HWND historyDlg;
HWND parent = nullptr;
- historyDlg = WindowList_Find(hOpenWindowsList, (MCONTACT)wParam);
+ historyDlg = WindowList_Find(hOpenWindowsList, hContact);
if (historyDlg == nullptr){
- int count = g_plugin.getDword("EventsToLoad", 0);
- int loadInBackground = g_plugin.getByte("UseWorkerThread", 0);
- HistoryWindowData *data;
- data = (HistoryWindowData *)malloc(sizeof(HistoryWindowData));
- data->contact = (MCONTACT)wParam;
+ HistoryWindowData *data = (HistoryWindowData *)malloc(sizeof(HistoryWindowData));
+ data->contact = hContact;
data->hIEView = nullptr;
- data->itemsPerPage = count;
+ data->itemsPerPage = g_plugin.iLoadCount;
data->index = 0;
data->count = 0;
- data->loadMethod = (loadInBackground) ? LOAD_IN_BACKGROUND : 0;
+ data->loadMethod = (g_plugin.bUseWorker) ? LOAD_IN_BACKGROUND : 0;
historyDlg = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_HISTORY), parent, HistoryDlgProc);
SetWindowLongPtr(historyDlg, DWLP_USER, (LONG_PTR)data);
- WindowList_Add(hOpenWindowsList, historyDlg, (MCONTACT)wParam);
+ WindowList_Add(hOpenWindowsList, historyDlg, hContact);
}
- else
- SetForegroundWindow(historyDlg);
+ else SetForegroundWindow(historyDlg);
+
ShowWindow(historyDlg, SW_SHOWNORMAL);
return 0;
}