summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather_contacts.cpp22
-rw-r--r--plugins/Weather/src/weather_conv.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp6
-rw-r--r--plugins/Weather/src/weather_popup.cpp6
-rw-r--r--plugins/Weather/src/weather_update.cpp10
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp12
6 files changed, 29 insertions, 29 deletions
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index f52f5d13eb..8ced00bf78 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam)
{
// see if the log path is set
DBVARIANT dbv;
- if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ts(wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW);
db_free(&dbv);
@@ -59,10 +59,10 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam)
INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam)
{
TCHAR id[256], loc2[256];
- GetStationID((MCONTACT)wParam, id, SIZEOF(id));
+ GetStationID(wParam, id, SIZEOF(id));
if (id[0] != 0) {
// check if the complte forecast URL is set. If it is not, display warning and quit
- if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
+ if (DBGetStaticString(wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
MessageBox(NULL, TranslateT("The URL for complete forcast have not been set. You can set it from the Edit Settings dialog."),
TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
@@ -78,10 +78,10 @@ INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam)
INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam)
{
TCHAR id[256], loc2[256];
- GetStationID((MCONTACT)wParam, id, SIZEOF(id));
+ GetStationID(wParam, id, SIZEOF(id));
if (id[0] != 0) {
// check if the weather map URL is set. If it is not, display warning and quit
- if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
+ if (DBGetStaticString(wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
MessageBox(NULL, TranslateT("The URL for weather map have not been set. You can set it from the Edit Settings dialog."), TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
}
@@ -99,7 +99,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam)
// wParam = current contact
INT_PTR EditSettings(WPARAM wParam, LPARAM lParam)
{
- HWND hEditDlg = WindowList_Find(hWindowList, (MCONTACT)wParam);
+ HWND hEditDlg = WindowList_Find(hWindowList, wParam);
// search the dialog list to prevent multiple instance of dialog for the same contact
if (hEditDlg != NULL) {
@@ -109,7 +109,7 @@ INT_PTR EditSettings(WPARAM wParam, LPARAM lParam)
}
else {
// if the dialog box is not opened, open a new one
- if (IsMyContact((MCONTACT)wParam))
+ if (IsMyContact(wParam))
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EDIT), NULL, DlgProcChange, (LPARAM)wParam);
}
@@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
TranslateDialogDefault(hwndDlg);
wndData = ( CntSetWndDataType* )mir_alloc(sizeof(CntSetWndDataType));
- wndData->hContact = hContact = (MCONTACT)lParam;
+ wndData->hContact = hContact = lParam;
wndData->hRename = LoadSkinnedIcon(SKINICON_OTHER_RENAME);
wndData->hUserDetail = LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS);
wndData->hFile = LoadSkinnedIcon(SKINICON_EVENT_FILE);
@@ -430,14 +430,14 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
// wParam = deleted contact
int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
- if (!IsMyContact((MCONTACT)wParam))
+ if (!IsMyContact(wParam))
return 0;
- removeWindow((MCONTACT)wParam);
+ removeWindow(wParam);
// exit this function if it is not default station
DBVARIANT dbv;
- if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ts(wParam, WEATHERPROTONAME, "ID", &dbv)) {
if ( _tcscmp(dbv.ptszVal, opt.Default)) {
db_free(&dbv);
return 0;
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp
index 129c36eb2b..c375c9d95f 100644
--- a/plugins/Weather/src/weather_conv.cpp
+++ b/plugins/Weather/src/weather_conv.cpp
@@ -572,7 +572,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str)
TCHAR svcReturnText[MAX_TEXT_SIZE];
INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam)
{
- WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam);
+ WEATHERINFO winfo = LoadWeatherInfo(wParam);
return (INT_PTR)GetDisplay(&winfo, (TCHAR*)lParam, svcReturnText);
}
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 75f32395be..d63114cfe0 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -294,11 +294,11 @@ void UpdateMwinData(MCONTACT hContact)
INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam)
{
- BOOL addwnd = WindowList_Find(hMwinWindowList, (MCONTACT)wParam) == NULL;
+ BOOL addwnd = WindowList_Find(hMwinWindowList, wParam) == NULL;
if (addwnd)
- addWindow((MCONTACT)wParam);
+ addWindow(wParam);
else
- removeWindow((MCONTACT)wParam);
+ removeWindow(wParam);
return 0;
}
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index d1477eee2e..58b2ac4da9 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -36,13 +36,13 @@ 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((MCONTACT)wParam, WEATHERPROTONAME, "DPopUp", 0))
+ !db_get_b(wParam, WEATHERPROTONAME, "DPopUp", 0))
{
- WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam);
+ WEATHERINFO winfo = LoadWeatherInfo(wParam);
// setup the popup
POPUPDATAT ppd = { 0 };
- ppd.lchContact = (MCONTACT)wParam;
+ ppd.lchContact = wParam;
ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
GetDisplay(&winfo, opt.pText, ppd.lptzText);
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index 3736b1a87f..40a383b735 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -300,9 +300,9 @@ void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
// wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((MCONTACT)wParam)) {
+ if (IsMyContact(wParam)) {
// add the station to the end of the update queue
- UpdateListAdd((MCONTACT)wParam);
+ UpdateListAdd(wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get
@@ -318,10 +318,10 @@ INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
// wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((MCONTACT)wParam)) {
+ if (IsMyContact(wParam)) {
// add the station to the end of the update queue, and also remove old data
- DBDataManage((MCONTACT)wParam, WDBM_REMOVE, 0, 0);
- UpdateListAdd((MCONTACT)wParam);
+ DBDataManage(wParam, WDBM_REMOVE, 0, 0);
+ UpdateListAdd(wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get updated by the already-running process
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index d6e3f1b64e..3817599b3a 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -46,7 +46,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam)
}
else {
// check if it is a weather contact
- if (IsMyContact((MCONTACT)lParam)) {
+ if (IsMyContact(lParam)) {
// register the contact info page
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.pfnDlgProc = DlgProcUIPage;
@@ -70,10 +70,10 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
TranslateDialogDefault(hwndDlg);
SendMessage(GetDlgItem(hwndDlg,IDC_MOREDETAIL), BUTTONSETASFLATBTN, TRUE, 0);
// save the contact handle for later use
- hContact = (MCONTACT)lParam;
+ hContact = lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
// load weather info for the contact
- w = LoadWeatherInfo((MCONTACT)lParam);
+ w = LoadWeatherInfo(lParam);
SetDlgItemText(hwndDlg, IDC_INFO1, GetDisplay(&w, TranslateT("Current condition for %n"), str));
SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON,
@@ -163,7 +163,7 @@ INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
switch (msg) {
case WM_INITDIALOG:
// save the contact handle for later use
- hContact = (MCONTACT)lParam;
+ hContact = lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
SendDlgItemMessage(hwndDlg, IDC_MTEXT, EM_AUTOURLDETECT, (WPARAM) TRUE, 0);
@@ -354,8 +354,8 @@ void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact)
int BriefInfo(WPARAM wParam, LPARAM lParam)
{
// make sure that the contact is actually a weather one
- if (IsMyContact((MCONTACT)wParam)) {
- HWND hMoreDataDlg = WindowList_Find(hDataWindowList, (MCONTACT)wParam);
+ if (IsMyContact(wParam)) {
+ HWND hMoreDataDlg = WindowList_Find(hDataWindowList, wParam);
if (hMoreDataDlg != NULL) {
SetForegroundWindow(hMoreDataDlg);
SetFocus(hMoreDataDlg);