summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StatusManager/src')
-rw-r--r--plugins/StatusManager/src/aaa_options.cpp54
-rw-r--r--plugins/StatusManager/src/advancedautoaway.cpp8
-rw-r--r--plugins/StatusManager/src/commonstatus.h2
-rw-r--r--plugins/StatusManager/src/stdafx.cxx2
4 files changed, 32 insertions, 34 deletions
diff --git a/plugins/StatusManager/src/aaa_options.cpp b/plugins/StatusManager/src/aaa_options.cpp
index 88c02a1d1f..2b519b2d6a 100644
--- a/plugins/StatusManager/src/aaa_options.cpp
+++ b/plugins/StatusManager/src/aaa_options.cpp
@@ -200,7 +200,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
// clear box and add new status, loop status and check if compatible with proto
SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_RESETCONTENT, 0, 0);
- for (int i=0; i < _countof(statusModeList); i++) {
+ for (int i = 0; i < _countof(statusModeList); i++) {
if ((flags & statusModePf2List[i]) || statusModePf2List[i] == PF2_OFFLINE || bSettingSame) {
wchar_t *statusMode = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
int item = SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
@@ -221,7 +221,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
case IDC_LV1STATUS:
if (HIWORD(wParam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
setting->lv1Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETCURSEL, 0, 0), 0);
SetDlgItemText(hwndDlg, IDC_SETNASTR, CMStringW(FORMAT, TranslateT("minutes of %s mode"), pcli->pfnGetStatusModeDescription(setting->lv1Status, 0)));
@@ -229,7 +229,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
case IDC_LV2STATUS:
if (HIWORD(wParam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
setting->lv2Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_GETCURSEL, 0, 0), 0);
break;
@@ -260,30 +260,30 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
break;
case IDC_AWAYTIME:
- setting->awayTime = GetDlgItemInt(hwndDlg,IDC_AWAYTIME, NULL, FALSE);
+ setting->awayTime = GetDlgItemInt(hwndDlg, IDC_AWAYTIME, NULL, FALSE);
break;
case IDC_NATIME:
- setting->naTime = GetDlgItemInt(hwndDlg,IDC_NATIME, NULL, FALSE);
+ setting->naTime = GetDlgItemInt(hwndDlg, IDC_NATIME, NULL, FALSE);
break;
case IDC_LV2ONINACTIVE:
- setting->optionFlags^=FLAG_LV2ONINACTIVE;
+ setting->optionFlags ^= FLAG_LV2ONINACTIVE;
SetDialogItems(hwndDlg, setting);
break;
case IDC_CONFIRM:
- setting->optionFlags^=FLAG_CONFIRM;
+ setting->optionFlags ^= FLAG_CONFIRM;
SetDialogItems(hwndDlg, setting);
break;
case IDC_RESETSTATUS:
- setting->optionFlags^=FLAG_RESET;
+ setting->optionFlags ^= FLAG_RESET;
SetDialogItems(hwndDlg, setting);
break;
case IDC_MONITORMIRANDA:
- setting->optionFlags^=FLAG_MONITORMIRANDA;
+ setting->optionFlags ^= FLAG_MONITORMIRANDA;
SetDialogItems(hwndDlg, setting);
break;
}
@@ -300,12 +300,12 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
break;
case WM_NOTIFY:
- switch(((NMHDR*)lParam)->idFrom) {
+ switch (((NMHDR*)lParam)->idFrom) {
case IDC_STATUSLIST:
if (init)
break;
- switch(((NMHDR*)lParam)->code) {
+ switch (((NMHDR*)lParam)->code) {
case LVN_ITEMCHANGED:
NMLISTVIEW *nmlv = (NMLISTVIEW*)lParam;
if (IsWindowVisible(GetDlgItem(hwndDlg, IDC_STATUSLIST)) && ((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK)) {
@@ -334,7 +334,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
if (bSettingSame)
WriteAutoAwaySetting(*sameSetting, SETTING_ALL);
else {
- for (int i=0; i < optionSettings.getCount(); i++ )
+ for (int i = 0; i < optionSettings.getCount(); i++)
WriteAutoAwaySetting(optionSettings[i], optionSettings[i].szName);
}
LoadOptions(autoAwaySettings, FALSE);
@@ -371,18 +371,18 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
case WM_SHOWWINDOW:
ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (db_get_b(NULL, "Idle", "AAEnable", 0)));
break;
-
+
case WM_COMMAND:
- if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus())
+ if ((HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- switch(LOWORD(wParam)) {
+ switch (LOWORD(wParam)) {
case IDC_MONITORMOUSE:
- CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE))&&(BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)))||(IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE)) ? BST_CHECKED : BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD))) || (IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE)) ? BST_CHECKED : BST_UNCHECKED));
break;
case IDC_MONITORKEYBOARD:
- CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE))&&(BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)))||(IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)) ? BST_CHECKED : BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD))) || (IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)) ? BST_CHECKED : BST_UNCHECKED));
break;
case IDC_SAMESETTINGS:
@@ -393,7 +393,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
break;
case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY ) {
+ if (((LPNMHDR)lParam)->code == PSN_APPLY) {
db_set_b(NULL, AAAMODULENAME, SETTING_IGNLOCK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNLOCK));
db_set_b(NULL, AAAMODULENAME, SETTING_IGNSYSKEYS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNSYSKEYS));
db_set_b(NULL, AAAMODULENAME, SETTING_IGNALTCOMBO, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNALTCOMBO));
@@ -412,9 +412,9 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
/////////////////////////////////////////////////////////////////////////////////////////
// Tab window procedure
-static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
{
- switch(msg) {
+ switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
@@ -436,36 +436,36 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
+ MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right - rcTabs.left) - (rcPage.right - rcPage.left)) / 2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom - rcTabs.top) - (rcPage.bottom - rcPage.top)) / 2, rcPage.right - rcPage.left, rcPage.bottom - rcPage.top, TRUE);
ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
HWND hShow = hPage;
// rules tab
- tci.mask = TCIF_TEXT|TCIF_PARAM;
+ tci.mask = TCIF_TEXT | TCIF_PARAM;
tci.pszText = TranslateT("Rules");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAY), hwndDlg, DlgProcAutoAwayRulesOpts, (LPARAM)GetParent(hwndDlg));
EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
+ MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right - rcTabs.left) - (rcPage.right - rcPage.left)) / 2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom - rcTabs.top) - (rcPage.bottom - rcPage.top)) / 2, rcPage.right - rcPage.left, rcPage.bottom - rcPage.top, TRUE);
ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
// messages tab
- tci.mask = TCIF_TEXT|TCIF_PARAM;
+ tci.mask = TCIF_TEXT | TCIF_PARAM;
tci.pszText = TranslateT("Status messages");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAYMSG), hwndDlg, DlgProcAutoAwayMsgOpts, (LPARAM)GetParent(hwndDlg));
EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
+ MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right - rcTabs.left) - (rcPage.right - rcPage.left)) / 2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom - rcTabs.top) - (rcPage.bottom - rcPage.top)) / 2, rcPage.right - rcPage.left, rcPage.bottom - rcPage.top, TRUE);
ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
- ShowWindow(hShow, SW_SHOW);
+ ShowWindow(hShow, SW_SHOW);
}
break;
@@ -508,7 +508,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara
/////////////////////////////////////////////////////////////////////////////////////////
// Options initialization procedure
-int AutoAwayOptInitialise(WPARAM wParam,LPARAM lParam)
+int AutoAwayOptInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 1000000000;
diff --git a/plugins/StatusManager/src/advancedautoaway.cpp b/plugins/StatusManager/src/advancedautoaway.cpp
index 3c4e58efd4..7f09466bd2 100644
--- a/plugins/StatusManager/src/advancedautoaway.cpp
+++ b/plugins/StatusManager/src/advancedautoaway.cpp
@@ -160,7 +160,7 @@ int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char* protoName)
return 0;
}
-static int ProcessProtoAck(WPARAM wParam, LPARAM lParam)
+static int ProcessProtoAck(WPARAM, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type != ACKTYPE_STATUS || ack->result != ACKRESULT_SUCCESS)
@@ -252,7 +252,7 @@ static int changeState(TAAAProtoSetting &setting, STATES newState)
return 0;
}
-static VOID CALLBACK AutoAwayTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime)
+static VOID CALLBACK AutoAwayTimer(HWND, UINT, UINT_PTR, DWORD)
{
int statusChanged = FALSE;
int confirm = FALSE;
@@ -548,7 +548,7 @@ static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lPa
/////////////////////////////////////////////////////////////////////////////////////////
// Inits & stuff
-static int AutoAwayShutdown(WPARAM wParam, LPARAM lParam)
+static int AutoAwayShutdown(WPARAM, LPARAM)
{
KillTimer(NULL, hAutoAwayTimer);
@@ -562,7 +562,7 @@ static int AutoAwayShutdown(WPARAM wParam, LPARAM lParam)
return 0;
}
-int AAACSModuleLoaded(WPARAM wParam, LPARAM lParam)
+int AAACSModuleLoaded(WPARAM, LPARAM)
{
HookEvent(ME_PROTO_ACCLISTCHANGED, OnAAAAccChanged);
HookEvent(ME_OPT_INITIALISE, AutoAwayOptInitialise);
diff --git a/plugins/StatusManager/src/commonstatus.h b/plugins/StatusManager/src/commonstatus.h
index 352b9f1f93..45e23ef2b6 100644
--- a/plugins/StatusManager/src/commonstatus.h
+++ b/plugins/StatusManager/src/commonstatus.h
@@ -22,8 +22,6 @@
#ifndef COMMONSTATUSHEADER
#define COMMONSTATUSHEADER
-#define _CRT_SECURE_NO_WARNINGS
-
#include <windows.h>
#include <shlobj.h>
#include <uxtheme.h>
diff --git a/plugins/StatusManager/src/stdafx.cxx b/plugins/StatusManager/src/stdafx.cxx
index 3968e037fa..3034680058 100644
--- a/plugins/StatusManager/src/stdafx.cxx
+++ b/plugins/StatusManager/src/stdafx.cxx
@@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdafx.h" \ No newline at end of file
+#include "stdafx.h"