diff options
author | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-19 00:29:12 +0400 |
---|---|---|
committer | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-19 00:29:12 +0400 |
commit | b072e90c262fef233872e34f93bf298ce0d1fa03 (patch) | |
tree | ee8fd84e6d0e594d6e884e8be7e31d2c24be47fe /src/apps/mplayerc/PPageTweaks.cpp | |
parent | 5215e9e5c05dcfc26b4314a2b52966cbcea5306f (diff) |
Style patch part1. based on newly released astyle 1.24.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1790 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PPageTweaks.cpp')
-rw-r--r-- | src/apps/mplayerc/PPageTweaks.cpp | 254 |
1 files changed, 127 insertions, 127 deletions
diff --git a/src/apps/mplayerc/PPageTweaks.cpp b/src/apps/mplayerc/PPageTweaks.cpp index 164b7a6fa..e071a2f35 100644 --- a/src/apps/mplayerc/PPageTweaks.cpp +++ b/src/apps/mplayerc/PPageTweaks.cpp @@ -31,22 +31,22 @@ IMPLEMENT_DYNAMIC(CPPageTweaks, CPPageBase)
CPPageTweaks::CPPageTweaks()
- : CPPageBase(CPPageTweaks::IDD, CPPageTweaks::IDD)
- , m_fDisableXPToolbars(FALSE)
- , m_fUseWMASFReader(FALSE)
- , m_nJumpDistS(0)
- , m_nJumpDistM(0)
- , m_nJumpDistL(0)
- , m_OSD_Size(0)
- , m_fNotifyMSN(TRUE)
- , m_fNotifyGTSdll(FALSE)
- , m_GTSdllLink(_T("https://sourceforge.net/project/showfiles.php?group_id=82303&package_id=169521&release_id=371114"))
- , m_fPreventMinimize(FALSE)
- , m_fUseWin7TaskBar(TRUE)
- , m_fDontUseSearchInFolder(FALSE)
+ : CPPageBase(CPPageTweaks::IDD, CPPageTweaks::IDD)
+ , m_fDisableXPToolbars(FALSE)
+ , m_fUseWMASFReader(FALSE)
+ , m_nJumpDistS(0)
+ , m_nJumpDistM(0)
+ , m_nJumpDistL(0)
+ , m_OSD_Size(0)
+ , m_fNotifyMSN(TRUE)
+ , m_fNotifyGTSdll(FALSE)
+ , m_GTSdllLink(_T("https://sourceforge.net/project/showfiles.php?group_id=82303&package_id=169521&release_id=371114"))
+ , m_fPreventMinimize(FALSE)
+ , m_fUseWin7TaskBar(TRUE)
+ , m_fDontUseSearchInFolder(FALSE)
{
- m_fWMASFReader = SUCCEEDED(CComPtr<IBaseFilter>().CoCreateInstance(
- GUIDFromCString(_T("{187463A0-5BB7-11D3-ACBE-0080C75E246E}")))); // WM ASF Reader
+ m_fWMASFReader = SUCCEEDED(CComPtr<IBaseFilter>().CoCreateInstance(
+ GUIDFromCString(_T("{187463A0-5BB7-11D3-ACBE-0080C75E246E}")))); // WM ASF Reader
}
CPPageTweaks::~CPPageTweaks()
@@ -55,121 +55,121 @@ CPPageTweaks::~CPPageTweaks() void CPPageTweaks::DoDataExchange(CDataExchange* pDX)
{
- __super::DoDataExchange(pDX);
- DDX_Check(pDX, IDC_CHECK3, m_fDisableXPToolbars);
- DDX_Control(pDX, IDC_CHECK3, m_fDisableXPToolbarsCtrl);
- DDX_Check(pDX, IDC_CHECK2, m_fUseWMASFReader);
- DDX_Control(pDX, IDC_CHECK2, m_fUseWMASFReaderCtrl);
- DDX_Text(pDX, IDC_EDIT1, m_nJumpDistS);
- DDX_Text(pDX, IDC_EDIT2, m_nJumpDistM);
- DDX_Text(pDX, IDC_EDIT3, m_nJumpDistL);
- DDX_Check(pDX, IDC_CHECK4, m_fNotifyMSN);
- DDX_Check(pDX, IDC_CHECK5, m_fNotifyGTSdll);
- DDX_Control(pDX, IDC_STATICLINKGTS, m_GTSdllLink);
- DDX_Check(pDX, IDC_CHECK6, m_fPreventMinimize);
- DDX_Check(pDX, IDC_CHECK_WIN7, m_fUseWin7TaskBar);
- DDX_Check(pDX, IDC_CHECK7, m_fDontUseSearchInFolder);
- DDX_Control(pDX, IDC_COMBO1, m_FontType);
- DDX_Control(pDX, IDC_COMBO2, m_FontSize);
+ __super::DoDataExchange(pDX);
+ DDX_Check(pDX, IDC_CHECK3, m_fDisableXPToolbars);
+ DDX_Control(pDX, IDC_CHECK3, m_fDisableXPToolbarsCtrl);
+ DDX_Check(pDX, IDC_CHECK2, m_fUseWMASFReader);
+ DDX_Control(pDX, IDC_CHECK2, m_fUseWMASFReaderCtrl);
+ DDX_Text(pDX, IDC_EDIT1, m_nJumpDistS);
+ DDX_Text(pDX, IDC_EDIT2, m_nJumpDistM);
+ DDX_Text(pDX, IDC_EDIT3, m_nJumpDistL);
+ DDX_Check(pDX, IDC_CHECK4, m_fNotifyMSN);
+ DDX_Check(pDX, IDC_CHECK5, m_fNotifyGTSdll);
+ DDX_Control(pDX, IDC_STATICLINKGTS, m_GTSdllLink);
+ DDX_Check(pDX, IDC_CHECK6, m_fPreventMinimize);
+ DDX_Check(pDX, IDC_CHECK_WIN7, m_fUseWin7TaskBar);
+ DDX_Check(pDX, IDC_CHECK7, m_fDontUseSearchInFolder);
+ DDX_Control(pDX, IDC_COMBO1, m_FontType);
+ DDX_Control(pDX, IDC_COMBO2, m_FontSize);
}
-
+
int CALLBACK EnumFontProc(ENUMLOGFONT FAR* lf, NEWTEXTMETRIC FAR* tm, int FontType, LPARAM dwData)
{
- CAtlArray<CString>* fntl = (CAtlArray<CString>*)dwData;
- if(FontType == TRUETYPE_FONTTYPE) fntl->Add(lf->elfFullName);
- return true;
+ CAtlArray<CString>* fntl = (CAtlArray<CString>*)dwData;
+ if(FontType == TRUETYPE_FONTTYPE) fntl->Add(lf->elfFullName);
+ return true;
}
BOOL CPPageTweaks::OnInitDialog()
{
- __super::OnInitDialog();
-
- SetHandCursor(m_hWnd, IDC_COMBO1);
-
- AppSettings& s = AfxGetAppSettings();
-
- m_fDisableXPToolbars = s.fDisableXPToolbars;
- m_fUseWMASFReader = s.fUseWMASFReader;
- m_nJumpDistS = s.nJumpDistS;
- m_nJumpDistM = s.nJumpDistM;
- m_nJumpDistL = s.nJumpDistL;
- m_fNotifyMSN = s.fNotifyMSN;
- m_fNotifyGTSdll = s.fNotifyGTSdll;
-
- m_fPreventMinimize = s.m_fPreventMinimize;
- m_fUseWin7TaskBar = s.m_fUseWin7TaskBar;
- m_fDontUseSearchInFolder =s.m_fDontUseSearchInFolder;
-
- m_OSD_Size = s.nOSD_Size;
- m_OSD_Font = s.m_OSD_Font;
-
- CString str;
- int iSel = 0;
- m_FontType.Clear();
- m_FontSize.Clear();
- HDC dc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
- CAtlArray<CString> fntl;
- EnumFontFamilies(dc, NULL,(FONTENUMPROC)EnumFontProc, (LPARAM)&fntl);
- DeleteDC(dc);
- for (int i=0; i< fntl.GetCount(); i++)
- {
- if (i>0 && fntl[i-1] == fntl[i]) continue;
- m_FontType.AddString(fntl[i]);
- }
- for (int i=0; i< m_FontType.GetCount(); i++)
- {
- m_FontType.GetLBText(i,str);
- if (m_OSD_Font == str) iSel=i;
- }
- m_FontType.SetCurSel(iSel);
-
- for (int i=10; i<26; i++)
- {
- str.Format(_T("%d"), i);
- m_FontSize.AddString(str);
- if (m_OSD_Size == i) iSel=i;
- }
- m_FontSize.SetCurSel(iSel-10);
-
- 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_fDisableXPToolbars = s.fDisableXPToolbars;
+ m_fUseWMASFReader = s.fUseWMASFReader;
+ m_nJumpDistS = s.nJumpDistS;
+ m_nJumpDistM = s.nJumpDistM;
+ m_nJumpDistL = s.nJumpDistL;
+ m_fNotifyMSN = s.fNotifyMSN;
+ m_fNotifyGTSdll = s.fNotifyGTSdll;
+
+ m_fPreventMinimize = s.m_fPreventMinimize;
+ m_fUseWin7TaskBar = s.m_fUseWin7TaskBar;
+ m_fDontUseSearchInFolder =s.m_fDontUseSearchInFolder;
+
+ m_OSD_Size = s.nOSD_Size;
+ m_OSD_Font = s.m_OSD_Font;
+
+ CString str;
+ int iSel = 0;
+ m_FontType.Clear();
+ m_FontSize.Clear();
+ HDC dc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
+ CAtlArray<CString> fntl;
+ EnumFontFamilies(dc, NULL,(FONTENUMPROC)EnumFontProc, (LPARAM)&fntl);
+ DeleteDC(dc);
+ for (int i=0; i< fntl.GetCount(); i++)
+ {
+ if (i>0 && fntl[i-1] == fntl[i]) continue;
+ m_FontType.AddString(fntl[i]);
+ }
+ for (int i=0; i< m_FontType.GetCount(); i++)
+ {
+ m_FontType.GetLBText(i,str);
+ if (m_OSD_Font == str) iSel=i;
+ }
+ m_FontType.SetCurSel(iSel);
+
+ for (int i=10; i<26; i++)
+ {
+ str.Format(_T("%d"), i);
+ m_FontSize.AddString(str);
+ if (m_OSD_Size == i) iSel=i;
+ }
+ m_FontSize.SetCurSel(iSel-10);
+
+ UpdateData(FALSE);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CPPageTweaks::OnApply()
{
- UpdateData();
+ UpdateData();
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
- s.fDisableXPToolbars = !!m_fDisableXPToolbars;
- s.fUseWMASFReader = !!m_fUseWMASFReader;
- s.nJumpDistS = m_nJumpDistS;
- s.nJumpDistM = m_nJumpDistM;
- s.nJumpDistL = m_nJumpDistL;
- s.fNotifyMSN = !!m_fNotifyMSN;
- s.fNotifyGTSdll = !!m_fNotifyGTSdll;
+ s.fDisableXPToolbars = !!m_fDisableXPToolbars;
+ s.fUseWMASFReader = !!m_fUseWMASFReader;
+ s.nJumpDistS = m_nJumpDistS;
+ s.nJumpDistM = m_nJumpDistM;
+ s.nJumpDistL = m_nJumpDistL;
+ s.fNotifyMSN = !!m_fNotifyMSN;
+ s.fNotifyGTSdll = !!m_fNotifyGTSdll;
- s.m_fPreventMinimize = m_fPreventMinimize;
- s.m_fUseWin7TaskBar = m_fUseWin7TaskBar;
- s.m_fDontUseSearchInFolder = m_fDontUseSearchInFolder;
- s.nOSD_Size = m_OSD_Size;
- m_FontType.GetLBText(m_FontType.GetCurSel(),s.m_OSD_Font);
+ s.m_fPreventMinimize = m_fPreventMinimize;
+ s.m_fUseWin7TaskBar = m_fUseWin7TaskBar;
+ s.m_fDontUseSearchInFolder = m_fDontUseSearchInFolder;
+ s.nOSD_Size = m_OSD_Size;
+ m_FontType.GetLBText(m_FontType.GetCurSel(),s.m_OSD_Font);
- CMainFrame* pFrame = ((CMainFrame*)GetParentFrame());
- if(m_fUseWin7TaskBar) pFrame->CreateThumbnailToolbar();
- pFrame->UpdateThumbarButton();
+ CMainFrame* pFrame = ((CMainFrame*)GetParentFrame());
+ if(m_fUseWin7TaskBar) pFrame->CreateThumbnailToolbar();
+ pFrame->UpdateThumbarButton();
- return __super::OnApply();
+ return __super::OnApply();
}
BEGIN_MESSAGE_MAP(CPPageTweaks, CPPageBase)
- ON_UPDATE_COMMAND_UI(IDC_CHECK3, OnUpdateCheck3)
- ON_UPDATE_COMMAND_UI(IDC_CHECK2, OnUpdateCheck2)
- ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
- ON_CBN_SELCHANGE(IDC_COMBO1, OnChngOSDCombo)
- ON_CBN_SELCHANGE(IDC_COMBO2, OnChngOSDCombo)
+ ON_UPDATE_COMMAND_UI(IDC_CHECK3, OnUpdateCheck3)
+ ON_UPDATE_COMMAND_UI(IDC_CHECK2, OnUpdateCheck2)
+ ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
+ ON_CBN_SELCHANGE(IDC_COMBO1, OnChngOSDCombo)
+ ON_CBN_SELCHANGE(IDC_COMBO2, OnChngOSDCombo)
END_MESSAGE_MAP()
@@ -177,32 +177,32 @@ END_MESSAGE_MAP() void CPPageTweaks::OnUpdateCheck3(CCmdUI* pCmdUI)
{
- if(!AfxGetAppSettings().fXpOrBetter)
- {
- pCmdUI->Enable(FALSE);
- pCmdUI->SetCheck(TRUE);
- }
+ if(!AfxGetAppSettings().fXpOrBetter)
+ {
+ pCmdUI->Enable(FALSE);
+ pCmdUI->SetCheck(TRUE);
+ }
}
void CPPageTweaks::OnUpdateCheck2(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(m_fWMASFReader);
+ pCmdUI->Enable(m_fWMASFReader);
}
void CPPageTweaks::OnBnClickedButton1()
{
- m_nJumpDistS = 1000;
- m_nJumpDistM = 5000;
- m_nJumpDistL = 20000;
+ m_nJumpDistS = 1000;
+ m_nJumpDistM = 5000;
+ m_nJumpDistL = 20000;
- UpdateData(FALSE);
+ UpdateData(FALSE);
}
void CPPageTweaks::OnChngOSDCombo()
-{
- CString str;
- m_OSD_Size = m_FontSize.GetCurSel()+10;
- m_FontType.GetLBText(m_FontType.GetCurSel(),str);
- ((CMainFrame*)AfxGetMainWnd())->m_OSD.DisplayMessage(OSD_TOPLEFT, _T("Test"), 2000, m_OSD_Size, str);
- SetModified();
+{
+ CString str;
+ m_OSD_Size = m_FontSize.GetCurSel()+10;
+ m_FontType.GetLBText(m_FontType.GetCurSel(),str);
+ ((CMainFrame*)AfxGetMainWnd())->m_OSD.DisplayMessage(OSD_TOPLEFT, _T("Test"), 2000, m_OSD_Size, str);
+ SetModified();
}
|