diff options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/clistevents.cpp | 13 | ||||
-rw-r--r-- | src/mir_app/src/clistsettings.cpp | 7 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp index 6f606155ca..b4b881628e 100644 --- a/src/mir_app/src/clistevents.cpp +++ b/src/mir_app/src/clistevents.cpp @@ -325,17 +325,6 @@ int fnEventsProcessTrayDoubleClick(int index) return 0;
}
-static int RemoveEventsForContact(WPARAM wParam, LPARAM)
-{
- for (int i = g_cliEvents.getCount()-1; i >= 0; i--) {
- CListEvent &e = g_cliEvents[i];
- if (e.hContact == wParam)
- cli.pfnRemoveEvent(wParam, e.hDbEvent);
- }
-
- return 0;
-}
-
static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
@@ -356,7 +345,7 @@ int InitCListEvents(void) disableTrayFlash = db_get_b(0, "CList", "DisableTrayFlash", 0);
disableIconFlash = db_get_b(0, "CList", "NoIconBlink", 0);
- HookEvent(ME_DB_CONTACT_DELETED, RemoveEventsForContact);
+
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, CListEventSettingsChanged);
return 0;
}
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index fd511562d9..6d5239f601 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -143,6 +143,13 @@ int ContactDeleted(WPARAM hContact, LPARAM) mir_free(clistCache[idx]);
clistCache.remove(idx);
}
+
+ // remove events for a contact
+ for (int i = g_cliEvents.getCount() - 1; i >= 0; i--) {
+ CListEvent &e = g_cliEvents[i];
+ if (e.hContact == hContact)
+ cli.pfnRemoveEvent(hContact, e.hDbEvent);
+ }
return 0;
}
|