diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-10 22:07:11 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-10 22:07:11 +0000 |
commit | aa5ad4e9e5f881747ab2fae38b0da05560085f13 (patch) | |
tree | 864b542d6627b2ce07f00ad666982085ebe3b7ca /plugins/TrafficCounter | |
parent | d2528d31bac20ff2f7f41355cd398d929d83136a (diff) |
x64 warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@2716 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TrafficCounter')
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.c | 31 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.h | 2 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/statistics.c | 2 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/statistics.h | 2 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/vars.h | 2 |
6 files changed, 19 insertions, 22 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.c b/plugins/TrafficCounter/src/TrafficCounter.c index 0a4b7b48a3..aab91d91b4 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.c +++ b/plugins/TrafficCounter/src/TrafficCounter.c @@ -323,7 +323,7 @@ int TrafficCounterModulesLoaded(WPARAM wParam,LPARAM lParam) return 0;
}
-static BOOL CALLBACK DlgProcPopupsTraffic(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcPopupsTraffic(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
@@ -418,7 +418,7 @@ static BOOL CALLBACK DlgProcPopupsTraffic(HWND hwndDlg, UINT msg, WPARAM wParam, return 0;
}
-static BOOL CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
WORD i, j, l;
BOOL result;
@@ -1223,8 +1223,7 @@ LRESULT CALLBACK TrafficCounterWndProc_MW(HWND hwnd, UINT msg, WPARAM wParam, LP CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE, (WPARAM)TrafficHwnd, 0);
else
{
- HDC hdc;
- hdc = GetDC(hwnd);
+ HDC hdc = GetDC(hwnd);
PaintTrafficCounterWindow(hwnd, hdc);
ReleaseDC(hwnd, hdc);
}
@@ -1491,7 +1490,7 @@ void CreateTrafficWindow(HWND hCluiWnd) UpdateNotifyTimer();
}
-int MenuCommand_TrafficShowHide(WPARAM wParam,LPARAM lParam)
+INT_PTR MenuCommand_TrafficShowHide(WPARAM wParam,LPARAM lParam)
{
unOptions.FrameIsVisible = !unOptions.FrameIsVisible;
if (Traffic_FrameID == NULL)
@@ -1509,7 +1508,7 @@ void Traffic_AddMainMenuItem(void) mi.position = -0x7FFFFFFF;
mi.flags = 0;
mi.hIcon = NULL;
- mi.pszName = Translate("Toggle traffic counter");
+ mi.pszName = LPGEN("Toggle traffic counter");
mi.pszService="TrafficCounter/ShowHide";
hTrafficMainMenuItem = Menu_AddMainMenuItem(&mi);
@@ -1533,17 +1532,16 @@ void NotifyOnSend(void) ZeroMemory(&ppd, sizeof(ppd));
ppd.lchContact = NULL;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- _tcscpy(ppd.lptzContactName, TranslateT("Traffic counter notification"));
+ _tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
//
- _stprintf(ppd.lptzText, TranslateT("%d kilobytes sent"),
+ mir_sntprintf(ppd.lptzText, MAX_SECONDLINE, TranslateT("%d kilobytes sent"),
notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
//
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
- if (Traffic_PopupTimeoutDefault) ppd.iSeconds = 0;
- else ppd.iSeconds = Traffic_PopupTimeoutValue;
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0);
+ ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue);
+ PUAddPopUpT(&ppd);
}
void NotifyOnRecv(void)
@@ -1553,17 +1551,16 @@ void NotifyOnRecv(void) ZeroMemory(&ppd, sizeof(ppd));
ppd.lchContact = NULL;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- _tcscpy(ppd.lptzContactName, TranslateT("Traffic counter notification"));
+ _tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"),MAX_CONTACTNAME);
//
- _stprintf(ppd.lptzText,TranslateT("%d kilobytes received"),
+ mir_sntprintf(ppd.lptzText, MAX_SECONDLINE, TranslateT("%d kilobytes received"),
notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
//
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
- if (Traffic_PopupTimeoutDefault) ppd.iSeconds = 0;
- else ppd.iSeconds = Traffic_PopupTimeoutValue;
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0);
+ ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue);
+ PUAddPopUpT(&ppd);
}
void CreateProtocolList(void)
@@ -1571,7 +1568,7 @@ void CreateProtocolList(void) int i;
PROTOACCOUNT **acc;
//
- CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)(int*)&NumberOfAccounts, (LPARAM)(PROTOACCOUNT***)&acc);
+ ProtoEnumAccounts(&NumberOfAccounts,&acc);
//
ProtoList = (PROTOLIST*)mir_alloc(sizeof(PROTOLIST)*(NumberOfAccounts));
//
diff --git a/plugins/TrafficCounter/src/TrafficCounter.h b/plugins/TrafficCounter/src/TrafficCounter.h index 2ce9267e84..2ea798661c 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.h +++ b/plugins/TrafficCounter/src/TrafficCounter.h @@ -80,6 +80,6 @@ unsigned short int TrafficWindowHeight(void); int TrafficCounter_Draw(HWND, HDC);
int PaintTrafficCounterWindow(HWND, HDC);
// Вспомогательные функции
-int MenuCommand_TrafficShowHide(WPARAM, LPARAM);
+INT_PTR MenuCommand_TrafficShowHide(WPARAM, LPARAM);
#endif;
diff --git a/plugins/TrafficCounter/src/commonheaders.h b/plugins/TrafficCounter/src/commonheaders.h index dee13d20c7..da55111532 100644 --- a/plugins/TrafficCounter/src/commonheaders.h +++ b/plugins/TrafficCounter/src/commonheaders.h @@ -149,7 +149,7 @@ union PROTOLIST *ProtoList; // Данные обо всех аккаунтах.
PROTOLIST OverallInfo; // Суммарные данные по видимым аккаунтам.
-BYTE NumberOfAccounts;
+int NumberOfAccounts;
WORD Stat_SelAcc; // Выбранные аккаунты в окне статистики
HWND TrafficHwnd;
DWORD mirandaVer;
diff --git a/plugins/TrafficCounter/src/statistics.c b/plugins/TrafficCounter/src/statistics.c index b79ecfd9e2..14a121f4bd 100644 --- a/plugins/TrafficCounter/src/statistics.c +++ b/plugins/TrafficCounter/src/statistics.c @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HWND hListAccs;
-BOOL CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
WORD i;
diff --git a/plugins/TrafficCounter/src/statistics.h b/plugins/TrafficCounter/src/statistics.h index 2fcff8520b..17b7d5c4e3 100644 --- a/plugins/TrafficCounter/src/statistics.h +++ b/plugins/TrafficCounter/src/statistics.h @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define STAT_UNITS_MB 2
#define STAT_UNITS_ADAPTIVE 3
-BOOL CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void Stat_ReadFile(BYTE);
void Stat_Show(HWND);
void Stat_UpdateTotalTraffic(HWND, DWORD, DWORD);
diff --git a/plugins/TrafficCounter/src/vars.h b/plugins/TrafficCounter/src/vars.h index 9c18990911..0b35ec2670 100644 --- a/plugins/TrafficCounter/src/vars.h +++ b/plugins/TrafficCounter/src/vars.h @@ -2,7 +2,7 @@ #define _vars_h
//extern BYTE numProto;
-extern BYTE NumberOfAccounts;
+extern int NumberOfAccounts;
//extern PROTOLIST *ProtoList;
void RegisterVariablesTokens(void);
|