diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-09 18:12:59 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-09 18:12:59 +0400 |
commit | efbc9d9043ff8ff92716ddd00a5f61412d535593 (patch) | |
tree | 8f3e621f756cf1f5b4d64d97964c7e7abd8aaf08 /src/apps/mplayerc/PPagePlayback.cpp | |
parent | df6b139a6d9027156f614b68687e039e3a5854db (diff) |
revert r1783
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1785 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PPagePlayback.cpp')
-rw-r--r-- | src/apps/mplayerc/PPagePlayback.cpp | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/src/apps/mplayerc/PPagePlayback.cpp b/src/apps/mplayerc/PPagePlayback.cpp index 6a012c56c..cdacd0a2b 100644 --- a/src/apps/mplayerc/PPagePlayback.cpp +++ b/src/apps/mplayerc/PPagePlayback.cpp @@ -34,20 +34,20 @@ IMPLEMENT_DYNAMIC(CPPagePlayback, CPPageBase)
CPPagePlayback::CPPagePlayback()
- : CPPageBase(CPPagePlayback::IDD, CPPagePlayback::IDD)
- , m_iLoopForever(0)
- , m_nLoops(0)
- , m_fRewind(FALSE)
- , m_iZoomLevel(0)
- , m_iRememberZoomLevel(FALSE)
- , m_nVolume(0)
- , m_nBalance(0)
- , m_fAutoloadAudio(FALSE)
- , m_fAutoloadSubtitles(FALSE)
- , m_fEnableWorkerThreadForOpening(FALSE)
- , m_fReportFailedPins(FALSE)
- , m_subtitlesLanguageOrder(_T(""))
- , m_audiosLanguageOrder(_T(""))
+ : CPPageBase(CPPagePlayback::IDD, CPPagePlayback::IDD)
+ , m_iLoopForever(0)
+ , m_nLoops(0)
+ , m_fRewind(FALSE)
+ , m_iZoomLevel(0)
+ , m_iRememberZoomLevel(FALSE)
+ , m_nVolume(0)
+ , m_nBalance(0)
+ , m_fAutoloadAudio(FALSE)
+ , m_fAutoloadSubtitles(FALSE)
+ , m_fEnableWorkerThreadForOpening(FALSE)
+ , m_fReportFailedPins(FALSE)
+ , m_subtitlesLanguageOrder(_T(""))
+ , m_audiosLanguageOrder(_T(""))
{
}
@@ -57,31 +57,31 @@ CPPagePlayback::~CPPagePlayback() void CPPagePlayback::DoDataExchange(CDataExchange* pDX)
{
- __super::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_SLIDER1, m_volumectrl);
- DDX_Control(pDX, IDC_SLIDER2, m_balancectrl);
- DDX_Slider(pDX, IDC_SLIDER1, m_nVolume);
- DDX_Slider(pDX, IDC_SLIDER2, m_nBalance);
- DDX_Radio(pDX, IDC_RADIO1, m_iLoopForever);
- DDX_Control(pDX, IDC_EDIT1, m_loopnumctrl);
- DDX_Text(pDX, IDC_EDIT1, m_nLoops);
- DDX_Check(pDX, IDC_CHECK1, m_fRewind);
- DDX_CBIndex(pDX, IDC_COMBO1, m_iZoomLevel);
- DDX_Check(pDX, IDC_CHECK5, m_iRememberZoomLevel);
- DDX_Check(pDX, IDC_CHECK2, m_fAutoloadAudio);
- DDX_Check(pDX, IDC_CHECK3, m_fAutoloadSubtitles);
- DDX_Check(pDX, IDC_CHECK7, m_fEnableWorkerThreadForOpening);
- DDX_Check(pDX, IDC_CHECK6, m_fReportFailedPins);
- DDX_Text(pDX, IDC_EDIT2, m_subtitlesLanguageOrder);
- DDX_Text(pDX, IDC_EDIT3, m_audiosLanguageOrder);
+ __super::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_SLIDER1, m_volumectrl);
+ DDX_Control(pDX, IDC_SLIDER2, m_balancectrl);
+ DDX_Slider(pDX, IDC_SLIDER1, m_nVolume);
+ DDX_Slider(pDX, IDC_SLIDER2, m_nBalance);
+ DDX_Radio(pDX, IDC_RADIO1, m_iLoopForever);
+ DDX_Control(pDX, IDC_EDIT1, m_loopnumctrl);
+ DDX_Text(pDX, IDC_EDIT1, m_nLoops);
+ DDX_Check(pDX, IDC_CHECK1, m_fRewind);
+ DDX_CBIndex(pDX, IDC_COMBO1, m_iZoomLevel);
+ DDX_Check(pDX, IDC_CHECK5, m_iRememberZoomLevel);
+ DDX_Check(pDX, IDC_CHECK2, m_fAutoloadAudio);
+ DDX_Check(pDX, IDC_CHECK3, m_fAutoloadSubtitles);
+ DDX_Check(pDX, IDC_CHECK7, m_fEnableWorkerThreadForOpening);
+ DDX_Check(pDX, IDC_CHECK6, m_fReportFailedPins);
+ DDX_Text(pDX, IDC_EDIT2, m_subtitlesLanguageOrder);
+ DDX_Text(pDX, IDC_EDIT3, m_audiosLanguageOrder);
}
BEGIN_MESSAGE_MAP(CPPagePlayback, CPPageBase)
- ON_WM_HSCROLL()
- ON_CONTROL_RANGE(BN_CLICKED, IDC_RADIO1, IDC_RADIO2, OnBnClickedRadio12)
- ON_UPDATE_COMMAND_UI(IDC_EDIT1, OnUpdateLoopNum)
- ON_UPDATE_COMMAND_UI(IDC_STATIC1, OnUpdateLoopNum)
- ON_UPDATE_COMMAND_UI(IDC_COMBO1, OnUpdateAutoZoomCombo)
+ ON_WM_HSCROLL()
+ ON_CONTROL_RANGE(BN_CLICKED, IDC_RADIO1, IDC_RADIO2, OnBnClickedRadio12)
+ ON_UPDATE_COMMAND_UI(IDC_EDIT1, OnUpdateLoopNum)
+ ON_UPDATE_COMMAND_UI(IDC_STATIC1, OnUpdateLoopNum)
+ ON_UPDATE_COMMAND_UI(IDC_COMBO1, OnUpdateAutoZoomCombo)
END_MESSAGE_MAP()
@@ -89,98 +89,98 @@ END_MESSAGE_MAP() BOOL CPPagePlayback::OnInitDialog()
{
- __super::OnInitDialog();
-
- SetHandCursor(m_hWnd, IDC_COMBO1);
-
- AppSettings& s = AfxGetAppSettings();
-
- m_volumectrl.SetRange(1, 100);
- m_volumectrl.SetTicFreq(10);
- m_balancectrl.SetRange(0, 200);
- m_balancectrl.SetTicFreq(20);
- m_nVolume = s.nVolume;
- m_nBalance = s.nBalance + 100;
- m_iLoopForever = s.fLoopForever ? 1 : 0;
- m_nLoops = s.nLoops;
- m_fRewind = s.fRewind;
- m_iZoomLevel = s.iZoomLevel;
- m_iRememberZoomLevel = s.fRememberZoomLevel;
- m_fAutoloadAudio = s.fAutoloadAudio;
- m_fAutoloadSubtitles = s.fAutoloadSubtitles;
- m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
- m_fReportFailedPins = s.fReportFailedPins;
- m_subtitlesLanguageOrder = s.m_subtitlesLanguageOrder;
- m_audiosLanguageOrder = s.m_audiosLanguageOrder;
-
- UpdateData(FALSE);
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
+ __super::OnInitDialog();
+
+ SetHandCursor(m_hWnd, IDC_COMBO1);
+
+ AppSettings& s = AfxGetAppSettings();
+
+ m_volumectrl.SetRange(1, 100);
+ m_volumectrl.SetTicFreq(10);
+ m_balancectrl.SetRange(0, 200);
+ m_balancectrl.SetTicFreq(20);
+ m_nVolume = s.nVolume;
+ m_nBalance = s.nBalance+100;
+ m_iLoopForever = s.fLoopForever?1:0;
+ m_nLoops = s.nLoops;
+ m_fRewind = s.fRewind;
+ m_iZoomLevel = s.iZoomLevel;
+ m_iRememberZoomLevel = s.fRememberZoomLevel;
+ m_fAutoloadAudio = s.fAutoloadAudio;
+ m_fAutoloadSubtitles = s.fAutoloadSubtitles;
+ m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
+ m_fReportFailedPins = s.fReportFailedPins;
+ m_subtitlesLanguageOrder = s.m_subtitlesLanguageOrder;
+ m_audiosLanguageOrder = s.m_audiosLanguageOrder;
+
+ UpdateData(FALSE);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CPPagePlayback::OnApply()
{
- UpdateData();
-
- AppSettings& s = AfxGetAppSettings();
-
- s.nVolume = m_nVolume;
- s.nBalance = m_nBalance - 100;
- s.fLoopForever = !!m_iLoopForever;
- s.nLoops = m_nLoops;
- s.fRewind = !!m_fRewind;
- s.iZoomLevel = m_iZoomLevel;
- s.fRememberZoomLevel = !!m_iRememberZoomLevel;
- s.fAutoloadAudio = !!m_fAutoloadAudio;
- s.fAutoloadSubtitles = !!m_fAutoloadSubtitles;
- s.fEnableWorkerThreadForOpening = !!m_fEnableWorkerThreadForOpening;
- s.fReportFailedPins = !!m_fReportFailedPins;
- s.m_subtitlesLanguageOrder = m_subtitlesLanguageOrder;
- s.m_audiosLanguageOrder = m_audiosLanguageOrder;
-
- return __super::OnApply();
+ UpdateData();
+
+ AppSettings& s = AfxGetAppSettings();
+
+ s.nVolume = m_nVolume;
+ s.nBalance = m_nBalance-100;
+ s.fLoopForever = !!m_iLoopForever;
+ s.nLoops = m_nLoops;
+ s.fRewind = !!m_fRewind;
+ s.iZoomLevel = m_iZoomLevel;
+ s.fRememberZoomLevel = !!m_iRememberZoomLevel;
+ s.fAutoloadAudio = !!m_fAutoloadAudio;
+ s.fAutoloadSubtitles = !!m_fAutoloadSubtitles;
+ s.fEnableWorkerThreadForOpening = !!m_fEnableWorkerThreadForOpening;
+ s.fReportFailedPins = !!m_fReportFailedPins;
+ s.m_subtitlesLanguageOrder = m_subtitlesLanguageOrder;
+ s.m_audiosLanguageOrder = m_audiosLanguageOrder;
+
+ return __super::OnApply();
}
LRESULT CPPagePlayback::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
- if(message == WM_HSCROLL || message == WM_VSCROLL)
- {
- SetModified();
- }
+ if(message == WM_HSCROLL || message == WM_VSCROLL)
+ {
+ SetModified();
+ }
- return __super::DefWindowProc(message, wParam, lParam);
+ return __super::DefWindowProc(message, wParam, lParam);
}
void CPPagePlayback::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
- if(*pScrollBar == m_volumectrl)
- {
- UpdateData();
- ((CMainFrame*)GetParentFrame())->m_wndToolBar.Volume = m_nVolume; // nice shortcut...
- }
- else if(*pScrollBar == m_balancectrl)
- {
- UpdateData();
- ((CMainFrame*)GetParentFrame())->SetBalance(m_nBalance - 100); // see prev note...
- }
-
- SetModified();
-
- __super::OnHScroll(nSBCode, nPos, pScrollBar);
+ if(*pScrollBar == m_volumectrl)
+ {
+ UpdateData();
+ ((CMainFrame*)GetParentFrame())->m_wndToolBar.Volume = m_nVolume; // nice shortcut...
+ }
+ else if(*pScrollBar == m_balancectrl)
+ {
+ UpdateData();
+ ((CMainFrame*)GetParentFrame())->SetBalance(m_nBalance-100); // see prev note...
+ }
+
+ SetModified();
+
+ __super::OnHScroll(nSBCode, nPos, pScrollBar);
}
void CPPagePlayback::OnBnClickedRadio12(UINT nID)
{
- SetModified();
+ SetModified();
}
void CPPagePlayback::OnUpdateLoopNum(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(!!IsDlgButtonChecked(IDC_RADIO1));
+ pCmdUI->Enable(!!IsDlgButtonChecked(IDC_RADIO1));
}
void CPPagePlayback::OnUpdateAutoZoomCombo(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK5));
+ pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK5));
}
|