From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAPP/message_pump.cpp | 4 ++-- plugins/YAPP/options.cpp | 6 +++--- plugins/YAPP/popwin.cpp | 8 ++++---- plugins/YAPP/services.cpp | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/YAPP') diff --git a/plugins/YAPP/message_pump.cpp b/plugins/YAPP/message_pump.cpp index 1d88388002..ff35ade82e 100644 --- a/plugins/YAPP/message_pump.cpp +++ b/plugins/YAPP/message_pump.cpp @@ -79,7 +79,7 @@ unsigned __stdcall MessagePumpThread(void* param) { MSG hwndMsg = {0}; while(GetMessage(&hwndMsg, 0, 0, 0) > 0 && !Miranda_Terminated()) { - if(!IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) { + if (!IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) { switch(hwndMsg.message) { case MUM_CREATEPOPUP: { @@ -87,7 +87,7 @@ unsigned __stdcall MessagePumpThread(void* param) { int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0); if(status >= ID_STATUS_OFFLINE && status <= ID_STATUS_OUTTOLUNCH && options.disable_status[status - ID_STATUS_OFFLINE]) enabled = false; - if((options.disable_full_screen && is_full_screen()) || is_workstation_locked()) + if ((options.disable_full_screen && is_full_screen()) || is_workstation_locked()) enabled = false; PopupData *pd = (PopupData *)hwndMsg.lParam; diff --git a/plugins/YAPP/options.cpp b/plugins/YAPP/options.cpp index f039c0e958..d161234afe 100644 --- a/plugins/YAPP/options.cpp +++ b/plugins/YAPP/options.cpp @@ -184,7 +184,7 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR char *strptr; int i = 0; - for(; i < 10; i++) { + for (; i < 10; i++) { strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(ID_STATUS_OFFLINE + i), (LPARAM)0); lvI.pszText = mir_a2t(strptr); lvI.iItem = i; @@ -290,7 +290,7 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case LVN_ITEMCHANGED: { NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam; - if((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK) { + if ((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK) { SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 ); } } @@ -340,7 +340,7 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR options.global_hover = IsDlgButtonChecked(hwndDlg, IDC_CHK_GLOBALHOVER) ? true : false; int i = 0; - for(; i < 10; i++) + for (; i < 10; i++) options.disable_status[i] = (ListView_GetCheckState(GetDlgItem(hwndDlg, IDC_LST_STATUS), i) == 1); options.disable_full_screen = (ListView_GetCheckState(GetDlgItem(hwndDlg, IDC_LST_STATUS), i) == 1); diff --git a/plugins/YAPP/popwin.cpp b/plugins/YAPP/popwin.cpp index 64ed48c347..85fcc6c92a 100644 --- a/plugins/YAPP/popwin.cpp +++ b/plugins/YAPP/popwin.cpp @@ -340,7 +340,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa InvalidateRect(hwnd, 0, TRUE); */ - if(!IsWindowVisible(hwnd)) { + if (!IsWindowVisible(hwnd)) { ShowWindow(hwnd, SW_SHOWNOACTIVATE); UpdateWindow(hwnd); } @@ -506,7 +506,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // second line(s) if(pd->pwzText[0]) { if(hFontSecondLine) SelectObject(ps.hdc, (HGDIOBJ)hFontSecondLine); - if(!pwd->custom_col) + if (!pwd->custom_col) SetTextColor(ps.hdc, colSecondLine); // expand text if no avatar and the time isn't too large @@ -574,7 +574,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa SetTimer(hwnd, ID_MOVETIMER, 10, 0); } else { SetWindowPos(hwnd, 0, (int)wParam, (int)lParam, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); - if(!IsWindowVisible(hwnd)) { + if (!IsWindowVisible(hwnd)) { ShowWindow(hwnd, SW_SHOWNOACTIVATE); UpdateWindow(hwnd); } @@ -669,7 +669,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else *pHeight = max(pwd->tb_height + pwd->text_height + 3 * options.padding, pwd->av_height + 2 * options.av_padding); - if(*pHeight > options.win_max_height) *pHeight = options.win_max_height; + if (*pHeight > options.win_max_height) *pHeight = options.win_max_height; RECT r; GetWindowRect(hwnd, &r); diff --git a/plugins/YAPP/services.cpp b/plugins/YAPP/services.cpp index 857b814790..751b82387e 100644 --- a/plugins/YAPP/services.cpp +++ b/plugins/YAPP/services.cpp @@ -69,7 +69,7 @@ INT_PTR OldCreatePopupA(WPARAM wParam, LPARAM lParam) { lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0)); - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { mir_free(pd_out->pwzTitle); mir_free(pd_out->pwzText); mir_free(pd_out); @@ -106,7 +106,7 @@ INT_PTR OldCreatePopupExA(WPARAM wParam, LPARAM lParam) { pd_out->timeout = pd_in->iSeconds; lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0)); - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { mir_free(pd_out->pwzTitle); mir_free(pd_out->pwzText); mir_free(pd_out); @@ -143,7 +143,7 @@ INT_PTR OldCreatePopupW(WPARAM wParam, LPARAM lParam) { pd_out->timeout = pd_in->iSeconds; lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0)); - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { mir_free(pd_out->pwzTitle); mir_free(pd_out->pwzText); mir_free(pd_out); @@ -197,7 +197,7 @@ void ShowPopup(PopupData &pd_in) lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0)); - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) { mir_free(pd_out->pwzTitle); mir_free(pd_out->pwzText); @@ -352,7 +352,7 @@ INT_PTR PopupChangeW(WPARAM wParam, LPARAM lParam) { } INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) { - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; POPUPDATAT pd = {0}; _tcscpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification")); @@ -367,7 +367,7 @@ INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) { } INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam) { - if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; + if (!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; POPUPDATAW pd = {0}; wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); -- cgit v1.2.3