OSDN Git Service

Improve plugin system (#797)
[winmerge-jp/winmerge-jp.git] / Src / OpenDoc.cpp
index 242f987..fc48002 100644 (file)
@@ -3,17 +3,21 @@
 
 #include "stdafx.h"
 #include "OpenDoc.h"
+#include "OpenView.h"
 #include "OptionsDef.h"
 #include "OptionsMgr.h"
+#include "MergeApp.h"
 
 // COpenDoc
 
 IMPLEMENT_DYNCREATE(COpenDoc, CDocument)
 
 COpenDoc::COpenDoc() :
-       m_bRecurse(FALSE)
+       m_bRecurse(false)
+,      m_dwFlags()
 {
-       memset(m_dwFlags, 0, sizeof(m_dwFlags));
+       PackingInfo infoHandler;
+       m_strUnpackerPipeline = GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED) ? infoHandler.GetPluginPipeline() : _T("");
 }
 
 BOOL COpenDoc::OnNewDocument()
@@ -30,7 +34,18 @@ COpenDoc::~COpenDoc()
 void COpenDoc::RefreshOptions()
 {
        m_bRecurse = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
-       UpdateAllViews(NULL);
+       UpdateAllViews(nullptr);
+}
+
+/**
+ * @brief Update any resources necessary after a GUI language change
+ */
+void COpenDoc::UpdateResources()
+{
+       SetTitle(_("Select Files or Folders").c_str());
+       POSITION pos = GetFirstViewPosition();
+       COpenView *pView = static_cast<COpenView *>(GetNextView(pos));
+       pView->UpdateResources();
 }
 
 BEGIN_MESSAGE_MAP(COpenDoc, CDocument)