summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_popup.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/Weather/src/weather_popup.cpp
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_popup.cpp')
-rw-r--r--plugins/Weather/src/weather_popup.cpp33
1 files changed, 12 insertions, 21 deletions
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index d8396532fd..27152b0d9b 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -36,26 +36,17 @@ int WeatherPopup(WPARAM wParam, LPARAM lParam)
{
// determine if the popup should display or not
if (opt.UsePopup && opt.UpdatePopup && (!opt.PopupOnChange || (BOOL)lParam) &&
- !db_get_b((HANDLE)wParam, WEATHERPROTONAME, "DPopUp", 0))
+ !db_get_b((HCONTACT)wParam, WEATHERPROTONAME, "DPopUp", 0))
{
- POPUPDATAT ppd = {0};
- WEATHERINFO winfo;
-
- // setup the popup
- ppd.lchContact = (HANDLE)wParam;
-// if ((HANDLE)wParam != NULL) { // for actual contact
- winfo = LoadWeatherInfo((HANDLE)wParam);
- ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
- GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
- GetDisplay(&winfo, opt.pText, ppd.lptzText);
- ppd.PluginWindowProc = PopupDlgProc;
-// }
-// else { // for preview
-// ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, ONLINE);
-// strcpy(ppd.lpzContactName, Translate("This is the name of the city"));
-// strcpy(ppd.lpzText, Translate("Here is a short weather description"));
-// ppd.PluginWindowProc = NULL;
-// }
+ WEATHERINFO winfo = LoadWeatherInfo((HCONTACT)wParam);
+
+ // setup the popup
+ POPUPDATAT ppd = { 0 };
+ ppd.lchContact = (HCONTACT)wParam;
+ ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
+ GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
+ GetDisplay(&winfo, opt.pText, ppd.lptzText);
+ ppd.PluginWindowProc = PopupDlgProc;
ppd.colorBack = (opt.UseWinColors)?GetSysColor(COLOR_BTNFACE):opt.BGColour;
ppd.colorText = (opt.UseWinColors)?GetSysColor(COLOR_WINDOWTEXT):opt.TextColour;
ppd.iSeconds = opt.pDelay;
@@ -129,7 +120,7 @@ int WPShowMessage(TCHAR* lpzText, WORD kind)
LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
DWORD ID = 0;
- HANDLE hContact;
+ HCONTACT hContact;
hContact = PUGetContact(hWnd);
switch(message) {
@@ -257,7 +248,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
HMENU hMenu, hMenu1;
RECT pos;
HWND button;
- HANDLE hContact;
+ HCONTACT hContact;
switch (msg) {
case WM_INITDIALOG: