summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags/src/extraimg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 14:55:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 14:55:06 +0300
commit1e49d6b2cb3812d8e80051cbb3d44891e6532825 (patch)
tree2ffb8e36641e063d625faece1d380f4ce833d1a6 /plugins/CountryFlags/src/extraimg.cpp
parenteccbb5307a048e70ac4adb0d3fd333be28245fa8 (diff)
funny, but without cbSize we have no need in MessageWindowInputData at all
Diffstat (limited to 'plugins/CountryFlags/src/extraimg.cpp')
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index 0683405bb6..9cf69d9fed 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -135,20 +135,18 @@ static int MsgWndEvent(WPARAM, LPARAM lParam)
void CALLBACK UpdateStatusIcons(LPARAM)
{
- MessageWindowInputData msgwi = { sizeof(msgwi) };
- msgwi.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
- msgwi.hContact = db_find_first();
- while (msgwi.hContact != NULL) {
+ MCONTACT hContact = db_find_first();
+ while (hContact != NULL) {
/* is a message window opened for this contact? */
MessageWindowData msgw; /* output */
- if (!CallService(MS_MSG_GETWINDOWDATA,(WPARAM)&msgwi,(LPARAM)&msgw) && msgw.uState & MSG_WINDOW_STATE_EXISTS) {
+ if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&msgw) && msgw.uState & MSG_WINDOW_STATE_EXISTS) {
if (bShowStatusIcon) {
- int countryNumber = ServiceDetectContactOriginCountry((WPARAM)msgwi.hContact, 0);
- SetStatusIcon(msgwi.hContact, countryNumber);
+ int countryNumber = ServiceDetectContactOriginCountry(hContact, 0);
+ SetStatusIcon(hContact, countryNumber);
}
- else UnsetStatusIcon(msgwi.hContact);
+ else UnsetStatusIcon(hContact);
}
- msgwi.hContact = db_find_next(msgw.hContact);
+ hContact = db_find_next(hContact);
}
}