diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:42:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:42:33 +0000 |
commit | f9c9f7a27456f98ac84f27add1c2aea5bd99a35c (patch) | |
tree | dbe31bfa288511347da75aa03eff6d4b7af1206b /plugins/BasicHistory | |
parent | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (diff) |
more HCONTACT
git-svn-id: http://svn.miranda-ng.org/main/trunk@8079 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory')
-rw-r--r-- | plugins/BasicHistory/src/EventList.cpp | 12 | ||||
-rw-r--r-- | plugins/BasicHistory/src/EventList.h | 2 | ||||
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 38 | ||||
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.h | 6 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 10 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Scheduler.cpp | 4 | ||||
-rw-r--r-- | plugins/BasicHistory/src/SearchContext.h | 2 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Searcher.h | 2 |
8 files changed, 38 insertions, 38 deletions
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 044b32e3e5..e354353c89 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -237,7 +237,7 @@ void EventList::RefreshEventList() std::vector<IImport::ExternalMessage> messages;
EnterCriticalSection(&criticalSection);
- std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -307,7 +307,7 @@ bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInt std::vector<IImport::ExternalMessage> messages;
EnterCriticalSection(&criticalSection);
- std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -640,7 +640,7 @@ void EventList::RebuildGroup(int selected) }
CRITICAL_SECTION EventList::criticalSection;
-std::map<HANDLE, EventList::ImportDiscData> EventList::contactFileMap;
+std::map<HCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
std::wstring EventList::contactFileDir;
void EventList::AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file)
@@ -677,7 +677,7 @@ int EventList::GetContactMessageNumber(HCONTACT hContact) {
int count = db_event_count(hContact);
EnterCriticalSection(&criticalSection);
- std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
++count;
@@ -689,7 +689,7 @@ bool EventList::IsImportedHistory(HCONTACT hContact) {
bool count = false;
EnterCriticalSection(&criticalSection);
- std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
count = true;
@@ -700,7 +700,7 @@ bool EventList::IsImportedHistory(HCONTACT hContact) void EventList::DeleteImporter(HCONTACT hContact)
{
EnterCriticalSection(&criticalSection);
- std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
DeleteFile(it->second.file.c_str());
contactFileMap.erase(it);
diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index 6a3327760c..35d675e4d4 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -72,7 +72,7 @@ private: std::wstring file;
};
- static std::map<HANDLE, ImportDiscData> contactFileMap;
+ static std::map<HCONTACT, ImportDiscData> contactFileMap;
static std::wstring contactFileDir;
bool CanShowHistory(DBEVENTINFO* dbei);
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 766b8805d6..7d95ac81e7 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -112,23 +112,23 @@ HistoryWindow::~HistoryWindow() DeleteObject(bkFindBrush);
}
-std::map<HANDLE, HistoryWindow*> HistoryWindow::windows;
+std::map<HCONTACT, HistoryWindow*> HistoryWindow::windows;
std::vector<HistoryWindow*> HistoryWindow::freeWindows;
void HistoryWindow::Deinit()
{
bool destroyed = true;
- std::vector<HANDLE> keys;
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ std::vector<HCONTACT> keys;
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
keys.push_back(it->first);
}
}
- for (std::vector<HANDLE>::iterator it = keys.begin(); it != keys.end(); ++it)
+ for (std::vector<HCONTACT>::iterator it = keys.begin(); it != keys.end(); ++it)
{
- std::map<HANDLE, HistoryWindow*>::iterator it1 = windows.find(*it);
+ std::map<HCONTACT, HistoryWindow*>::iterator it1 = windows.find(*it);
if (it1 != windows.end())
{
DestroyWindow(it1->second->hWnd);
@@ -160,7 +160,7 @@ void HistoryWindow::Deinit() if (destroyed)
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
delete it->second;
}
@@ -186,7 +186,7 @@ void HistoryWindow::Open(HCONTACT hContact) }
else
{
- std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end())
{
it->second->Focus();
@@ -201,7 +201,7 @@ void HistoryWindow::Open(HCONTACT hContact) void HistoryWindow::Close(HCONTACT hContact)
{
- std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end())
{
if (it->second->isDestroyed)
@@ -223,7 +223,7 @@ void HistoryWindow::Close(HistoryWindow* historyWindow) DestroyWindow(historyWindow->hWnd);
return;
}
- std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
+ std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
if (it != windows.end() && it->second == historyWindow)
{
delete it->second;
@@ -247,7 +247,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact) {
if (hContact != NULL)
{
- std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end() && !it->second->isDestroyed)
{
SendMessage(it->second->hWnd,DM_HREBUILD,0,0);
@@ -265,7 +265,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact) void HistoryWindow::ChangeToFreeWindow(HistoryWindow* historyWindow)
{
- std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
+ std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
if (it != windows.end() && it->second == historyWindow)
{
windows.erase(it);
@@ -294,7 +294,7 @@ void HistoryWindow::Focus() int HistoryWindow::FontsChanged(WPARAM wParam, LPARAM lParam)
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -345,7 +345,7 @@ void OptionsGroupChanged() void HistoryWindow::OptionsGroupChanged()
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -371,7 +371,7 @@ void OptionsMainChanged() void HistoryWindow::OptionsMainChanged()
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -406,7 +406,7 @@ void OptionsSearchingChanged() void HistoryWindow::OptionsSearchingChanged()
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -435,7 +435,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) if (!count)
return FALSE;
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -495,7 +495,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) bool HistoryWindow::IsInList(HWND hWnd)
{
- for (std::map<HANDLE, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
if (!it->second->isDestroyed)
if (it->second->hWnd == hWnd)
return true;
@@ -1643,7 +1643,7 @@ void HistoryWindow::ReloadContacts() cii.cbSize = sizeof(cii);
cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS;
cii.pszText = TranslateT("System");
- hSystem = (HANDLE) SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
+ hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
}
}
else
@@ -2333,7 +2333,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder) return hContact;
}
-void HistoryWindow::SelectContact(HANDLE _hContact)
+void HistoryWindow::SelectContact(HCONTACT _hContact)
{
if (hContact != _hContact) {
HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h index 4bebe0e738..339866edf4 100644 --- a/plugins/BasicHistory/src/HistoryWindow.h +++ b/plugins/BasicHistory/src/HistoryWindow.h @@ -49,7 +49,7 @@ private: void ReloadMainOptions();
void DoImport(IImport::ImportType type);
- static std::map<HANDLE, HistoryWindow*> windows;
+ static std::map<HCONTACT, HistoryWindow*> windows;
static std::vector<HistoryWindow*> freeWindows;
bool isDestroyed;
LONG splitterY;
@@ -67,7 +67,7 @@ private: HIMAGELIST himlSmall, himlNone;
HBRUSH bkBrush;
HBRUSH bkFindBrush;
- HANDLE hSystem;
+ HCONTACT hSystem;
HWND splitterXhWnd, splitterYhWnd;
bool isStartSelect;
protected:
@@ -90,6 +90,6 @@ public: // SearchContext interface
virtual void SelectEventGroup(int sel);
virtual HCONTACT GetNextContact(HCONTACT hContact, int adder);
- virtual void SelectContact(HANDLE _hContact);
+ virtual void SelectContact(HCONTACT _hContact);
};
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index bd563ed046..f61be22121 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -1568,7 +1568,7 @@ void ResetListOptions(HWND hwnd) SendMessage(hwnd, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
-void RebuildList(HWND hwnd, HANDLE hSystem, TaskOptions* to)
+void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
{
HANDLE hItem;
if (to->isSystem && hSystem)
@@ -1581,11 +1581,11 @@ void RebuildList(HWND hwnd, HANDLE hSystem, TaskOptions* to) }
}
-void SaveList(HWND hwnd, HANDLE hSystem, TaskOptions* to)
+void SaveList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
{
to->contacts.clear();
if (hSystem)
- to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hSystem, 0) != 0;
+ to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hSystem, 0) != 0;
for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendMessage(hwnd, CLM_FINDCONTACT, (WPARAM) hContact, 0);
@@ -1602,7 +1602,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top = NULL, std::wstri INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static HANDLE hSystem;
+ static HCONTACT hSystem;
switch(msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1738,7 +1738,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, cii.cbSize = sizeof(cii);
cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS;
cii.pszText = TranslateT("System");
- hSystem = (HANDLE) SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
+ hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
SendMessage(contactList, CLM_AUTOREBUILD, 0, 0);
ResetListOptions(contactList);
RebuildList(contactList, hSystem, to);
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 9f52474d35..dcd9dd5593 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -410,8 +410,8 @@ bool DoTask(TaskOptions& to) }
if (contactList.size() > 0) {
- HANDLE* contacts = new HANDLE[contactList.size() + 1];
- contacts[0] = (HANDLE)contactList.size();
+ HCONTACT *contacts = new HCONTACT[contactList.size() + 1];
+ contacts[0] = (HCONTACT)contactList.size();
int i = 1;
for (std::list<HCONTACT>::iterator it = contactList.begin(); it != contactList.end(); ++it)
contacts[i++] = *it;
diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h index dd16d95d79..4c9e6f04dc 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -30,7 +30,7 @@ public: virtual void SelectEventGroup(int sel) = 0;
virtual HCONTACT GetNextContact(HCONTACT hContact, int adder) = 0;
- virtual void SelectContact(HANDLE _hContact) = 0;
+ virtual void SelectContact(HCONTACT _hContact) = 0;
struct MessageData
{
diff --git a/plugins/BasicHistory/src/Searcher.h b/plugins/BasicHistory/src/Searcher.h index 274f738082..e8ce263f11 100644 --- a/plugins/BasicHistory/src/Searcher.h +++ b/plugins/BasicHistory/src/Searcher.h @@ -26,7 +26,7 @@ private: int lastFindSelection;
int startFindPos;
int startFindSel;
- HANDLE startFindContact;
+ HCONTACT startFindContact;
bool isFindSelChanged;
bool isFindContactChanged;
bool findBack, matchCase, matchWholeWords, onlyIn, onlyOut, onlyGroup, allUsers, searchForInLG, searchForInMes;
|