diff options
author | sansnom05 <sansnom05@users.sourceforge.net> | 2010-09-27 21:20:57 +0400 |
---|---|---|
committer | sansnom05 <sansnom05@users.sourceforge.net> | 2010-09-27 21:20:57 +0400 |
commit | a778936d9d767e2cb2c412bdd3dacfce6518e0f5 (patch) | |
tree | 9d61a6c72664c9f5c5e7433e22b2fa19fd570a15 /src/apps | |
parent | 38c27a61cd8600ada471d1dde5013c167e63a081 (diff) |
fixed: "Remember last window size" and "Auto-zoom" should not be enabled at same time
This commit fixes ticket #293 678
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2637 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps')
-rw-r--r-- | src/apps/mplayerc/PPagePlayback.cpp | 18 | ||||
-rw-r--r-- | src/apps/mplayerc/PPagePlayback.h | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/PPagePlayer.cpp | 18 | ||||
-rw-r--r-- | src/apps/mplayerc/PPagePlayer.h | 2 |
4 files changed, 40 insertions, 0 deletions
diff --git a/src/apps/mplayerc/PPagePlayback.cpp b/src/apps/mplayerc/PPagePlayback.cpp index cdacd0a2b..ca1f25c9d 100644 --- a/src/apps/mplayerc/PPagePlayback.cpp +++ b/src/apps/mplayerc/PPagePlayback.cpp @@ -184,3 +184,21 @@ void CPPagePlayback::OnUpdateAutoZoomCombo(CCmdUI* pCmdUI) {
pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK5));
}
+
+BOOL CPPagePlayback::OnSetActive()
+{
+ AppSettings& s = AfxGetAppSettings();
+ m_iRememberZoomLevel = !!s.fRememberZoomLevel;
+ UpdateData(FALSE);
+
+ return __super::OnSetActive();
+}
+
+BOOL CPPagePlayback::OnKillActive()
+{
+ AppSettings& s = AfxGetAppSettings();
+ if(s.fRememberZoomLevel)
+ s.fRememberWindowSize = false;
+
+ return __super::OnKillActive();
+}
\ No newline at end of file diff --git a/src/apps/mplayerc/PPagePlayback.h b/src/apps/mplayerc/PPagePlayback.h index 4bb147491..4232d3140 100644 --- a/src/apps/mplayerc/PPagePlayback.h +++ b/src/apps/mplayerc/PPagePlayback.h @@ -62,6 +62,8 @@ public: protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
+ virtual BOOL OnSetActive();
+ virtual BOOL OnKillActive();
virtual BOOL OnApply();
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index 22baa4afc..a64e6b202 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -180,3 +180,21 @@ void CPPagePlayer::OnUpdatePos(CCmdUI* pCmdUI) pCmdUI->Enable( !!m_fKeepHistory );
}
+
+BOOL CPPagePlayer::OnSetActive()
+{
+ AppSettings& s = AfxGetAppSettings();
+ m_fRememberWindowSize = !!s.fRememberWindowSize;
+ UpdateData(FALSE);
+
+ return __super::OnSetActive();
+}
+
+BOOL CPPagePlayer::OnKillActive()
+{
+ AppSettings& s = AfxGetAppSettings();
+ if(s.fRememberWindowSize)
+ s.fRememberZoomLevel = false;
+
+ return __super::OnKillActive();
+}
\ No newline at end of file diff --git a/src/apps/mplayerc/PPagePlayer.h b/src/apps/mplayerc/PPagePlayer.h index dd1f77ee0..475060b8e 100644 --- a/src/apps/mplayerc/PPagePlayer.h +++ b/src/apps/mplayerc/PPagePlayer.h @@ -59,6 +59,8 @@ public: protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
+ virtual BOOL OnSetActive();
+ virtual BOOL OnKillActive();
virtual BOOL OnApply();
DECLARE_MESSAGE_MAP()
|