summaryrefslogtreecommitdiff
path: root/src/modules/fonts
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-04 19:11:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-04 19:11:17 +0000
commitd7f143dba9e53347a1d7897bcd3989751c7f45f8 (patch)
treebb464bed05487cb48d2221dee5840d943fa0b8d1 /src/modules/fonts
parent3f918fb53343d815ba8736735d1c0beea2359b15 (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/fonts')
-rw-r--r--src/modules/fonts/services.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp
index 3774cafe9f..f4804c839a 100644
--- a/src/modules/fonts/services.cpp
+++ b/src/modules/fonts/services.cpp
@@ -369,6 +369,15 @@ INT_PTR GetFont(WPARAM wParam, LPARAM lParam)
}
/////////////////////////////////////////////////////////////////////////////////////////
+
+void KillModuleFonts(int hLangpack)
+{
+ for (int i=font_id_list.getCount()-1; i >= 0; i--)
+ if ( font_id_list[i].hLangpack == hLangpack)
+ font_id_list.remove(i);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// RegisterColour service
void UpdateColourSettings(ColourIDW* colour_id, COLORREF *colour)
@@ -434,6 +443,15 @@ INT_PTR GetColour(WPARAM wParam, LPARAM)
return sttGetColourWorker(&temp);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+void KillModuleColours(int hLangpack)
+{
+ for (int i=colour_id_list.getCount()-1; i >= 0; i--)
+ if (colour_id_list[i].hLangpack == hLangpack)
+ colour_id_list.remove(i);
+}
+
//////////////////////////////////////////////////////////////////////////
// Effects
@@ -451,7 +469,7 @@ void UpdateEffectSettings(EffectIDW* effect_id, FONTEFFECT* effectsettings)
}
/////////////////////////////////////////////////////////////////////////////////////////
-// RegisterFont service
+// RegisterEffect service
static INT_PTR sttRegisterEffectWorker(EffectIDW* effect_id, int hLangpack)
{
@@ -516,3 +534,12 @@ INT_PTR GetEffect(WPARAM wParam, LPARAM lParam)
if ( !ConvertEffectID((EffectID*)wParam, &temp)) return -1;
return sttGetEffectWorker(&temp, (FONTEFFECT*)lParam);
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+void KillModuleEffects(int hLangpack)
+{
+ for (int i=effect_id_list.getCount()-1; i >= 0; i--)
+ if (effect_id_list[i].hLangpack == hLangpack)
+ effect_id_list.remove(i);
+}