diff options
Diffstat (limited to 'src/apps/mplayerc/PPagePlayer.cpp')
-rw-r--r-- | src/apps/mplayerc/PPagePlayer.cpp | 220 |
1 files changed, 110 insertions, 110 deletions
diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index cd34abf67..22baa4afc 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -31,23 +31,23 @@ IMPLEMENT_DYNAMIC(CPPagePlayer, CPPageBase)
CPPagePlayer::CPPagePlayer()
- : CPPageBase(CPPagePlayer::IDD, CPPagePlayer::IDD)
- , m_iAllowMultipleInst(0)
- , m_iAlwaysOnTop(FALSE)
- , m_fTrayIcon(FALSE)
- , m_iTitleBarTextStyle(0)
- , m_bTitleBarTextTitle(0)
- , m_fRememberWindowPos(FALSE)
- , m_fRememberWindowSize(FALSE)
- , m_fSnapToDesktopEdges(FALSE)
- , m_fUseIni(FALSE)
- , m_fKeepHistory(FALSE)
- , m_fHideCDROMsSubMenu(FALSE)
- , m_priority(FALSE)
- , m_fShowOSD(FALSE)
- , m_fLimitWindowProportions(TRUE)
- , m_fRememberDVDPos(FALSE)
- , m_fRememberFilePos(FALSE)
+ : CPPageBase(CPPagePlayer::IDD, CPPagePlayer::IDD)
+ , m_iAllowMultipleInst(0)
+ , m_iAlwaysOnTop(FALSE)
+ , m_fTrayIcon(FALSE)
+ , m_iTitleBarTextStyle(0)
+ , m_bTitleBarTextTitle(0)
+ , m_fRememberWindowPos(FALSE)
+ , m_fRememberWindowSize(FALSE)
+ , m_fSnapToDesktopEdges(FALSE)
+ , m_fUseIni(FALSE)
+ , m_fKeepHistory(FALSE)
+ , m_fHideCDROMsSubMenu(FALSE)
+ , m_priority(FALSE)
+ , m_fShowOSD(FALSE)
+ , m_fLimitWindowProportions(TRUE)
+ , m_fRememberDVDPos(FALSE)
+ , m_fRememberFilePos(FALSE)
{
}
@@ -57,126 +57,126 @@ CPPagePlayer::~CPPagePlayer() void CPPagePlayer::DoDataExchange(CDataExchange* pDX)
{
- __super::DoDataExchange(pDX);
- DDX_Radio(pDX, IDC_RADIO1, m_iAllowMultipleInst);
- DDX_Radio(pDX, IDC_RADIO3, m_iTitleBarTextStyle);
- DDX_Check(pDX, IDC_CHECK13, m_bTitleBarTextTitle);
- DDX_Check(pDX, IDC_CHECK2, m_iAlwaysOnTop);
- DDX_Check(pDX, IDC_CHECK3, m_fTrayIcon);
- DDX_Check(pDX, IDC_CHECK6, m_fRememberWindowPos);
- DDX_Check(pDX, IDC_CHECK7, m_fRememberWindowSize);
- DDX_Check(pDX, IDC_CHECK12, m_fSnapToDesktopEdges);
- DDX_Check(pDX, IDC_CHECK8, m_fUseIni);
- DDX_Check(pDX, IDC_CHECK1, m_fKeepHistory);
- DDX_Check(pDX, IDC_CHECK10, m_fHideCDROMsSubMenu);
- DDX_Check(pDX, IDC_CHECK9, m_priority);
- DDX_Check(pDX, IDC_SHOW_OSD, m_fShowOSD);
- DDX_Check(pDX, IDC_CHECK4, m_fLimitWindowProportions);
- DDX_Check(pDX, IDC_DVD_POS, m_fRememberDVDPos);
- DDX_Check(pDX, IDC_FILE_POS, m_fRememberFilePos);
+ __super::DoDataExchange(pDX);
+ DDX_Radio(pDX, IDC_RADIO1, m_iAllowMultipleInst);
+ DDX_Radio(pDX, IDC_RADIO3, m_iTitleBarTextStyle);
+ DDX_Check(pDX, IDC_CHECK13, m_bTitleBarTextTitle);
+ DDX_Check(pDX, IDC_CHECK2, m_iAlwaysOnTop);
+ DDX_Check(pDX, IDC_CHECK3, m_fTrayIcon);
+ DDX_Check(pDX, IDC_CHECK6, m_fRememberWindowPos);
+ DDX_Check(pDX, IDC_CHECK7, m_fRememberWindowSize);
+ DDX_Check(pDX, IDC_CHECK12, m_fSnapToDesktopEdges);
+ DDX_Check(pDX, IDC_CHECK8, m_fUseIni);
+ DDX_Check(pDX, IDC_CHECK1, m_fKeepHistory);
+ DDX_Check(pDX, IDC_CHECK10, m_fHideCDROMsSubMenu);
+ DDX_Check(pDX, IDC_CHECK9, m_priority);
+ DDX_Check(pDX, IDC_SHOW_OSD, m_fShowOSD);
+ DDX_Check(pDX, IDC_CHECK4, m_fLimitWindowProportions);
+ DDX_Check(pDX, IDC_DVD_POS, m_fRememberDVDPos);
+ DDX_Check(pDX, IDC_FILE_POS, m_fRememberFilePos);
}
BEGIN_MESSAGE_MAP(CPPagePlayer, CPPageBase)
- ON_BN_CLICKED(IDC_CHECK8, OnBnClickedCheck8)
- ON_UPDATE_COMMAND_UI(IDC_CHECK13, OnUpdateCheck13)
- ON_UPDATE_COMMAND_UI(IDC_DVD_POS, OnUpdatePos)
- ON_UPDATE_COMMAND_UI(IDC_FILE_POS, OnUpdatePos)
+ ON_BN_CLICKED(IDC_CHECK8, OnBnClickedCheck8)
+ ON_UPDATE_COMMAND_UI(IDC_CHECK13, OnUpdateCheck13)
+ ON_UPDATE_COMMAND_UI(IDC_DVD_POS, OnUpdatePos)
+ ON_UPDATE_COMMAND_UI(IDC_FILE_POS, OnUpdatePos)
END_MESSAGE_MAP()
// CPPagePlayer message handlers
BOOL CPPagePlayer::OnInitDialog()
{
- __super::OnInitDialog();
-
- AppSettings& s = AfxGetAppSettings();
-
- m_iAllowMultipleInst = s.fAllowMultipleInst;
- m_iTitleBarTextStyle = s.iTitleBarTextStyle;
- m_bTitleBarTextTitle = s.fTitleBarTextTitle;
- m_iAlwaysOnTop = s.iOnTop;
- m_fTrayIcon = s.fTrayIcon;
- m_fRememberWindowPos = s.fRememberWindowPos;
- m_fRememberWindowSize = s.fRememberWindowSize;
- m_fSnapToDesktopEdges = s.fSnapToDesktopEdges;
- m_fUseIni = ((CMPlayerCApp*)AfxGetApp())->IsIniValid();
- m_fKeepHistory = s.fKeepHistory;
- m_fHideCDROMsSubMenu = s.fHideCDROMsSubMenu;
- m_priority = s.priority != NORMAL_PRIORITY_CLASS;
- m_fShowOSD = s.fShowOSD;
- m_fRememberDVDPos = s.fRememberDVDPos;
- m_fRememberFilePos = s.fRememberFilePos;
- m_fLimitWindowProportions = s.fLimitWindowProportions;
-
- UpdateData(FALSE);
-
- GetDlgItem(IDC_FILE_POS)->EnableWindow(s.fKeepHistory);
- GetDlgItem(IDC_DVD_POS)->EnableWindow(s.fKeepHistory);
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
+ __super::OnInitDialog();
+
+ AppSettings& s = AfxGetAppSettings();
+
+ m_iAllowMultipleInst = s.fAllowMultipleInst;
+ m_iTitleBarTextStyle = s.iTitleBarTextStyle;
+ m_bTitleBarTextTitle = s.fTitleBarTextTitle;
+ m_iAlwaysOnTop = s.iOnTop;
+ m_fTrayIcon = s.fTrayIcon;
+ m_fRememberWindowPos = s.fRememberWindowPos;
+ m_fRememberWindowSize = s.fRememberWindowSize;
+ m_fSnapToDesktopEdges = s.fSnapToDesktopEdges;
+ m_fUseIni = ((CMPlayerCApp*)AfxGetApp())->IsIniValid();
+ m_fKeepHistory = s.fKeepHistory;
+ m_fHideCDROMsSubMenu = s.fHideCDROMsSubMenu;
+ m_priority = s.priority != NORMAL_PRIORITY_CLASS;
+ m_fShowOSD = s.fShowOSD;
+ m_fRememberDVDPos = s.fRememberDVDPos;
+ m_fRememberFilePos = s.fRememberFilePos;
+ m_fLimitWindowProportions = s.fLimitWindowProportions;
+
+ UpdateData(FALSE);
+
+ GetDlgItem(IDC_FILE_POS)->EnableWindow(s.fKeepHistory);
+ GetDlgItem(IDC_DVD_POS)->EnableWindow(s.fKeepHistory);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CPPagePlayer::OnApply()
{
- UpdateData();
-
- AppSettings& s = AfxGetAppSettings();
-
- s.fAllowMultipleInst = !!m_iAllowMultipleInst;
- s.iTitleBarTextStyle = m_iTitleBarTextStyle;
- s.fTitleBarTextTitle = !!m_bTitleBarTextTitle;
- s.iOnTop = m_iAlwaysOnTop;
- s.fTrayIcon = !!m_fTrayIcon;
- s.fRememberWindowPos = !!m_fRememberWindowPos;
- s.fRememberWindowSize = !!m_fRememberWindowSize;
- s.fSnapToDesktopEdges = !!m_fSnapToDesktopEdges;
- s.fKeepHistory = !!m_fKeepHistory;
- s.fHideCDROMsSubMenu = !!m_fHideCDROMsSubMenu;
- s.priority = !m_priority ? NORMAL_PRIORITY_CLASS : GetVersion() < 0 ? HIGH_PRIORITY_CLASS : ABOVE_NORMAL_PRIORITY_CLASS;
- s.fShowOSD = !!m_fShowOSD;
- s.fLimitWindowProportions = !!m_fLimitWindowProportions;
- s.fRememberDVDPos = m_fRememberDVDPos ? true : false;
- s.fRememberFilePos = m_fRememberFilePos ? true : false;
-
- if(!m_fKeepHistory)
- {
- for(int i = 0; i < s.MRU.GetSize(); i++) s.MRU.Remove(i);
- for(int i = 0; i < s.MRUDub.GetSize(); i++) s.MRUDub.Remove(i);
- s.MRU.WriteList();
- s.MRUDub.WriteList();
- }
-
- ((CMainFrame*)AfxGetMainWnd())->ShowTrayIcon(s.fTrayIcon);
-
- ::SetPriorityClass(::GetCurrentProcess(), s.priority);
-
- GetDlgItem(IDC_FILE_POS)->EnableWindow(s.fKeepHistory);
- GetDlgItem(IDC_DVD_POS)->EnableWindow(s.fKeepHistory);
-
- return __super::OnApply();
+ UpdateData();
+
+ AppSettings& s = AfxGetAppSettings();
+
+ s.fAllowMultipleInst = !!m_iAllowMultipleInst;
+ s.iTitleBarTextStyle = m_iTitleBarTextStyle;
+ s.fTitleBarTextTitle = !!m_bTitleBarTextTitle;
+ s.iOnTop = m_iAlwaysOnTop;
+ s.fTrayIcon = !!m_fTrayIcon;
+ s.fRememberWindowPos = !!m_fRememberWindowPos;
+ s.fRememberWindowSize = !!m_fRememberWindowSize;
+ s.fSnapToDesktopEdges = !!m_fSnapToDesktopEdges;
+ s.fKeepHistory = !!m_fKeepHistory;
+ s.fHideCDROMsSubMenu = !!m_fHideCDROMsSubMenu;
+ s.priority = !m_priority ? NORMAL_PRIORITY_CLASS : GetVersion() < 0 ? HIGH_PRIORITY_CLASS : ABOVE_NORMAL_PRIORITY_CLASS;
+ s.fShowOSD = !!m_fShowOSD;
+ s.fLimitWindowProportions = !!m_fLimitWindowProportions;
+ s.fRememberDVDPos = m_fRememberDVDPos ? true : false;
+ s.fRememberFilePos = m_fRememberFilePos ? true : false;
+
+ if(!m_fKeepHistory)
+ {
+ for(int i = 0; i < s.MRU.GetSize(); i++) s.MRU.Remove(i);
+ for(int i = 0; i < s.MRUDub.GetSize(); i++) s.MRUDub.Remove(i);
+ s.MRU.WriteList();
+ s.MRUDub.WriteList();
+ }
+
+ ((CMainFrame*)AfxGetMainWnd())->ShowTrayIcon(s.fTrayIcon);
+
+ ::SetPriorityClass(::GetCurrentProcess(), s.priority);
+
+ GetDlgItem(IDC_FILE_POS)->EnableWindow(s.fKeepHistory);
+ GetDlgItem(IDC_DVD_POS)->EnableWindow(s.fKeepHistory);
+
+ return __super::OnApply();
}
void CPPagePlayer::OnBnClickedCheck8()
{
- UpdateData();
+ UpdateData();
- if(m_fUseIni) ((CMPlayerCApp*)AfxGetApp())->StoreSettingsToIni();
- else ((CMPlayerCApp*)AfxGetApp())->StoreSettingsToRegistry();
+ if(m_fUseIni) ((CMPlayerCApp*)AfxGetApp())->StoreSettingsToIni();
+ else ((CMPlayerCApp*)AfxGetApp())->StoreSettingsToRegistry();
- SetModified();
+ SetModified();
}
void CPPagePlayer::OnUpdateCheck13(CCmdUI* pCmdUI)
{
- UpdateData();
+ UpdateData();
- pCmdUI->Enable(m_iTitleBarTextStyle == 1);
+ pCmdUI->Enable(m_iTitleBarTextStyle == 1);
}
void CPPagePlayer::OnUpdatePos(CCmdUI* pCmdUI)
{
- UpdateData();
+ UpdateData();
- pCmdUI->Enable( !!m_fKeepHistory );
+ pCmdUI->Enable( !!m_fKeepHistory );
}
|