diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-04 19:11:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-04 19:11:17 +0000 |
commit | d7f143dba9e53347a1d7897bcd3989751c7f45f8 (patch) | |
tree | bb464bed05487cb48d2221dee5840d943fa0b8d1 /src/modules/skin | |
parent | 3f918fb53343d815ba8736735d1c0beea2359b15 (diff) |
wiping objects during dynamic plugin unload
git-svn-id: http://svn.miranda-ng.org/main/trunk@762 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r-- | src/modules/skin/hotkeys.cpp | 11 | ||||
-rw-r--r-- | src/modules/skin/sounds.cpp | 15 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp index a36dd152d1..bf939d5716 100644 --- a/src/modules/skin/hotkeys.cpp +++ b/src/modules/skin/hotkeys.cpp @@ -300,6 +300,17 @@ void RegisterHotkeys() if (vk) RegisterHotKey(g_hwndHotkeyHost, item->idHotkey, mod, vk);
} } }
+void KillModuleHotkeys(int hLangpack)
+{
+ for (int i=hotkeys.getCount()-1; i >= 0; i--) {
+ THotkeyItem *item = hotkeys[i];
+ if (item->hLangpack == hLangpack) {
+ FreeHotkey(item);
+ hotkeys.remove(i);
+ }
+ }
+}
+
void UnregisterHotkeys()
{
for (int i = 0; i < hotkeys.getCount(); i++) {
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index 24b4e44476..05422ffef6 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -49,6 +49,21 @@ static int CompareSounds(const SoundItem* p1, const SoundItem* p2) static OBJLIST<SoundItem> arSounds(10, CompareSounds);
+///////////////////////////////////////////////////////////////////////////////
+
+void KillModuleSounds(int hLangpack)
+{
+ for (int i=arSounds.getCount()-1; i >= 0; i--) {
+ SoundItem& p = arSounds[i];
+ if (p.hLangpack == hLangpack) {
+ p.clear();
+ arSounds.remove(i);
+ }
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
static BOOL bModuleInitialized = FALSE;
static HANDLE hPlayEvent = NULL;
|