diff options
author | Underground78 <underground78@users.sourceforge.net> | 2012-04-07 12:41:16 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2012-04-07 12:41:16 +0400 |
commit | 143411d2514d227fad77e565b3f26bf0fd635e49 (patch) | |
tree | 4a62f3c6bbc784e74cb48142bc33b470841161d3 /src | |
parent | 70f3eeeeb1064092857ac492ac8947d50b743f38 (diff) |
Fix: The settings location is now changed only when applying the changes in the options dialog instead of immediately after changing the state of the checkbox.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4275 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/apps/mplayerc/PPagePlayer.cpp | 19 | ||||
-rw-r--r-- | src/apps/mplayerc/PPagePlayer.h | 1 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index 5ddb805c5..9e86be926 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -79,7 +79,6 @@ void CPPagePlayer::DoDataExchange(CDataExchange* pDX) }
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)
@@ -102,7 +101,7 @@ BOOL CPPagePlayer::OnInitDialog() m_fRememberWindowSize = s.fRememberWindowSize;
m_fSavePnSZoom = s.fSavePnSZoom;
m_fSnapToDesktopEdges = s.fSnapToDesktopEdges;
- m_fUseIni = ((CMPlayerCApp*)AfxGetApp())->IsIniValid();
+ m_fUseIni = AfxGetMyApp()->IsIniValid();
m_fKeepHistory = s.fKeepHistory;
m_fHideCDROMsSubMenu = s.fHideCDROMsSubMenu;
m_priority = s.dwPriority != NORMAL_PRIORITY_CLASS;
@@ -154,6 +153,11 @@ BOOL CPPagePlayer::OnApply() s.MRUDub.WriteList();
}
+ // Check if the settings location need to be changed
+ if (AfxGetMyApp()->IsIniValid() != !!m_fUseIni) {
+ AfxGetMyApp()->ChangeSettingsLocation(!!m_fUseIni);
+ }
+
((CMainFrame*)AfxGetMainWnd())->ShowTrayIcon(s.fTrayIcon);
::SetPriorityClass(::GetCurrentProcess(), s.dwPriority);
@@ -164,15 +168,6 @@ BOOL CPPagePlayer::OnApply() return __super::OnApply();
}
-void CPPagePlayer::OnBnClickedCheck8()
-{
- UpdateData();
-
- AfxGetMyApp()->ChangeSettingsLocation(!!m_fUseIni);
-
- SetModified();
-}
-
void CPPagePlayer::OnUpdateCheck13(CCmdUI* pCmdUI)
{
UpdateData();
@@ -184,5 +179,5 @@ void CPPagePlayer::OnUpdatePos(CCmdUI* pCmdUI) {
UpdateData();
- pCmdUI->Enable( !!m_fKeepHistory );
+ pCmdUI->Enable(!!m_fKeepHistory);
}
diff --git a/src/apps/mplayerc/PPagePlayer.h b/src/apps/mplayerc/PPagePlayer.h index 03ad72e68..a778fa578 100644 --- a/src/apps/mplayerc/PPagePlayer.h +++ b/src/apps/mplayerc/PPagePlayer.h @@ -65,7 +65,6 @@ protected: DECLARE_MESSAGE_MAP()
public:
- afx_msg void OnBnClickedCheck8();
afx_msg void OnUpdateTimeout(CCmdUI* pCmdUI);
afx_msg void OnUpdateCheck13(CCmdUI* pCmdUI);
afx_msg void OnUpdatePos(CCmdUI* pCmdUI);
|