summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather/src/weather.cpp')
-rw-r--r--plugins/Weather/src/weather.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index f93dded751..58b6f60f74 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -133,12 +133,7 @@ int WeatherInit(WPARAM wParam,LPARAM lParam)
// weather user detail
HookEvent(ME_USERINFO_INITIALISE, UserInfoInit);
-
HookEvent(ME_TTB_MODULELOADED, OnToolbarLoaded);
-
- hDataWindowList = WindowList_Create();
- hWindowList = WindowList_Create();
-
return 0;
}
@@ -213,13 +208,16 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_SYSTEM_PRESHUTDOWN, WeatherShutdown);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);
+ hDataWindowList = WindowList_Create();
+ hWindowList = WindowList_Create();
+
hUpdateMutex = CreateMutex(NULL, FALSE, NULL);
// register weather protocol
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = WEATHERPROTONAME;
pd.type = (opt.NoProtoCondition) ? PROTOTYPE_VIRTUAL : PROTOTYPE_PROTOCOL;
- CallService(MS_PROTO_REGISTERMODULE,0, (LPARAM)&pd);
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
// initialize weather protocol services
InitServices();
@@ -230,10 +228,9 @@ extern "C" int __declspec(dllexport) Load(void)
// window needed for popup commands
TCHAR SvcFunc[100];
- mir_sntprintf( SvcFunc, SIZEOF(SvcFunc), _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
- hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW,_T("static"),SvcFunc,0,CW_USEDEFAULT,CW_USEDEFAULT,
- CW_USEDEFAULT,CW_USEDEFAULT,HWND_DESKTOP,NULL, hInst,NULL);
+ mir_sntprintf(SvcFunc, SIZEOF(SvcFunc), _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
+ hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
-
return 0;
}