diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-25 16:17:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-25 16:17:46 +0000 |
commit | 1914d6f60f4ad92c0efa45a6559a51421bfcaf1e (patch) | |
tree | 3fda8e3ec1de79e6442753aa40645cd98f44dbb1 /plugins/YAPP/src/yapp.cpp | |
parent | 6c5f57abce943f3838d2eb002c3646df1da939df (diff) |
fix for popups that use icons controlled by icolib
git-svn-id: http://svn.miranda-ng.org/main/trunk@2490 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP/src/yapp.cpp')
-rw-r--r-- | plugins/YAPP/src/yapp.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index 340d223313..985d2b6287 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -148,8 +148,6 @@ static void InitFonts() ReloadFont(0, 0);
}
-HANDLE hEventReloadFont = 0;
-
int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
MNotifyGetLink();
@@ -157,7 +155,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (ServiceExists(MS_HPP_EG_WINDOW))
lstPopupHistory.SetRenderer(RENDER_HISTORYPP);
- hEventReloadFont = HookEvent(ME_FONT_RELOAD, ReloadFont);
+ HookEvent(ME_FONT_RELOAD, ReloadFont);
LoadModuleDependentOptions();
@@ -167,14 +165,13 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) return 0;
}
-int PreShutdown(WPARAM wParam, LPARAM lParam) {
+int PreShutdown(WPARAM wParam, LPARAM lParam)
+{
DeinitMessagePump();
DeinitNotify();
return 0;
}
-HANDLE hEventPreShutdown, hEventModulesLoaded;
-
extern "C" int YAPP_API Load(void) {
mir_getLP(&pluginInfo);
@@ -184,32 +181,13 @@ extern "C" int YAPP_API Load(void) { InitNotify();
InitFonts();
- hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
- hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
-
- /*
- // test popup classes
- PopupClass test = {0};
- test.cbSize = sizeof(test);
- test.flags = PCF_TCHAR;
- test.hIcon = LoadIcon(0, IDI_WARNING);
- test.colorBack = RGB(0, 0, 0);
- test.colorText = RGB(255, 255, 255);
- test.iSeconds = 10;
- test.ptszDescription = TranslateT("Test popup class");
- test.pszName = "popup/testclass";
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test);
- */
-
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
return 0;
}
extern "C" int YAPP_API Unload()
{
- if (hEventReloadFont)
- UnhookEvent(hEventReloadFont);
- UnhookEvent(hEventPreShutdown);
- UnhookEvent(hEventModulesLoaded);
DeinitNotify();
DeleteObject(hFontFirstLine);
DeleteObject(hFontSecondLine);
|