Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for opening Authors.txt directly from the About dialog if…

… the file exists in the same directory as the exe. The default text editor will be used.

This commit fixes ticket #629.


git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4413 10f7b99b-c216-0410-bff0-8a66a9350fd8
  • Loading branch information...
commit c9919e9d38d19671ab7e0cb312e4a172c338fda8 1 parent 8739ba6
underground78 authored
Showing with 29 additions and 2 deletions.
  1. +2 −0  docs/Changelog.txt
  2. +24 −2 src/apps/mplayerc/AboutDlg.cpp
  3. +3 −0  src/apps/mplayerc/AboutDlg.h
  4. BIN  src/apps/mplayerc/mpcresources/mplayerc.br.rc
  5. BIN  src/apps/mplayerc/mpcresources/mplayerc.by.rc
  6. BIN  src/apps/mplayerc/mpcresources/mplayerc.ca.rc
  7. BIN  src/apps/mplayerc/mpcresources/mplayerc.cz.rc
  8. BIN  src/apps/mplayerc/mpcresources/mplayerc.de.rc
  9. BIN  src/apps/mplayerc/mpcresources/mplayerc.es.rc
  10. BIN  src/apps/mplayerc/mpcresources/mplayerc.fr.rc
  11. BIN  src/apps/mplayerc/mpcresources/mplayerc.he.rc
  12. BIN  src/apps/mplayerc/mpcresources/mplayerc.hu.rc
  13. BIN  src/apps/mplayerc/mpcresources/mplayerc.hy.rc
  14. BIN  src/apps/mplayerc/mpcresources/mplayerc.it.rc
  15. BIN  src/apps/mplayerc/mpcresources/mplayerc.ja.rc
  16. BIN  src/apps/mplayerc/mpcresources/mplayerc.kr.rc
  17. BIN  src/apps/mplayerc/mpcresources/mplayerc.nl.rc
  18. BIN  src/apps/mplayerc/mpcresources/mplayerc.pl.rc
  19. BIN  src/apps/mplayerc/mpcresources/mplayerc.ru.rc
  20. BIN  src/apps/mplayerc/mpcresources/mplayerc.sc.rc
  21. BIN  src/apps/mplayerc/mpcresources/mplayerc.sk.rc
  22. BIN  src/apps/mplayerc/mpcresources/mplayerc.sv.rc
  23. BIN  src/apps/mplayerc/mpcresources/mplayerc.tc.rc
  24. BIN  src/apps/mplayerc/mpcresources/mplayerc.tr.rc
  25. BIN  src/apps/mplayerc/mpcresources/mplayerc.ua.rc
  26. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
  27. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
  28. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
  29. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
  30. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
  31. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
  32. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
  33. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.he.rc.txt
  34. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
  35. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
  36. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
  37. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
  38. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
  39. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
  40. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
  41. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt
  42. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
  43. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
  44. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
  45. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
  46. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
  47. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
  48. BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
  49. BIN  src/apps/mplayerc/mplayerc.rc
  50. BIN  src/apps/mplayerc/resource.h
View
2  docs/Changelog.txt
@@ -12,6 +12,8 @@ Legend:
==============================
+ MatroskaSplitter: Support for QT video formats in Matroska v1
+ Added .tak extension
++ Ticket #629, Add support for opening Authors.txt directly from the About dialog
+ if the file exists in the same directory as the exe
+ Ticket #1792, Show an OSD message and a status message when a favorite is
created via the keyboard shortcut
+ Ticket #2193, Add PNG support for custom toolbars
View
26 src/apps/mplayerc/AboutDlg.cpp
@@ -83,8 +83,22 @@ BOOL CAboutDlg::OnInitDialog()
m_FFmpegCompiler.Format(A2W(GetFFmpegCompiler()));
#endif
+ // Build the path to Authors.txt
+ GetModuleFileName(AfxGetInstanceHandle(), m_AuthorsPath.GetBuffer(_MAX_PATH), _MAX_PATH);
+ m_AuthorsPath.ReleaseBuffer();
+ m_AuthorsPath = m_AuthorsPath.Left(m_AuthorsPath.ReverseFind('\\') + 1) + _T("Authors.txt");
+ // Check if the file exists
+ CFileStatus fs;
+ if (CFile::GetStatus(m_AuthorsPath, fs)) {
+ // If it does, we make the filename clickable
+ m_Credits.Replace(_T("Authors.txt"), _T("<a>Authors.txt</a>"));
+ }
+
UpdateData(FALSE);
- return TRUE;
+
+ GetDlgItem(IDOK)->SetFocus();
+
+ return FALSE;
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
@@ -96,13 +110,15 @@ void CAboutDlg::DoDataExchange(CDataExchange* pDX)
DDX_Text(pDX, IDC_BUILD_NUMBER, m_strBuildNumber);
DDX_Text(pDX, IDC_MPC_COMPILER, m_MPCCompiler);
DDX_Text(pDX, IDC_FFMPEG_COMPILER, m_FFmpegCompiler);
+ DDX_Text(pDX, IDC_AUTHORS_LINK, m_Credits);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
- ON_NOTIFY(NM_CLICK, IDC_SOURCEFORGE_LINK, &CAboutDlg::OnHomepage)
+ ON_NOTIFY(NM_CLICK, IDC_SOURCEFORGE_LINK, OnHomepage)
+ ON_NOTIFY(NM_CLICK, IDC_AUTHORS_LINK, OnAuthors)
END_MESSAGE_MAP()
void CAboutDlg::OnHomepage(NMHDR *pNMHDR, LRESULT *pResult)
@@ -110,3 +126,9 @@ void CAboutDlg::OnHomepage(NMHDR *pNMHDR, LRESULT *pResult)
ShellExecute(m_hWnd, _T("open"), _T("http://mpc-hc.sourceforge.net/"), NULL, NULL, SW_SHOWDEFAULT);
*pResult = 0;
}
+
+void CAboutDlg::OnAuthors(NMHDR *pNMHDR, LRESULT *pResult)
+{
+ ShellExecute(m_hWnd, _T("open"), m_AuthorsPath, NULL, NULL, SW_SHOWDEFAULT);
+ *pResult = 0;
+}
View
3  src/apps/mplayerc/AboutDlg.h
@@ -31,6 +31,8 @@ class CAboutDlg : public CDialog
CString m_strBuildNumber;
CString m_MPCCompiler;
CString m_FFmpegCompiler;
+ CString m_Credits;
+ CString m_AuthorsPath;
public:
CAboutDlg();
@@ -38,6 +40,7 @@ class CAboutDlg : public CDialog
virtual BOOL OnInitDialog();
afx_msg void OnHomepage(NMHDR *pNMHDR, LRESULT *pResult);
+ afx_msg void OnAuthors(NMHDR *pNMHDR, LRESULT *pResult);
// Dialog Data
//{{AFX_DATA(CAboutDlg)
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.br.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.by.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.ca.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.cz.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.de.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.es.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.fr.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.he.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.hu.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.hy.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.it.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.ja.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.kr.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.nl.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.pl.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.ru.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.sc.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.sk.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.sv.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.tc.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.tr.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/mplayerc.ua.rc
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.he.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
Binary file not shown
View
BIN  src/apps/mplayerc/mplayerc.rc
Binary file not shown
View
BIN  src/apps/mplayerc/resource.h
Binary file not shown

0 comments on commit c9919e9

Please sign in to comment.
Something went wrong with that request. Please try again.