Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-12-17 19:42:55 +0300
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-12-17 19:42:55 +0300
commit7359bd509afa235acc2ac2f7f95fc9cb5cafd1a4 (patch)
treeb5bb90eeca58fdeb9fde6825f21a25a319823cb4 /src/CmdUI/CmdUI.cpp
parentd30b15ed4b98c28951d6d45b8928f4c2b6a11129 (diff)
apply astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2786 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/CmdUI/CmdUI.cpp')
-rw-r--r--src/CmdUI/CmdUI.cpp62
1 files changed, 24 insertions, 38 deletions
diff --git a/src/CmdUI/CmdUI.cpp b/src/CmdUI/CmdUI.cpp
index 5944f5798..262aca22c 100644
--- a/src/CmdUI/CmdUI.cpp
+++ b/src/CmdUI/CmdUI.cpp
@@ -52,8 +52,7 @@ LRESULT CCmdUIDialog::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
LRESULT ret = __super::DefWindowProc(message, wParam, lParam);
- if(message == WM_INITDIALOG)
- {
+ if(message == WM_INITDIALOG) {
SendMessage(WM_KICKIDLE);
}
@@ -90,20 +89,16 @@ void CCmdUIDialog::OnInitMenuPopup(CMenu *pPopupMenu, UINT /*nIndex*/, BOOL /*bS
// Determine if menu is popup in top-level menu and set m_pOther to
// it if so (m_pParentMenu == NULL indicates that it is secondary popup).
HMENU hParentMenu;
- if (AfxGetThreadState()->m_hTrackingMenu == pPopupMenu->m_hMenu)
+ if (AfxGetThreadState()->m_hTrackingMenu == pPopupMenu->m_hMenu) {
state.m_pParentMenu = pPopupMenu; // Parent == child for tracking popup.
- else if ((hParentMenu = ::GetMenu(m_hWnd)) != NULL)
- {
+ } else if ((hParentMenu = ::GetMenu(m_hWnd)) != NULL) {
CWnd* pParent = this;
// Child windows don't have menus--need to go to the top!
if (pParent != NULL &&
- (hParentMenu = ::GetMenu(pParent->m_hWnd)) != NULL)
- {
+ (hParentMenu = ::GetMenu(pParent->m_hWnd)) != NULL) {
int nIndexMax = ::GetMenuItemCount(hParentMenu);
- for (int nIndex = 0; nIndex < nIndexMax; nIndex++)
- {
- if (::GetSubMenu(hParentMenu, nIndex) == pPopupMenu->m_hMenu)
- {
+ for (int nIndex = 0; nIndex < nIndexMax; nIndex++) {
+ if (::GetSubMenu(hParentMenu, nIndex) == pPopupMenu->m_hMenu) {
// When popup is found, m_pParentMenu is containing menu.
state.m_pParentMenu = CMenu::FromHandle(hParentMenu);
break;
@@ -114,28 +109,24 @@ void CCmdUIDialog::OnInitMenuPopup(CMenu *pPopupMenu, UINT /*nIndex*/, BOOL /*bS
state.m_nIndexMax = pPopupMenu->GetMenuItemCount();
for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax;
- state.m_nIndex++)
- {
+ state.m_nIndex++) {
state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);
- if (state.m_nID == 0)
- continue; // Menu separator or invalid cmd - ignore it.
+ if (state.m_nID == 0) {
+ continue; // Menu separator or invalid cmd - ignore it.
+ }
ASSERT(state.m_pOther == NULL);
ASSERT(state.m_pMenu != NULL);
- if (state.m_nID == (UINT)-1)
- {
+ if (state.m_nID == (UINT)-1) {
// Possibly a popup menu, route to first item of that popup.
state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);
if (state.m_pSubMenu == NULL ||
(state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
- state.m_nID == (UINT)-1)
- {
+ state.m_nID == (UINT)-1) {
continue; // First item of popup can't be routed to.
}
state.DoUpdate(this, TRUE); // Popups are never auto disabled.
- }
- else
- {
+ } else {
// Normal menu item.
// Auto enable/disable if frame window has m_bAutoMenuEnable
// set and command is _not_ a system command.
@@ -145,12 +136,10 @@ void CCmdUIDialog::OnInitMenuPopup(CMenu *pPopupMenu, UINT /*nIndex*/, BOOL /*bS
// Adjust for menu deletions and additions.
UINT nCount = pPopupMenu->GetMenuItemCount();
- if (nCount < state.m_nIndexMax)
- {
+ if (nCount < state.m_nIndexMax) {
state.m_nIndex -= (state.m_nIndexMax - nCount);
while (state.m_nIndex < nCount &&
- pPopupMenu->GetMenuItemID(state.m_nIndex) == state.m_nID)
- {
+ pPopupMenu->GetMenuItemID(state.m_nIndex) == state.m_nID) {
state.m_nIndex++;
}
}
@@ -172,23 +161,20 @@ CCmdUIPropertyPage::~CCmdUIPropertyPage()
LRESULT CCmdUIPropertyPage::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
- if(message == WM_COMMAND)
- {
- switch(HIWORD(wParam))
- {
- case BN_CLICKED:
- case CBN_SELCHANGE:
- case EN_CHANGE:
- SetModified();
- default:
- ;
+ if(message == WM_COMMAND) {
+ switch(HIWORD(wParam)) {
+ case BN_CLICKED:
+ case CBN_SELCHANGE:
+ case EN_CHANGE:
+ SetModified();
+ default:
+ ;
}
}
LRESULT ret = __super::DefWindowProc(message, wParam, lParam);
- if(message == WM_INITDIALOG)
- {
+ if(message == WM_INITDIALOG) {
SendMessage(WM_KICKIDLE);
}