OSDN Git Service

Fix for the issue bitbucket#113 (2)
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 22 Sep 2018 08:31:40 +0000 (17:31 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 22 Sep 2018 08:31:40 +0000 (17:31 +0900)
Src/OpenDoc.cpp
Src/OpenView.cpp
Src/OpenView.h

index 1cb7fbb..bca62c9 100644 (file)
@@ -3,10 +3,10 @@
 
 #include "stdafx.h"
 #include "OpenDoc.h"
+#include "OpenView.h"
 #include "OptionsDef.h"
 #include "OptionsMgr.h"
-#include "LanguageSelect.h"
-#include "Merge.h"
+#include "MergeApp.h"
 
 // COpenDoc
 
@@ -42,8 +42,8 @@ void COpenDoc::UpdateResources()
 {
        SetTitle(_("Select Files or Folders").c_str());
        POSITION pos = GetFirstViewPosition();
-       CView *pView = GetNextView(pos);
-       theApp.m_pLangDlg->RetranslateDialog(pView->m_hWnd, MAKEINTRESOURCE(IDD_OPEN));
+       COpenView *pView = static_cast<COpenView *>(GetNextView(pos));
+       pView->UpdateResources();
 }
 
 BEGIN_MESSAGE_MAP(COpenDoc, CDocument)
index 8b0912b..f3757c5 100644 (file)
@@ -45,6 +45,7 @@
 #include "FileFilterHelper.h"
 #include "Plugins.h"
 #include "BCMenu.h"
+#include "LanguageSelect.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -826,6 +827,16 @@ static UINT UpdateButtonStatesThread(LPVOID lpParam)
        return 0;
 }
 
+/**
+ * @brief Update any resources necessary after a GUI language change
+ */
+void COpenView::UpdateResources()
+{
+       theApp.m_pLangDlg->RetranslateDialog(m_hWnd, MAKEINTRESOURCE(IDD_OPEN));
+       if (m_strUnpacker != m_infoHandler.pluginName)
+               m_strUnpacker = theApp.LoadString(IDS_OPEN_UNPACKERDISABLED);
+}
+
 /** 
  * @brief Enable/disable components based on validity of paths.
  */
index 4f87a3e..1294fdc 100644 (file)
@@ -81,6 +81,7 @@ public:
 // Operations
 public:
        void UpdateButtonStates();
+       void UpdateResources();
 
 // Implementation data
 private: