OSDN Git Service

PATCH: [ 1193262 ] Switch language on run-time not change all menus
authorKimmo Varis <kimmov@gmail.com>
Thu, 30 Jun 2005 17:11:58 +0000 (17:11 +0000)
committerKimmo Varis <kimmov@gmail.com>
Thu, 30 Jun 2005 17:11:58 +0000 (17:11 +0000)
Src/Common/LanguageSelect.cpp
Src/readme.txt

index 02c5cde..cbb06bd 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "stdafx.h"
 #include "resource.h"
+#include "Merge.h"
 #include "LanguageSelect.h"
 #include "MainFrm.h"
 #include <locale.h>
@@ -512,7 +513,8 @@ void CLanguageSelect::ReloadMenu()
        {
                // set the menu of the main frame window
                UINT idMenu = GetDocResId();
-               CMainFrame * pMainFrame = dynamic_cast<CMainFrame *> ((CFrameWnd*)AfxGetApp()->m_pMainWnd);
+               CMergeApp *pApp = dynamic_cast<CMergeApp *> (AfxGetApp());
+               CMainFrame * pMainFrame = dynamic_cast<CMainFrame *> ((CFrameWnd*)pApp->m_pMainWnd);
                HMENU hNewMenu = pMainFrame->NewDefaultMenu(idMenu);
                if (hNewMenu)
                {
@@ -531,9 +533,11 @@ void CLanguageSelect::ReloadMenu()
                                // m_hMenuDefault is used to redraw the main menu when we close a child frame
                                // if this child frame had a different menu
                                pMainFrame->m_hMenuDefault = hNewMenu;
+                               pApp->m_pDiffTemplate->m_hMenuShared = pMainFrame->NewMergeViewMenu();
+                               pApp->m_pDirTemplate->m_hMenuShared = pMainFrame->NewDirViewMenu();
 
                                // force redrawing the menu bar
-                               pMainFrame->DrawMenuBar();  
+                               pMainFrame->DrawMenuBar();
                        }
                }
        }
index 3c379bc..5cf4b96 100644 (file)
@@ -17,6 +17,8 @@
    Src: DirDoc.cpp DirDoc.h DirView.cpp DirView.h
   Cannot create valid (archive) temp paths without valid document pointer
    Src: MainFrm.cpp
+ PATCH: [ 1193262 ] Switch language on run-time not change all menus
+  Src/Common: LanguageSelect.cpp
 
 2005-06-29 Perry
  PATCH: [ 1220421 ] warning in cvs trunk (probably a bool/BOOL mismatch)