diff options
author | jonasno <jonasno@users.sourceforge.net> | 2011-04-17 05:55:43 +0400 |
---|---|---|
committer | jonasno <jonasno@users.sourceforge.net> | 2011-04-17 05:55:43 +0400 |
commit | c84c4b27db76f5191b01a890984a52c529191981 (patch) | |
tree | 328711c7beaf33fcd98f61f7334c449cacb4c8b9 /src/apps/mplayerc | |
parent | 74154c4db84405700b6c557e8382706eafaa6af2 (diff) |
Fixed folder locking when using windows file open/save dialog
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3034 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc')
-rw-r--r-- | src/apps/mplayerc/MainFrm.cpp | 10 | ||||
-rw-r--r-- | src/apps/mplayerc/OpenDlg.cpp | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageFileInfoRes.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageFileInfoSheet.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageLogo.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/PlayerCaptureDialog.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/RegFilterChooserDlg.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/SaveTextFileDialog.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/SaveThumbnailsDialog.cpp | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index 5eb458ae1..4fcb1c5ae 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -3969,7 +3969,7 @@ void CMainFrame::OnFileOpenQuick() CAtlArray<CString> mask;
AfxGetAppSettings().m_Formats.GetFilter(filter, mask);
COpenFileDlg fd(mask, true, NULL, NULL,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY|OFN_NOCHANGEDIR,
filter, GetModalParent());
if(fd.DoModal() != IDOK) {
return;
@@ -4448,7 +4448,7 @@ void CMainFrame::OnFileSaveAs() }
CFileDialog fd(FALSE, 0, out,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
ResStr(IDS_MAINFRM_48), GetModalParent(), 0);
if(fd.DoModal() != IDOK || !in.CompareNoCase(fd.GetPathName())) {
return;
@@ -5062,7 +5062,7 @@ void CMainFrame::OnFileSaveImage() psrc.Combine(s.strSnapShotPath, MakeSnapshotFileName(prefix));
CFileDialog fd(FALSE, 0, (LPCTSTR)psrc,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
_T("BMP - Windows Bitmap (*.bmp)|*.bmp|JPG - JPEG Image (*.jpg)|*.jpg|PNG - Portable Network Graphics (*.png)|*.png||"), GetModalParent(), 0);
if(s.strSnapShotExt == _T(".bmp")) {
@@ -5220,7 +5220,7 @@ void CMainFrame::OnFileLoadsubtitle() _T("*.srt;*.sub;*.ssa;*.ass;*smi;*.psb;*.txt;*.idx;*.usf;*.xss||");
CFileDialog fd(TRUE, NULL, NULL,
- OFN_EXPLORER | OFN_ENABLESIZING | OFN_HIDEREADONLY,
+ OFN_EXPLORER | OFN_ENABLESIZING | OFN_HIDEREADONLY|OFN_NOCHANGEDIR,
szFilter, GetModalParent(), 0);
if(fd.DoModal() != IDOK) {
@@ -5266,7 +5266,7 @@ void CMainFrame::OnFileSavesubtitle() // remember to set lpszDefExt to the first extension in the filter so that the save dialog autocompletes the extension
// and tracks attempts to overwrite in a graceful manner
CFileDialog fd(FALSE, _T("idx"), suggestedFileName,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
_T("VobSub (*.idx, *.sub)|*.idx;*.sub||"), GetModalParent(), 0);
if(fd.DoModal() == IDOK) {
diff --git a/src/apps/mplayerc/OpenDlg.cpp b/src/apps/mplayerc/OpenDlg.cpp index 60c50e3c4..a9c7a0eb9 100644 --- a/src/apps/mplayerc/OpenDlg.cpp +++ b/src/apps/mplayerc/OpenDlg.cpp @@ -128,7 +128,7 @@ void COpenDlg::OnBnClickedBrowsebutton() AfxGetAppSettings().m_Formats.GetFilter(filter, mask);
COpenFileDlg fd(mask, true, NULL, m_path,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY|OFN_NOCHANGEDIR,
filter, this);
if(fd.DoModal() != IDOK) {
return;
@@ -170,7 +170,7 @@ void COpenDlg::OnBnClickedBrowsebutton2() AfxGetAppSettings().m_Formats.GetAudioFilter(filter, mask);
COpenFileDlg fd(mask, false, NULL, m_path2,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ENABLEINCLUDENOTIFY,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ENABLEINCLUDENOTIFY|OFN_NOCHANGEDIR,
filter, this);
if(fd.DoModal() != IDOK) {
diff --git a/src/apps/mplayerc/PPageFileInfoRes.cpp b/src/apps/mplayerc/PPageFileInfoRes.cpp index 773924b5d..80b3c0680 100644 --- a/src/apps/mplayerc/PPageFileInfoRes.cpp +++ b/src/apps/mplayerc/PPageFileInfoRes.cpp @@ -121,7 +121,7 @@ void CPPageFileInfoRes::OnSaveAs() CDSMResource& r = m_res.GetAt((POSITION)m_list.GetItemData(i));
CFileDialog fd(FALSE, NULL, CString(r.name),
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_NOCHANGEDIR,
_T("All files|*.*||"), this, 0);
if(fd.DoModal() == IDOK) {
if(FILE* f = _tfopen(fd.GetPathName(), _T("wb"))) {
diff --git a/src/apps/mplayerc/PPageFileInfoSheet.cpp b/src/apps/mplayerc/PPageFileInfoSheet.cpp index c45c27956..d7997a980 100644 --- a/src/apps/mplayerc/PPageFileInfoSheet.cpp +++ b/src/apps/mplayerc/PPageFileInfoSheet.cpp @@ -99,7 +99,7 @@ BOOL CPPageFileInfoSheet::OnInitDialog() void CPPageFileInfoSheet::OnSaveAs()
{
CFileDialog filedlg (FALSE, _T("*.txt"), m_fn,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
_T("Text Files (*.txt)|*.txt|All Files (*.*)|*.*||"), NULL);
if (filedlg.DoModal() == IDOK) { // user has chosen a file, so
diff --git a/src/apps/mplayerc/PPageLogo.cpp b/src/apps/mplayerc/PPageLogo.cpp index e7821089d..41f93688c 100644 --- a/src/apps/mplayerc/PPageLogo.cpp +++ b/src/apps/mplayerc/PPageLogo.cpp @@ -168,7 +168,7 @@ void CPPageLogo::OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult) void CPPageLogo::OnBnClickedButton2()
{
CFileDialog dlg(TRUE, NULL, m_logofn,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_NOCHANGEDIR,
_T("Images (*.bmp;*.gif;*.jpg;*.png)|*.bmp;*.gif;*.jpg;*.png|All files (*.*)|*.*||"),
this, 0);
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.cpp b/src/apps/mplayerc/PlayerCaptureDialog.cpp index 768741ded..e4db4cbdb 100644 --- a/src/apps/mplayerc/PlayerCaptureDialog.cpp +++ b/src/apps/mplayerc/PlayerCaptureDialog.cpp @@ -1537,7 +1537,7 @@ void CPlayerCaptureDialog::OnAudioCodecDimension() void CPlayerCaptureDialog::OnOpenFile()
{
CFileDialog fd(FALSE, NULL, NULL,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_NOCHANGEDIR,
_T("Media files (*.avi,*.ogm,*.mkv,*.dsm)|*.avi;*.ogm;*.mkv;*.dsm|"), this, 0);
if(fd.DoModal() == IDOK) {
diff --git a/src/apps/mplayerc/RegFilterChooserDlg.cpp b/src/apps/mplayerc/RegFilterChooserDlg.cpp index 39bffd8d0..dc2e0edd1 100644 --- a/src/apps/mplayerc/RegFilterChooserDlg.cpp +++ b/src/apps/mplayerc/RegFilterChooserDlg.cpp @@ -148,7 +148,7 @@ void CRegFilterChooserDlg::OnBnClickedOk() void CRegFilterChooserDlg::OnBnClickedButton1()
{
CFileDialog dlg(TRUE, NULL, NULL,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_NOCHANGEDIR,
_T("DirectShow Filters (*.dll,*.ax)|*.dll;*.ax|"), this, 0);
if(dlg.DoModal() == IDOK) {
diff --git a/src/apps/mplayerc/SaveTextFileDialog.cpp b/src/apps/mplayerc/SaveTextFileDialog.cpp index 791de60f8..68e542ba3 100644 --- a/src/apps/mplayerc/SaveTextFileDialog.cpp +++ b/src/apps/mplayerc/SaveTextFileDialog.cpp @@ -34,7 +34,7 @@ CSaveTextFileDialog::CSaveTextFileDialog( LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
LPCTSTR lpszFilter, CWnd* pParentWnd) :
CFileDialog(FALSE, lpszDefExt, lpszFileName,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
lpszFilter, pParentWnd, 0, FALSE),
m_e(e)
{
diff --git a/src/apps/mplayerc/SaveThumbnailsDialog.cpp b/src/apps/mplayerc/SaveThumbnailsDialog.cpp index d7f222d2f..a5a418eb9 100644 --- a/src/apps/mplayerc/SaveThumbnailsDialog.cpp +++ b/src/apps/mplayerc/SaveThumbnailsDialog.cpp @@ -34,7 +34,7 @@ CSaveThumbnailsDialog::CSaveThumbnailsDialog( LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
LPCTSTR lpszFilter, CWnd* pParentWnd) :
CFileDialog(FALSE, lpszDefExt, lpszFileName,
- OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_NOCHANGEDIR,
lpszFilter, pParentWnd, 0, FALSE),
m_rows(rows), m_cols(cols), m_width(width)
{
|