diff options
Diffstat (limited to 'plugins/WhenWasIt/src')
| -rw-r--r-- | plugins/WhenWasIt/src/dlg_handlers.cpp | 8 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/notifiers.cpp | 15 | 
2 files changed, 10 insertions, 13 deletions
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index dfbd581dd5..a38258c5c8 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -757,7 +757,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa  			for (i = 0; (i < count) && (!found); i++) {
  				item.iItem = i;
  				ListView_GetItem(hList, &item);
 -				if (hContact == (HANDLE) item.lParam) {
 +				if (hContact == (HCONTACT)item.lParam) {
  					UpdateBirthdayEntry(hList, hContact, i, IsDlgButtonChecked(hWnd, IDC_SHOW_ALL), commonData.cShowAgeMode, 0); 
  					found = 1;
  				}
 @@ -939,8 +939,8 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar  DWORD WINAPI OpenMessageWindowThread(void *data)
  {
  	HCONTACT hContact = (HCONTACT)data;
 -	CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM) hContact, 0);
 -	CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM) hContact, 0);
 +	CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
 +	CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM)hContact, 0);
  	return 0;
  }
 @@ -952,7 +952,7 @@ int HandlePopupClick(HWND hWnd, int action)  			HCONTACT hContact = (HCONTACT)PUGetContact(hWnd);
  			if (hContact) {
  				DWORD threadID;
 -				HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, hContact, 0, &threadID);
 +				HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, (void*)hContact, 0, &threadID);
  			}
  		}//fallthrough
 diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index b759b405df..267b6bd8d7 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -70,14 +70,11 @@ int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age)  	const int MAX_SIZE = 1024;
  	TCHAR text[MAX_SIZE];
  	//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
 -	if (commonData.bIgnoreSubcontacts)
 -		{
 -			HANDLE hMetacontact = (HANDLE) CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
 -			if ((hMetacontact) && (hMetacontact != hContact)) //not main metacontact
 -				{
 -					return 0;
 -				}
 -		}
 +	if (commonData.bIgnoreSubcontacts) {
 +		HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
 +		if ((hMetacontact) && (hMetacontact != hContact)) //not main metacontact
 +			return 0;
 +	}
  	BuildDTBText(dtb, name, text, MAX_SIZE);
  	int gender = GetContactGender(hContact);
 @@ -118,7 +115,7 @@ int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age)  	TCHAR text[MAX_SIZE];
  	//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
  	if (commonData.bIgnoreSubcontacts) {
 -		HANDLE hMetacontact = (HANDLE) CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
 +		HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
  		if (hMetacontact && hMetacontact != hContact) //not main metacontact
  			return 0;
  	}
  | 
