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-07-05 16:58:42 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-07-05 16:58:42 +0400
commitf6883a2c09507d0acb9ccbf0156e5948211dc480 (patch)
tree7789b4fecd6b2e846f070e2e0bdb1e16ea7555e9 /src/apps/mplayerc/PlayerNavigationDialog.cpp
parente9b446380bc3bc122e3e3a1d0622163a5f1920a3 (diff)
astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2103 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PlayerNavigationDialog.cpp')
-rw-r--r--src/apps/mplayerc/PlayerNavigationDialog.cpp214
1 files changed, 107 insertions, 107 deletions
diff --git a/src/apps/mplayerc/PlayerNavigationDialog.cpp b/src/apps/mplayerc/PlayerNavigationDialog.cpp
index 473cf2d38..fe6247a00 100644
--- a/src/apps/mplayerc/PlayerNavigationDialog.cpp
+++ b/src/apps/mplayerc/PlayerNavigationDialog.cpp
@@ -32,7 +32,7 @@
// IMPLEMENT_DYNAMIC(CPlayerNavigationDialog, CResizableDialog)
CPlayerNavigationDialog::CPlayerNavigationDialog()
- : CResizableDialog(CPlayerNavigationDialog::IDD, NULL)
+ : CResizableDialog(CPlayerNavigationDialog::IDD, NULL)
{
}
@@ -43,41 +43,41 @@ CPlayerNavigationDialog::~CPlayerNavigationDialog()
BOOL CPlayerNavigationDialog::Create(CWnd* pParent)
{
- if(!__super::Create(IDD, pParent))
- return FALSE;
- m_pParent = pParent;
- return TRUE;
+ if(!__super::Create(IDD, pParent))
+ return FALSE;
+ m_pParent = pParent;
+ return TRUE;
}
void CPlayerNavigationDialog::DoDataExchange(CDataExchange* pDX)
{
- __super::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_LISTCHANNELS, m_ChannelList);
- DDX_Control(pDX, IDC_NAVIGATION_AUDIO, m_ComboAudio);
- DDX_Control(pDX, IDC_NAVIGATION_INFO, m_ButtonInfo);
- DDX_Control(pDX, IDC_NAVIGATION_SCAN, m_ButtonScan);
+ __super::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_LISTCHANNELS, m_ChannelList);
+ DDX_Control(pDX, IDC_NAVIGATION_AUDIO, m_ComboAudio);
+ DDX_Control(pDX, IDC_NAVIGATION_INFO, m_ButtonInfo);
+ DDX_Control(pDX, IDC_NAVIGATION_SCAN, m_ButtonScan);
}
BOOL CPlayerNavigationDialog::PreTranslateMessage(MSG* pMsg)
{
- if(pMsg->message == WM_KEYDOWN)
- {
- if(pMsg->wParam == VK_RETURN)
- {
- CWnd* pFocused = GetFocus();
+ if(pMsg->message == WM_KEYDOWN)
+ {
+ if(pMsg->wParam == VK_RETURN)
+ {
+ CWnd* pFocused = GetFocus();
UNUSED_ALWAYS(pFocused);
- }
- }
- return __super::PreTranslateMessage(pMsg);
+ }
+ }
+ return __super::PreTranslateMessage(pMsg);
}
BEGIN_MESSAGE_MAP(CPlayerNavigationDialog, CResizableDialog)
- ON_WM_DESTROY()
- ON_LBN_SELCHANGE(IDC_LISTCHANNELS, OnChangeChannel)
- ON_CBN_SELCHANGE(IDC_NAVIGATION_AUDIO, OnSelChangeComboAudio)
- ON_BN_CLICKED (IDC_NAVIGATION_INFO, OnButtonInfo)
- ON_BN_CLICKED(IDC_NAVIGATION_SCAN, OnTunerScan)
+ ON_WM_DESTROY()
+ ON_LBN_SELCHANGE(IDC_LISTCHANNELS, OnChangeChannel)
+ ON_CBN_SELCHANGE(IDC_NAVIGATION_AUDIO, OnSelChangeComboAudio)
+ ON_BN_CLICKED (IDC_NAVIGATION_INFO, OnButtonInfo)
+ ON_BN_CLICKED(IDC_NAVIGATION_SCAN, OnTunerScan)
END_MESSAGE_MAP()
@@ -86,128 +86,128 @@ END_MESSAGE_MAP()
BOOL CPlayerNavigationDialog::OnInitDialog()
{
- __super::OnInitDialog();
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
+ __super::OnInitDialog();
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
void CPlayerNavigationDialog::OnDestroy()
{
- m_ChannelList.ResetContent();
- __super::OnDestroy();
+ m_ChannelList.ResetContent();
+ __super::OnDestroy();
}
void CPlayerNavigationDialog::OnChangeChannel()
{
- CWnd* TempWnd;
- int nItem;
+ CWnd* TempWnd;
+ int nItem;
- TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
- nItem = p_nItems[m_ChannelList.GetCurSel()] + ID_NAVIGATE_CHAP_SUBITEM_START;
- static_cast<CMainFrame*> (TempWnd) -> OnNavigateChapters(nItem);
- SetupAudioSwitcherSubMenu();
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ nItem = p_nItems[m_ChannelList.GetCurSel()] + ID_NAVIGATE_CHAP_SUBITEM_START;
+ static_cast<CMainFrame*> (TempWnd) -> OnNavigateChapters(nItem);
+ SetupAudioSwitcherSubMenu();
}
void CPlayerNavigationDialog::SetupAudioSwitcherSubMenu(CDVBChannel* pChannel)
{
- bool bFound = FALSE;
- int nCurrentChannel;
- AppSettings& s = AfxGetAppSettings();
-
- if (!pChannel)
- {
- nCurrentChannel = s.DVBLastChannel;
- POSITION pos = s.DVBChannels.GetHeadPosition();
- while (pos && !bFound)
- {
- pChannel = &s.DVBChannels.GetNext(pos);
- if (nCurrentChannel == pChannel->GetPrefNumber())
- {
- bFound = TRUE;
- break;
- }
- }
- }
-
- m_ComboAudio.ResetContent();
- for (int i=0; i < pChannel->GetAudioCount(); i++)
- {
- m_ComboAudio.AddString(pChannel->GetAudio(i)->Language);
- m_audios[i].PID = pChannel->GetAudio(i)-> PID;
- m_audios[i].Type = pChannel->GetAudio(i)->Type;
- m_audios[i].PesType = pChannel->GetAudio(i) -> PesType;
- m_audios[i].Language = pChannel->GetAudio(i) -> Language;
- }
-
- m_ComboAudio.SetCurSel(0); // TODO: managing default languages
+ bool bFound = FALSE;
+ int nCurrentChannel;
+ AppSettings& s = AfxGetAppSettings();
+
+ if (!pChannel)
+ {
+ nCurrentChannel = s.DVBLastChannel;
+ POSITION pos = s.DVBChannels.GetHeadPosition();
+ while (pos && !bFound)
+ {
+ pChannel = &s.DVBChannels.GetNext(pos);
+ if (nCurrentChannel == pChannel->GetPrefNumber())
+ {
+ bFound = TRUE;
+ break;
+ }
+ }
+ }
+
+ m_ComboAudio.ResetContent();
+ for (int i=0; i < pChannel->GetAudioCount(); i++)
+ {
+ m_ComboAudio.AddString(pChannel->GetAudio(i)->Language);
+ m_audios[i].PID = pChannel->GetAudio(i)-> PID;
+ m_audios[i].Type = pChannel->GetAudio(i)->Type;
+ m_audios[i].PesType = pChannel->GetAudio(i) -> PesType;
+ m_audios[i].Language = pChannel->GetAudio(i) -> Language;
+ }
+
+ m_ComboAudio.SetCurSel(0); // TODO: managing default languages
}
void CPlayerNavigationDialog::UpdateElementList()
{
- int nItem;
- int nCurrentChannel;
- AppSettings& s = AfxGetAppSettings();
-
- if (s.iDefaultCaptureDevice == 1)
- {
- m_ChannelList.ResetContent();
-
- nCurrentChannel = s.DVBLastChannel;
-
- POSITION pos = s.DVBChannels.GetHeadPosition();
- while (pos)
- {
- CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
-
- nItem = m_ChannelList.AddString (Channel.GetName());
- if (nItem < MAX_CHANNELS_ALLOWED)
- p_nItems [nItem] = Channel.GetPrefNumber();
- if (nCurrentChannel == Channel.GetPrefNumber())
- {
- m_ChannelList.SetCurSel(nItem);
- SetupAudioSwitcherSubMenu(&Channel);
- }
- }
- }
+ int nItem;
+ int nCurrentChannel;
+ AppSettings& s = AfxGetAppSettings();
+
+ if (s.iDefaultCaptureDevice == 1)
+ {
+ m_ChannelList.ResetContent();
+
+ nCurrentChannel = s.DVBLastChannel;
+
+ POSITION pos = s.DVBChannels.GetHeadPosition();
+ while (pos)
+ {
+ CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
+
+ nItem = m_ChannelList.AddString (Channel.GetName());
+ if (nItem < MAX_CHANNELS_ALLOWED)
+ p_nItems [nItem] = Channel.GetPrefNumber();
+ if (nCurrentChannel == Channel.GetPrefNumber())
+ {
+ m_ChannelList.SetCurSel(nItem);
+ SetupAudioSwitcherSubMenu(&Channel);
+ }
+ }
+ }
}
void CPlayerNavigationDialog::UpdatePos(int nID)
{
- for (int i=0; i < MAX_CHANNELS_ALLOWED; i++)
- {
- if (p_nItems [i] == nID)
- {
- m_ChannelList.SetCurSel(i);
- break;
- }
-
- }
+ for (int i=0; i < MAX_CHANNELS_ALLOWED; i++)
+ {
+ if (p_nItems [i] == nID)
+ {
+ m_ChannelList.SetCurSel(i);
+ break;
+ }
+
+ }
}
void CPlayerNavigationDialog::OnTunerScan()
{
- CWnd* TempWnd;
+ CWnd* TempWnd;
- TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
- static_cast<CMainFrame*> (TempWnd) -> OnTunerScan();
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ static_cast<CMainFrame*> (TempWnd) -> OnTunerScan();
UpdateElementList();
}
void CPlayerNavigationDialog::OnSelChangeComboAudio()
{
- UINT nID;
- CWnd* TempWnd;
+ UINT nID;
+ CWnd* TempWnd;
- nID = m_ComboAudio.GetCurSel() + ID_NAVIGATE_AUDIO_SUBITEM_START;
+ nID = m_ComboAudio.GetCurSel() + ID_NAVIGATE_AUDIO_SUBITEM_START;
- TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
- static_cast<CMainFrame*> (TempWnd) -> OnNavigateAudio(nID);
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ static_cast<CMainFrame*> (TempWnd) -> OnNavigateAudio(nID);
}
void CPlayerNavigationDialog::OnButtonInfo()
{
- // TODO: Retrieve and show channel info
+ // TODO: Retrieve and show channel info
}