diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-08 13:17:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-08 13:17:00 +0300 |
commit | 7050d6be747e47fc63f5ebd205e8edb2cf9fbf1f (patch) | |
tree | a7ca8f9a18c2802fde3faaa76b186e08887ee511 /src/mir_app | |
parent | caff89011ee731657192dc076b6a1ea54fcee520 (diff) |
unused hook deleted
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;
}
|