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:
authortetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
committertetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
commita9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch)
tree2dab453d94d5e003379a6cc895eceb84c80e23ec /src/apps/mplayerc/MediaTypesDlg.cpp
parentaafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff)
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren http://astyle.sourceforge.net/ git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/MediaTypesDlg.cpp')
-rw-r--r--src/apps/mplayerc/MediaTypesDlg.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/src/apps/mplayerc/MediaTypesDlg.cpp b/src/apps/mplayerc/MediaTypesDlg.cpp
index b261bdde9..209b8a498 100644
--- a/src/apps/mplayerc/MediaTypesDlg.cpp
+++ b/src/apps/mplayerc/MediaTypesDlg.cpp
@@ -32,11 +32,11 @@
//IMPLEMENT_DYNAMIC(CMediaTypesDlg, CResizableDialog)
CMediaTypesDlg::CMediaTypesDlg(IGraphBuilderDeadEnd* pGBDE, CWnd* pParent /*=NULL*/)
- : CResizableDialog(CMediaTypesDlg::IDD, pParent)
- , m_pGBDE(pGBDE)
+ : CResizableDialog(CMediaTypesDlg::IDD, pParent)
+ , m_pGBDE(pGBDE)
{
- m_subtype = GUID_NULL;
- m_type = UNKNOWN;
+ m_subtype = GUID_NULL;
+ m_type = UNKNOWN;
}
CMediaTypesDlg::~CMediaTypesDlg()
@@ -45,34 +45,34 @@ CMediaTypesDlg::~CMediaTypesDlg()
void CMediaTypesDlg::DoDataExchange(CDataExchange* pDX)
{
- CResizableDialog::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_COMBO1, m_pins);
- DDX_Control(pDX, IDC_EDIT1, m_report);
+ CResizableDialog::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_COMBO1, m_pins);
+ DDX_Control(pDX, IDC_EDIT1, m_report);
}
void CMediaTypesDlg::AddLine(CString str)
{
- str.Replace(_T("\n"), _T("\r\n"));
- int len = m_report.GetWindowTextLength();
- m_report.SetSel(len, len, TRUE);
- m_report.ReplaceSel(str);
+ str.Replace(_T("\n"), _T("\r\n"));
+ int len = m_report.GetWindowTextLength();
+ m_report.SetSel(len, len, TRUE);
+ m_report.ReplaceSel(str);
}
void CMediaTypesDlg::AddMediaType(AM_MEDIA_TYPE* pmt)
{
- m_subtype = pmt->subtype;
- if(pmt->majortype == MEDIATYPE_Video) m_type = VIDEO;
- else if(pmt->majortype == MEDIATYPE_Audio) m_type = AUDIO;
- else m_type = UNKNOWN;
-
- CAtlList<CString> sl;
- CMediaTypeEx(*pmt).Dump(sl);
- POSITION pos = sl.GetHeadPosition();
- while(pos) AddLine(sl.GetNext(pos) + '\n');
+ m_subtype = pmt->subtype;
+ if(pmt->majortype == MEDIATYPE_Video) m_type = VIDEO;
+ else if(pmt->majortype == MEDIATYPE_Audio) m_type = AUDIO;
+ else m_type = UNKNOWN;
+
+ CAtlList<CString> sl;
+ CMediaTypeEx(*pmt).Dump(sl);
+ POSITION pos = sl.GetHeadPosition();
+ while(pos) AddLine(sl.GetNext(pos) + '\n');
}
BEGIN_MESSAGE_MAP(CMediaTypesDlg, CResizableDialog)
- ON_CBN_SELCHANGE(IDC_COMBO1, OnCbnSelchangeCombo1)
+ ON_CBN_SELCHANGE(IDC_COMBO1, OnCbnSelchangeCombo1)
END_MESSAGE_MAP()
@@ -80,62 +80,62 @@ END_MESSAGE_MAP()
BOOL CMediaTypesDlg::OnInitDialog()
{
- __super::OnInitDialog();
+ __super::OnInitDialog();
- CAtlList<CStringW> path;
- CAtlList<CMediaType> mts;
+ CAtlList<CStringW> path;
+ CAtlList<CMediaType> mts;
- for(int i = 0; S_OK == m_pGBDE->GetDeadEnd(i, path, mts); i++)
- {
- if(!path.GetCount()) continue;
- m_pins.SetItemData(m_pins.AddString(CString(path.GetTail())), (DWORD_PTR)i);
- }
+ for(int i = 0; S_OK == m_pGBDE->GetDeadEnd(i, path, mts); i++)
+ {
+ if(!path.GetCount()) continue;
+ m_pins.SetItemData(m_pins.AddString(CString(path.GetTail())), (DWORD_PTR)i);
+ }
- m_pins.SetCurSel(0);
- OnCbnSelchangeCombo1();
+ m_pins.SetCurSel(0);
+ OnCbnSelchangeCombo1();
- AddAnchor(IDC_STATIC1, TOP_LEFT, TOP_RIGHT);
- AddAnchor(IDC_STATIC2, TOP_LEFT, TOP_RIGHT);
- AddAnchor(IDC_COMBO1, TOP_LEFT, TOP_RIGHT);
- AddAnchor(IDC_EDIT1, TOP_LEFT, BOTTOM_RIGHT);
- AddAnchor(IDOK, BOTTOM_RIGHT);
+ AddAnchor(IDC_STATIC1, TOP_LEFT, TOP_RIGHT);
+ AddAnchor(IDC_STATIC2, TOP_LEFT, TOP_RIGHT);
+ AddAnchor(IDC_COMBO1, TOP_LEFT, TOP_RIGHT);
+ AddAnchor(IDC_EDIT1, TOP_LEFT, BOTTOM_RIGHT);
+ AddAnchor(IDOK, BOTTOM_RIGHT);
- SetMinTrackSize(CSize(300, 200));
+ SetMinTrackSize(CSize(300, 200));
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
void CMediaTypesDlg::OnCbnSelchangeCombo1()
{
- m_report.SetWindowText(_T(""));
-
- int i = m_pins.GetCurSel();
- if(i < 0) return;
-
- CAtlList<CStringW> path;
- CAtlList<CMediaType> mts;
-
- if(FAILED(m_pGBDE->GetDeadEnd(i, path, mts)) || !path.GetCount())
- return;
-
- POSITION pos = path.GetHeadPosition();
- while(pos)
- {
- AddLine(CString(path.GetNext(pos)) + _T("\n"));
- if(!pos) AddLine(_T("\n"));
- }
-
- pos = mts.GetHeadPosition();
- for(int j = 0; pos; j++)
- {
- CString str;
- str.Format(_T("Media Type %d:\n"), j);
- AddLine(str);
- AddLine(_T("--------------------------\n"));
- AddMediaType(&mts.GetNext(pos));
- AddLine();
- }
-
- m_report.SetSel(0, 0);
+ m_report.SetWindowText(_T(""));
+
+ int i = m_pins.GetCurSel();
+ if(i < 0) return;
+
+ CAtlList<CStringW> path;
+ CAtlList<CMediaType> mts;
+
+ if(FAILED(m_pGBDE->GetDeadEnd(i, path, mts)) || !path.GetCount())
+ return;
+
+ POSITION pos = path.GetHeadPosition();
+ while(pos)
+ {
+ AddLine(CString(path.GetNext(pos)) + _T("\n"));
+ if(!pos) AddLine(_T("\n"));
+ }
+
+ pos = mts.GetHeadPosition();
+ for(int j = 0; pos; j++)
+ {
+ CString str;
+ str.Format(_T("Media Type %d:\n"), j);
+ AddLine(str);
+ AddLine(_T("--------------------------\n"));
+ AddMediaType(&mts.GetNext(pos));
+ AddLine();
+ }
+
+ m_report.SetSel(0, 0);
}