OSDN Git Service

Setting dialog, remote list work.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Settings / Settings.cpp
index 1a08e0c..98c2a38 100644 (file)
 #include "MessageBox.h"\r
 #include "..\..\TGitCache\CacheInterface.h"\r
 #include "CommonResource.h"\r
 #include "MessageBox.h"\r
 #include "..\..\TGitCache\CacheInterface.h"\r
 #include "CommonResource.h"\r
-\r
+#include "GitAdminDir.h"\r
 \r
 IMPLEMENT_DYNAMIC(CSettings, CTreePropSheet)\r
 \r
 IMPLEMENT_DYNAMIC(CSettings, CTreePropSheet)\r
-CSettings::CSettings(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)\r
+CSettings::CSettings(UINT nIDCaption,CTGitPath *cmdPath, CWnd* pParentWnd, UINT iSelectPage)\r
        :CTreePropSheet(nIDCaption, pParentWnd, iSelectPage)\r
 {\r
        :CTreePropSheet(nIDCaption, pParentWnd, iSelectPage)\r
 {\r
+       if(cmdPath)\r
+               this->m_CmdPath=*cmdPath;\r
+\r
        m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);\r
        AddPropPages();\r
 }\r
        m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);\r
        AddPropPages();\r
 }\r
@@ -105,7 +108,11 @@ void CSettings::AddPropPages()
        AddPage(m_pSavedPage);\r
 \r
        AddPage(m_pGitConfig);\r
        AddPage(m_pSavedPage);\r
 \r
        AddPage(m_pGitConfig);\r
-       AddPage(m_pGitRemote);\r
+\r
+       if(     g_GitAdminDir.HasAdminDir(this->m_CmdPath.GetWinPath()) )\r
+       {\r
+               AddPage(m_pGitRemote);\r
+       }\r
 //     AddPage(m_pGitRemotem_pLogCachePage);\r
 //    AddPage(m_pLogCacheListPage);\r
 //     AddPage(m_pHooksPage);\r
 //     AddPage(m_pGitRemotem_pLogCachePage);\r
 //    AddPage(m_pLogCacheListPage);\r
 //     AddPage(m_pHooksPage);\r