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:
authorUnderground78 <underground78@users.sourceforge.net>2014-10-27 17:18:05 +0300
committerUnderground78 <underground78@users.sourceforge.net>2014-10-31 01:05:27 +0300
commit29b9f55dfdb96b3c808a05c5d4568fee604b63d0 (patch)
treee6a7a19cb856e7dbbc7790b7e3e953c994644d5f
parentf300dead0a8f649da5d9a30eb5dbf0add8d85624 (diff)
Property dialog: Decide whether to show the "Resources" tab without checking the graph twice.
-rw-r--r--src/mpc-hc/PPageFileInfoRes.h2
-rw-r--r--src/mpc-hc/PPageFileInfoSheet.cpp9
2 files changed, 4 insertions, 7 deletions
diff --git a/src/mpc-hc/PPageFileInfoRes.h b/src/mpc-hc/PPageFileInfoRes.h
index 8dc2d5910..e8e71760d 100644
--- a/src/mpc-hc/PPageFileInfoRes.h
+++ b/src/mpc-hc/PPageFileInfoRes.h
@@ -48,6 +48,8 @@ public:
// Dialog Data
enum { IDD = IDD_FILEPROPRES };
+ bool HasResources() const { return !m_res.empty(); };
+
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
diff --git a/src/mpc-hc/PPageFileInfoSheet.cpp b/src/mpc-hc/PPageFileInfoSheet.cpp
index 673673040..6319c03cf 100644
--- a/src/mpc-hc/PPageFileInfoSheet.cpp
+++ b/src/mpc-hc/PPageFileInfoSheet.cpp
@@ -40,14 +40,9 @@ CPPageFileInfoSheet::CPPageFileInfoSheet(CString path, CMainFrame* pMainFrame, C
AddPage(&m_details);
AddPage(&m_clip);
- BeginEnumFilters(pMainFrame->m_pGB, pEF, pBF) {
- if (CComQIPtr<IDSMResourceBag> pRB = pBF)
- if (pRB && pRB->ResGetCount() > 0) {
- AddPage(&m_res);
- break;
- }
+ if (m_res.HasResources()) {
+ AddPage(&m_res);
}
- EndEnumFilters;
#if !USE_STATIC_MEDIAINFO
if (CPPageFileMediaInfo::HasMediaInfo())