diff options
Diffstat (limited to 'plugins/Weather/src/weather_mwin.cpp')
-rw-r--r-- | plugins/Weather/src/weather_mwin.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 7f70b659d0..c127214999 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -384,25 +384,19 @@ void InitMwin(void) FontRegisterT(&fontid);
}
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- // see if the contact is a weather contact
- if (IsMyContact(hContact)) {
- if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
- addWindow(hContact);
- }
- }
+ for (HANDLE hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
+ if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
+ addWindow(hContact);
+
hFontHook = HookEvent(ME_FONT_RELOAD, RedrawFrame);
}
void DestroyMwin(void)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- // see if the contact is a weather contact
- if (IsMyContact(hContact)) {
- DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
- if (frameId)
- CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
- }
+ for (HANDLE hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
+ DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
+ if (frameId)
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
}
UnregisterClass( _T("WeatherFrame"), hInst);
UnhookEvent(hFontHook);
|