Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksoid <aleksoid@users.sourceforge.net>2008-08-30 05:31:55 +0400
committerAleksoid <aleksoid@users.sourceforge.net>2008-08-30 05:31:55 +0400
commit5a5af7bf63f0a8c91c483d8d041d8ca2abb51e82 (patch)
treeb8473a6a50235fd2bbd2e5f7312666d0a19d02a1 /src/apps/mplayerc/PPageFormats.cpp
parent2fd5d27c622a705d6b4a67e7e13c7b224d409b86 (diff)
ADD : Gui option for Explorer Context menu->Directory(see Formats Page)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@760 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PPageFormats.cpp')
-rw-r--r--src/apps/mplayerc/PPageFormats.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/apps/mplayerc/PPageFormats.cpp b/src/apps/mplayerc/PPageFormats.cpp
index 21e168fcd..96e64533b 100644
--- a/src/apps/mplayerc/PPageFormats.cpp
+++ b/src/apps/mplayerc/PPageFormats.cpp
@@ -73,6 +73,7 @@ void CPPageFormats::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_CHECK4, m_apdvd);
DDX_Radio(pDX, IDC_RADIO1, m_iRtspHandler);
DDX_Check(pDX, IDC_CHECK5, m_fRtspFileExtFirst);
+ DDX_Control(pDX, IDC_CHECK6, m_fContextDir);
}
int CPPageFormats::GetChecked(int iItem)
@@ -448,6 +449,20 @@ BOOL CPPageFormats::OnInitDialog()
else
GetDlgItem(IDC_BUTTON5)->ShowWindow (SW_HIDE);
+
+ CRegKey key;
+ TCHAR buff[MAX_PATH];
+ ULONG len = sizeof(buff);
+
+ int fContextDir = 0;
+ if(ERROR_SUCCESS == key.Open(HKEY_CLASSES_ROOT, _T("Directory\\shell\\mplayerc.play\\command"), KEY_READ))
+ {
+ CString strCommand = GetOpenCommand();
+ if (ERROR_SUCCESS == key.QueryStringValue(NULL, buff, &len))
+ fContextDir = (strCommand.CompareNoCase(CString(buff)) == 0);
+ }
+ m_fContextDir.SetCheck(fContextDir);
+
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
@@ -629,6 +644,7 @@ BOOL CPPageFormats::OnApply()
}
+ /*
int cntChecked = 0;
for(int i = 0; i < m_list.GetItemCount(); i++)
{
@@ -643,9 +659,10 @@ BOOL CPPageFormats::OnApply()
while(pos)
RegisterExt(exts.GetNext(pos), mf[(int)m_list.GetItemData(i)].GetProgId(), mf[(int)m_list.GetItemData(i)].GetLabel(), !!iChecked);
}
+ */
CRegKey key;
- if(cntChecked)
+ if(m_fContextDir.GetCheck())
{
if(ERROR_SUCCESS == key.Create(HKEY_CLASSES_ROOT, _T("Directory\\shell\\mplayerc.enqueue"))){
key.SetStringValue(NULL, ResStr(IDS_ADD_TO_PLAYLIST));