X64 transport [Part 5] (Update plugins.cpp)
[xy_vsfilter.git] / src / apps / mplayerc / PPageTweaks.cpp
blob9bad729c6b8ee19dd04d8eee74870ca20a9c2828
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 // PPageTweaks.cpp : implementation file
25 #include "stdafx.h"
26 #include "mplayerc.h"
27 #include "PPageTweaks.h"
29 // CPPageTweaks dialog
31 IMPLEMENT_DYNAMIC(CPPageTweaks, CPPageBase)
32 CPPageTweaks::CPPageTweaks()
33 : CPPageBase(CPPageTweaks::IDD, CPPageTweaks::IDD)
34 , m_fDisabeXPToolbars(FALSE)
35 , m_fUseWMASFReader(FALSE)
36 , m_nJumpDistS(0)
37 , m_nJumpDistM(0)
38 , m_nJumpDistL(0)
39 , m_fFreeWindowResizing(TRUE)
40 , m_fNotifyMSN(TRUE)
41 , m_fNotifyGTSdll(FALSE)
42 , m_GTSdllLink(_T("https://sourceforge.net/project/showfiles.php?group_id=82303&package_id=169521&release_id=371114"))
44 m_fWMASFReader = SUCCEEDED(CComPtr<IBaseFilter>().CoCreateInstance(
45 GUIDFromCString(_T("{187463A0-5BB7-11D3-ACBE-0080C75E246E}")))); // WM ASF Reader
48 CPPageTweaks::~CPPageTweaks()
52 void CPPageTweaks::DoDataExchange(CDataExchange* pDX)
54 __super::DoDataExchange(pDX);
55 DDX_Check(pDX, IDC_CHECK3, m_fDisabeXPToolbars);
56 DDX_Control(pDX, IDC_CHECK3, m_fDisabeXPToolbarsCtrl);
57 DDX_Check(pDX, IDC_CHECK2, m_fUseWMASFReader);
58 DDX_Control(pDX, IDC_CHECK2, m_fUseWMASFReaderCtrl);
59 DDX_Text(pDX, IDC_EDIT1, m_nJumpDistS);
60 DDX_Text(pDX, IDC_EDIT2, m_nJumpDistM);
61 DDX_Text(pDX, IDC_EDIT3, m_nJumpDistL);
62 DDX_Check(pDX, IDC_CHECK1, m_fFreeWindowResizing);
63 DDX_Check(pDX, IDC_CHECK4, m_fNotifyMSN);
64 DDX_Check(pDX, IDC_CHECK5, m_fNotifyGTSdll);
65 DDX_Control(pDX, IDC_STATICLINKGTS, m_GTSdllLink);
68 BOOL CPPageTweaks::OnInitDialog()
70 __super::OnInitDialog();
72 AppSettings& s = AfxGetAppSettings();
74 m_fDisabeXPToolbars = s.fDisabeXPToolbars;
75 m_fUseWMASFReader = s.fUseWMASFReader;
76 m_nJumpDistS = s.nJumpDistS;
77 m_nJumpDistM = s.nJumpDistM;
78 m_nJumpDistL = s.nJumpDistL;
79 m_fFreeWindowResizing = s.fFreeWindowResizing;
80 m_fNotifyMSN = s.fNotifyMSN;
81 m_fNotifyGTSdll = s.fNotifyGTSdll;
83 UpdateData(FALSE);
85 return TRUE; // return TRUE unless you set the focus to a control
86 // EXCEPTION: OCX Property Pages should return FALSE
89 BOOL CPPageTweaks::OnApply()
91 UpdateData();
93 AppSettings& s = AfxGetAppSettings();
95 s.fDisabeXPToolbars = !!m_fDisabeXPToolbars;
96 s.fUseWMASFReader = !!m_fUseWMASFReader;
97 s.nJumpDistS = m_nJumpDistS;
98 s.nJumpDistM = m_nJumpDistM;
99 s.nJumpDistL = m_nJumpDistL;
100 s.fFreeWindowResizing = !!m_fFreeWindowResizing;
101 s.fNotifyMSN = !!m_fNotifyMSN;
102 s.fNotifyGTSdll = !!m_fNotifyGTSdll;
104 return __super::OnApply();
107 BEGIN_MESSAGE_MAP(CPPageTweaks, CPPageBase)
108 ON_UPDATE_COMMAND_UI(IDC_CHECK3, OnUpdateCheck3)
109 ON_UPDATE_COMMAND_UI(IDC_CHECK2, OnUpdateCheck2)
110 ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
111 END_MESSAGE_MAP()
114 // CPPageTweaks message handlers
116 void CPPageTweaks::OnUpdateCheck3(CCmdUI* pCmdUI)
118 if(!AfxGetAppSettings().fXpOrBetter)
120 pCmdUI->Enable(FALSE);
121 pCmdUI->SetCheck(TRUE);
125 void CPPageTweaks::OnUpdateCheck2(CCmdUI* pCmdUI)
127 pCmdUI->Enable(m_fWMASFReader);
130 void CPPageTweaks::OnBnClickedButton1()
132 m_nJumpDistS = 1000;
133 m_nJumpDistM = 5000;
134 m_nJumpDistL = 20000;
136 UpdateData(FALSE);