diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
commit | 3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch) | |
tree | 3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /src/modules/srawaymsg | |
parent | 537b94169bf2483798a651ee3b96f7904eebe7b4 (diff) |
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively
- total internal redesign of options' translation
- code reformatting
git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/srawaymsg')
-rw-r--r-- | src/modules/srawaymsg/awaymsg.cpp | 12 | ||||
-rw-r--r-- | src/modules/srawaymsg/sendmsg.cpp | 22 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/modules/srawaymsg/awaymsg.cpp b/src/modules/srawaymsg/awaymsg.cpp index 46ce60bd14..e480dab74a 100644 --- a/src/modules/srawaymsg/awaymsg.cpp +++ b/src/modules/srawaymsg/awaymsg.cpp @@ -140,19 +140,19 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM) clmi.cbSize = sizeof(clmi);
clmi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN | CMIF_TCHAR;
- if ( szProto != NULL ) {
+ if (szProto != NULL) {
int chatRoom = szProto ? DBGetContactSettingByte((HANDLE)wParam, szProto, "ChatRoom", 0) : 0;
- if ( !chatRoom ) {
+ if ( !chatRoom) {
int status = DBGetContactSettingWord((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE);
- mir_sntprintf( str, SIZEOF(str), TranslateT("Re&ad %s Message"), cli.pfnGetStatusModeDescription( status, 0 ));
+ mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s Message"), cli.pfnGetStatusModeDescription(status, 0));
clmi.ptszName = str;
- if ( CallProtoService( szProto, PS_GETCAPS, PFLAGNUM_1, 0 ) & PF1_MODEMSGRECV ) {
- if ( CallProtoService( szProto, PS_GETCAPS, PFLAGNUM_3, 0 ) & Proto_Status2Flag( status )) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(status)) {
clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_NOTOFFLINE | CMIM_ICON | CMIF_TCHAR;
clmi.hIcon = LoadSkinProtoIcon(szProto, status);
} } } }
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hAwayMsgMenuItem, ( LPARAM )&clmi );
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hAwayMsgMenuItem, (LPARAM)&clmi);
IconLib_ReleaseIcon(clmi.hIcon, 0);
return 0;
}
diff --git a/src/modules/srawaymsg/sendmsg.cpp b/src/modules/srawaymsg/sendmsg.cpp index 4c5ceec8ab..d11f80715a 100644 --- a/src/modules/srawaymsg/sendmsg.cpp +++ b/src/modules/srawaymsg/sendmsg.cpp @@ -93,7 +93,7 @@ static TCHAR* GetAwayMessage(int statusMode, char *szProto) for (i=0; dbv.ptszVal[i]; i++)
{
if (dbv.ptszVal[i] != '%') continue;
- if (!_tcsnicmp(dbv.ptszVal + i, _T("%time%"), 6))
+ if ( !_tcsnicmp(dbv.ptszVal + i, _T("%time%"), 6))
{
MIRANDA_IDLE_INFO mii = {0};
mii.cbSize = sizeof(mii);
@@ -112,7 +112,7 @@ static TCHAR* GetAwayMessage(int statusMode, char *szProto) }
else GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, substituteStr, SIZEOF(substituteStr));
}
- else if (!_tcsnicmp(dbv.ptszVal + i, _T("%date%"), 6))
+ else if ( !_tcsnicmp(dbv.ptszVal + i, _T("%date%"), 6))
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, substituteStr, SIZEOF(substituteStr));
else continue;
if (lstrlen(substituteStr) > 6)
@@ -175,7 +175,7 @@ void ChangeAllProtoMessages(char *szProto, int statusMode, TCHAR *msg) for (int i=0; i < accounts.getCount(); i++)
{
PROTOACCOUNT* pa = accounts[i];
- if (!Proto_IsAccountEnabled(pa)) continue;
+ if ( !Proto_IsAccountEnabled(pa)) continue;
if ((CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) &&
!Proto_IsAccountLocked(pa))
CallProtoService(pa->szModuleName, PS_SETAWAYMSGT, statusMode, (LPARAM)msg);
@@ -222,7 +222,7 @@ static INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wPa TCHAR str[256], format[128];
GetWindowText(hwndDlg, format, SIZEOF(format));
mir_sntprintf(str, SIZEOF(str), format, cli.pfnGetStatusModeDescription(dat->statusMode, 0));
- SetWindowText(hwndDlg, str );
+ SetWindowText(hwndDlg, str);
}
GetDlgItemText(hwndDlg, IDOK, dat->okButtonFormat, SIZEOF(dat->okButtonFormat));
{
@@ -315,15 +315,15 @@ static int StatusModeChange(WPARAM wParam, LPARAM lParam) if (protoModeMsgFlags == 0) return 0;
// If its a global change check the complete PFLAGNUM_3 flags to see if a popup might be needed
- if (!szProto)
+ if ( !szProto)
{
- if (!(protoModeMsgFlags & Proto_Status2Flag(statusMode)))
+ if ( !(protoModeMsgFlags & Proto_Status2Flag(statusMode)))
return 0;
}
else
{
// If its a single protocol check the PFLAGNUM_3 for the single protocol
- if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) ||
+ if ( !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) ||
!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(statusMode)))
return 0;
}
@@ -333,7 +333,7 @@ static int StatusModeChange(WPARAM wParam, LPARAM lParam) {
ChangeAllProtoMessages(szProto, statusMode, NULL);
}
- else if (bScreenSaverRunning || ((!GetAsyncKeyState(VK_CONTROL) || prochotkey) &&
+ else if (bScreenSaverRunning || (( !GetAsyncKeyState(VK_CONTROL) || prochotkey) &&
DBGetContactSettingByte(NULL, "SRAway", StatusModeToDbSetting(statusMode, "NoDlg"), 0)))
{
TCHAR *msg = GetAwayMessage(statusMode, szProto);
@@ -389,7 +389,7 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam for (int i = 0; i < SIZEOF(statusModes); i++)
{
int j;
- if (!(protoModeMsgFlags & Proto_Status2Flag(statusModes[i])))
+ if ( !(protoModeMsgFlags & Proto_Status2Flag(statusModes[i])))
continue;
if (hLst)
@@ -553,7 +553,7 @@ static int AwayMsgOptInitialise(WPARAM wParam, LPARAM) odp.pszGroup = LPGEN("Status");
odp.pfnDlgProc = DlgProcAwayMsgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
@@ -589,7 +589,7 @@ static int AwayMsgSendAccountsChanged(WPARAM, LPARAM) protoModeMsgFlags = 0;
for (int i=0; i < accounts.getCount(); i++)
{
- if (!Proto_IsAccountEnabled(accounts[i])) continue;
+ if ( !Proto_IsAccountEnabled(accounts[i])) continue;
protoModeMsgFlags |= CallProtoService(accounts[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0);
}
|