diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 | 
| commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
| tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/RecentContacts | |
| parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) | |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/RecentContacts')
| -rw-r--r-- | plugins/RecentContacts/src/RecentContacts.cpp | 15 | ||||
| -rw-r--r-- | plugins/RecentContacts/src/RecentContacts.h | 6 | 
2 files changed, 10 insertions, 11 deletions
| diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index d1d129039f..335e4baf56 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -130,7 +130,7 @@ BOOL ShowListMainDlgProc_OpenContactMenu(HWND hDlg, HWND hList, int item, LASTUC  			if (hCMenu != NULL) {
  				POINT p;
  				GetCursorPos(&p);
 -				DlgDat->hContact = (HANDLE) lvi.lParam;
 +				DlgDat->hContact = (HCONTACT) lvi.lParam;
  				BOOL ret = TrackPopupMenu(hCMenu, 0, p.x, p.y, 0, hDlg, NULL);
  				DestroyMenu(hCMenu);
  				if (ret)
 @@ -242,7 +242,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM  					if (LastUCOpt.HideOffline == 1) {
  						szProto = GetContactProto(curContact->second);
 -						if (szProto != NULL && db_get_w((HANDLE)curContact->second, szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
 +						if (szProto != NULL && db_get_w(curContact->second, szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
  							continue;
  					}
 @@ -379,9 +379,8 @@ INT_PTR OnMenuCommandShowList(WPARAM wParam, LPARAM lParam)  	BYTE buf[1];
  	dbe.pBlob = buf;
  	HANDLE curEvent;
 -	HANDLE curContact = db_find_first();
 -	for (; curContact != NULL; curContact = db_find_next(curContact))
 -	{
 +	
 +	for (HCONTACT curContact = db_find_first(); curContact != NULL; curContact = db_find_next(curContact)) {
  		curTime = ((__time64_t)db_get_dw(curContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeLo, -1)) |
  					(((__time64_t)db_get_dw(curContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeHi, -1)) << 32);
 @@ -455,7 +454,7 @@ int Create_MenuitemShowList(void)  	return 0;
  }
 -BOOL SaveLastUsedTimeStamp(HANDLE hContact)
 +BOOL SaveLastUsedTimeStamp(HCONTACT hContact)
  {
  	__time64_t ct = _time64(NULL);
  	db_set_dw(hContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeLo, (DWORD)ct);
 @@ -485,7 +484,7 @@ static int OnPrebuildContactMenu (WPARAM wParam, LPARAM lParam)  	CLISTMENUITEM clmi = { sizeof(clmi) };
  	clmi.flags = CMIM_NAME | CMIF_TCHAR;
 -	if ( db_get_b((HANDLE)wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
 +	if ( db_get_b((HCONTACT)wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
  		clmi.ptszName = TranslateT("Ignore Contact");
  	else
  		clmi.ptszName = TranslateT("Show Contact");
 @@ -516,7 +515,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)  INT_PTR ToggleIgnore (WPARAM wParam, LPARAM lParam)
  {
  	if (wParam != NULL) {
 -		HANDLE hContact = ( HANDLE )wParam;
 +		HCONTACT hContact = (HCONTACT)wParam;
  		int state = db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0 ? 1 : 0 ;
  		db_set_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, state);
  		return state;
 diff --git a/plugins/RecentContacts/src/RecentContacts.h b/plugins/RecentContacts/src/RecentContacts.h index 246bc9d8b0..474fce2d97 100644 --- a/plugins/RecentContacts/src/RecentContacts.h +++ b/plugins/RecentContacts/src/RecentContacts.h @@ -71,13 +71,13 @@ struct TABSRMM_SessionInfo {  };
 -typedef std::multimap <__time64_t, HANDLE, std::greater<__time64_t> > cmultimap;
 -typedef std::pair <__time64_t, HANDLE> cpair;
 +typedef std::multimap <__time64_t, HCONTACT, std::greater<__time64_t> > cmultimap;
 +typedef std::pair <__time64_t, HCONTACT> cpair;
  typedef struct LASTUC_DLG_DATA
  {
  	cmultimap *Contacts;
  	SIZE WindowMinSize;
  	RECT ListUCRect;
 -	HANDLE hContact;
 +	HCONTACT hContact;
  } LASTUC_DLG_DATA;
\ No newline at end of file | 
