summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
commit30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch)
treeb1dae7a6d545cdf622a165ba4c576d3a41d71221 /plugins/StatusPlugins
parent65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff)
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins')
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp12
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/options.cpp6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp8
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp38
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp12
-rw-r--r--plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/profiles.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.cpp2
-rw-r--r--plugins/StatusPlugins/commonstatus.cpp12
-rw-r--r--plugins/StatusPlugins/confirmdialog.cpp12
12 files changed, 59 insertions, 59 deletions
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
index 9213b915bb..c969b5c98a 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
@@ -146,7 +146,7 @@ void LoadOptions( OBJLIST<TAAAProtoSetting>& loadSettings, BOOL override)
if (!override) {
if (loadSettings[i].optionFlags & FLAG_MONITORMIRANDA)
monitorMiranda = TRUE;
- else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard) )
+ else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard))
monitorAll = TRUE;
} }
@@ -348,7 +348,7 @@ static VOID CALLBACK AutoAwayTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD
}
else if ( ((mouseStationaryTimer < sts1Time) && (!screenSaver) && (!locked)) &&
((aas.optionFlags&FLAG_LV2ONINACTIVE) || (!(aas.optionFlags&FLAG_SETNA))) &&
- (aas.optionFlags&FLAG_RESET) ) {
+ (aas.optionFlags&FLAG_RESET)) {
/* from STATUS1_SET to SET_ORGSTATUS */
changeState(aas, SET_ORGSTATUS);
}
@@ -478,14 +478,14 @@ static LRESULT CALLBACK MirandaMouseHookFunction(int code, WPARAM wParam, LPARAM
static LRESULT CALLBACK MirandaKeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hMirandaKeyBoardHook, code, wParam, lParam);
}
}
@@ -537,14 +537,14 @@ static LRESULT CALLBACK MouseHookFunction(int code, WPARAM wParam, LPARAM lParam
static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hKeyBoardHook, code, wParam, lParam);
}
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
index 3fd52ffec1..5e85f2d841 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
@@ -43,7 +43,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DWORD protoModeMsgFlags = 0;
for ( i=0; i < protoCount; i++ ) {
- if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)) )
+ if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)))
continue;
protoModeMsgFlags |= CallProtoService( proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0 );
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
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)) {
@@ -144,7 +144,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
for ( i=0; i < count; i++ ) {
DBWriteContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
- if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0) )
+ if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0))
DBWriteContactSettingString(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
}
break;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
index 29b17ac44c..a4101b1b88 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
@@ -187,7 +187,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
else
flags = 0;
for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++) {
- if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame) ) {
+ if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
lvItem.pszText = ( TCHAR* )CallService( MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
lvItem.lParam = ( LPARAM )statusModePf2List[i];
ListView_InsertItem(hList,&lvItem);
@@ -390,7 +390,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
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)) {
@@ -494,7 +494,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara
break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
index e803c2dab4..edecc8f947 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
@@ -35,10 +35,10 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) {
}
break;
case SET_ORGSTATUS:
- if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) ) {
+ if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0))) {
bReport = TRUE;;
}
- if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) ) {
+ if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0))) {
bReport = TRUE;;
}
break;
@@ -54,12 +54,12 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) {
szProto = DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
_snprintf(setting, sizeof(setting), "%s_Lv1Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
bReport = TRUE;
}
_snprintf(setting, sizeof(setting), "%s_Lv2Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
bReport = TRUE;
}
}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 5ef0b59b09..ba69168422 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -215,7 +215,7 @@ static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy()
ps[i]->szMsg = NULL;
ps[i]->szName = cs.szName;
ps[i]->tszAccName = cs.tszAccName;
- if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE) ) {
+ if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE)) {
NAS_PROTOINFO npi;
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -306,10 +306,10 @@ static int SetCurrentStatus()
ps = GetCurrentProtoSettingsCopy();
for (i=0;i<connectionSettings.getCount();i++) {
realStatus = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0);
- if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0)) ) { // ignore this proto by removing it's name (not so nice)
+ if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0))) { // ignore this proto by removing it's name (not so nice)
ps[i]->szName = "";
}
- else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)) ) {
+ else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE))) {
// force offline before reconnecting
log_infoA("KeepStatus: Setting %s offline before making a new connection attempt", ps[i]->szName);
CallProtoService(ps[i]->szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -356,7 +356,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM lParam)
for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName))
@@ -379,7 +379,7 @@ static int CSStatusChangeEx(WPARAM wParam, LPARAM lParam)
for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) {
if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED)
@@ -401,7 +401,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId);
if ( timer & IDT_PROCESSACK ) {
res = (processAckTimerId == 0)?0:1;
- if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart) ) {
+ if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, processAckTimerId);
@@ -413,7 +413,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONN ) {
res = (checkConnectionTimerId == 0?0:1)||res;
- if ( (checkConnectionTimerId == 0) || (restart) ) {
+ if ( (checkConnectionTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectionTimerId);
@@ -425,7 +425,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_AFTERCHECK ) {
res = (afterCheckTimerId==0?0:1)||res;
- if ( (afterCheckTimerId == 0) || (restart) ) {
+ if ( (afterCheckTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, afterCheckTimerId);
@@ -437,7 +437,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONTIN ) {
res = (checkContinTimerId==0?0:1)||res;
- if ( (checkContinTimerId == 0) || (restart) ) {
+ if ( (checkContinTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkContinTimerId);
@@ -450,7 +450,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONNECTING ) {
res = (checkConnectingTimerId==0?0:1)||res;
- if ( (checkConnectingTimerId == 0) || (restart) ) {
+ if ( (checkConnectingTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectingTimerId);
@@ -559,7 +559,7 @@ static int ProcessProtoAck(WPARAM wParam,LPARAM lParam)
char dbSetting[128];
int i;
- if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN) )
+ if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN))
return 0;
mir_snprintf(dbSetting, sizeof(dbSetting), "%s_enabled", ack->szModule);
@@ -648,7 +648,7 @@ static VOID CALLBACK CheckConnectingTimer(HWND hwnd,UINT message,UINT_PTR idEven
if (curStatus < MAX_CONNECT_RETRIES) { // connecting
maxConnectingTime = DBGetContactSettingDword(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0);
if (maxConnectingTime > 0) {
- if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000) ) {
+ if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000)) {
// set offline
log_infoA("KeepStatus: %s is too long connecting; setting offline", cs.szName);
CallProtoService(cs.szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -710,7 +710,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven
shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) ) {
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) {
setStatus = TRUE;
if (showConnectionPopups)
hIcon = (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)cs.szName, (LPARAM)SKINICON_STATUS_OFFLINE);
@@ -721,7 +721,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven
if (increaseExponential)
currentDelay = min(2*currentDelay,maxDelay);
- if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult)) ) {
+ if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult))) {
// no network
NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_RETRYNOCONN, (LPARAM)retryCount+1);
ProcessPopup(KS_CONN_STATE_RETRYNOCONN, 0);
@@ -779,7 +779,7 @@ static VOID CALLBACK AfterCheckTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWO
shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED) // (on ignoring proto)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) )
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS))
setStatus = TRUE;
}
@@ -853,9 +853,9 @@ static void CheckContinueslyFunction(void *arg)
}
if (bLastPingResult == FALSE) {
start = dbv.pszVal;
- while ( (*start != '\0') && (!bLastPingResult) ) {
+ while ( (*start != '\0') && (!bLastPingResult)) {
end = start;
- while ( (*end != ' ') && (*end != '\0') )
+ while ( (*end != ' ') && (*end != '\0'))
end++;
memset(host, '\0', sizeof(host));
strncpy(host, start, end-start);
@@ -888,7 +888,7 @@ static void CheckContinueslyFunction(void *arg)
return; // already connecting, leave
}
- if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT))) ) {
+ if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT)))) {
pingFailures = 0;
int count;
@@ -1022,7 +1022,7 @@ static int ProcessPopup(int reason, LPARAM lParam)
}
}
if (strlen(protoInfo) > 0) {
- // cut the last end of line (this may also be the first one ;) )
+ // cut the last end of line (this may also be the first one ;))
*(protoInfo + strlen(protoInfo) - 2) = '\0';
}
if (szProto != NULL)
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index 06ae43e3df..4615d78895 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -98,7 +98,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L
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);
// something changed
switch (LOWORD(wParam)) {
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg,UINT msg,WPARAM wParam,LPA
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);
// something changed
switch (LOWORD(wParam)) {
@@ -329,7 +329,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
@@ -435,7 +435,7 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
// wincolors
CheckDlgButton(hwndDlg, IDC_WINCOLORS, DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0));
// defaultcolors
- CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) ));
+ CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
@@ -495,8 +495,8 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
ppd.lchContact = NULL;
ppd.lchIcon = (HICON)CallService(MS_SKIN_LOADICON, (WPARAM)SKINICON_STATUS_OFFLINE, 0);
- strcpy( ppd.lpzContactName, Translate("KeepStatus") );
- strcpy( ppd.lpzText, Translate("You broke the Internet!") );
+ strcpy( ppd.lpzContactName, Translate("KeepStatus"));
+ strcpy( ppd.lpzText, Translate("You broke the Internet!"));
if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
else if (IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))
diff --git a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
index adbc8716c8..8421460d2f 100644
--- a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
@@ -130,10 +130,10 @@ static int KeepStatusEvent(WPARAM wParam, LPARAM lParam) {
break;
case KS_CONN_STATE_STOPPEDCHECKING:
- if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)) )
+ if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)))
continue;
- if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)) )
+ if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)))
continue;
break;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 9227ae7f62..a790561310 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -664,7 +664,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, ps->szMsg);
bStatusMsg = ( (((CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND&~PF1_INDIVMODEMSG)) &&
- (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST) );
+ (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST));
}
EnableWindow(GetDlgItem(hwndDlg, IDC_MIRANDAMSG), bStatusMsg);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMMSG), bStatusMsg);
@@ -720,7 +720,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
}
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()))
if ( bInitDone )
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index cc98753df6..309c249a6a 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -189,7 +189,7 @@ char *GetStatusMessage(int profile, char *szProto)
DBVARIANT dbv;
for ( int i=0; i < pceCount; i++ ) {
- if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto)) ) {
+ if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) {
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
if (!DBGetContactSetting(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
pce[i].msg = ( char* )realloc(pce[i].msg, strlen(dbv.pszVal)+1);
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
index c9ad54ebb7..7028868272 100644
--- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
@@ -334,7 +334,7 @@ static int Exit(WPARAM wParam, LPARAM lParam)
mir_free(npi.szMsg);
} } } }
- if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0)) ) {
+ if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))) {
if (ServiceExists(MS_CLIST_SETSTATUSMODE))
CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0);
else
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp
index f0e4a824eb..fb9bac079e 100644
--- a/plugins/StatusPlugins/commonstatus.cpp
+++ b/plugins/StatusPlugins/commonstatus.cpp
@@ -85,14 +85,14 @@ DWORD StatusModeToProtoFlag(int status)
int GetActualStatus(PROTOCOLSETTINGEX *protoSetting)
{
if (protoSetting->status == ID_STATUS_LAST) {
- if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS) )
+ if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS))
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
return protoSetting->lastStatus;
}
if (protoSetting->status == ID_STATUS_CURRENT)
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
- if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH) ) {
+ if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH)) {
log_debugA("invalid status detected: %d", protoSetting->status);
return 0;
}
@@ -227,7 +227,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
}
// fill the array of proto message for NAS, this will be used anyway
for (i=0;i<protoList->getCount();i++) {
- if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL) ) {
+ if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL)) {
continue;
}
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -248,12 +248,12 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
for (i=0;i<protoList->getCount();i++) {
msgCount = 0;
for (j=i;j<protoList->getCount();j++) {
- if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j])) ) {
+ if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j]))) {
msgCount += 1;
//log_infoA("Adding %s (%u) to %s (%u)", protoSettings[j]->szName, protoSettings[j]->status, protoSettings[i]->szName, protoSettings[i]->status);
}
}
- if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1)) ) {
+ if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1))) {
maxMsgCount = msgCount;
nasGlobalMsg = _strdup(nasProtoMessages[i]);
}
@@ -281,7 +281,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
npi.szMsg = mir_strdup(protoSettings[i]->szMsg);
log_infoA("CommonStatus will set status %u for %s and message specified by plugin using NAS (%x)", npi.status, npi.szProto, npi.szMsg);
}
- else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg)) ) {
+ else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg))) {
npi.szMsg = NULL;
log_infoA("CommonStatus will set status %u for %s and global message using NAS", npi.status, npi.szProto);
}
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp
index a6073d2373..f1a2dbf94b 100644
--- a/plugins/StatusPlugins/confirmdialog.cpp
+++ b/plugins/StatusPlugins/confirmdialog.cpp
@@ -141,7 +141,7 @@ static int SetStatusList(HWND hwndDlg)
}
// status message
- if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus)))) ) {
+ if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))) {
TCHAR *msg = GetDefaultStatusMessage( &confirmSettings[i], actualStatus );
if ( msg != NULL ) {
TCHAR* fMsg = variables_parsedup( msg, confirmSettings[i].tszAccName, NULL );
@@ -233,7 +233,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
// stop timer
KillTimer(hwndDlg, TIMER_ID);
SetDlgItemText(hwndDlg, IDC_CLOSE, TranslateT("Close"));
- if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK) ) { // something clicked
+ if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK)) { // something clicked
switch (LOWORD(wParam)) {
case IDC_PROFILE:
{
@@ -288,9 +288,9 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
else ListView_SetItemText(GetDlgItem(hwndDlg,IDC_STARTUPLIST), lvItem.iItem, 1,
( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR ));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT) )
+ else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
else
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), (CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))?TRUE:FALSE);
@@ -378,7 +378,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
for ( i = 0; i < SIZEOF(statusModeList); i++ ) {
- if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i])))) ) {
+ if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i]))))) {
TCHAR* statusMode = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR);
item = SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_ADDSTRING,0,(LPARAM)statusMode);
SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_SETITEMDATA,item,(LPARAM)statusModeList[i]);
@@ -388,7 +388,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
// enable status box
EnableWindow(GetDlgItem(hwndDlg,IDC_STATUS), (ListView_GetNextItem(GetDlgItem(hwndDlg,IDC_STARTUPLIST),-1,LVNI_SELECTED)>=0));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
else if ( proto->status == ID_STATUS_LAST || proto->status == ID_STATUS_CURRENT )
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);