OSDN Git Service

Add user Config and remote config to setting dialog
authorFrank Li <lznuaa@gmail.com>
Mon, 30 Mar 2009 13:33:20 +0000 (21:33 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 30 Mar 2009 13:33:20 +0000 (21:33 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Resources/TortoiseProcENG.rc
src/TortoiseGitSetup/StructureFragment.wxi
src/TortoiseProc/Settings/SettingGitConfig.cpp [moved from src/TortoiseProc/SettingGitConfig.cpp with 83% similarity]
src/TortoiseProc/Settings/SettingGitConfig.h [moved from src/TortoiseProc/SettingGitConfig.h with 64% similarity]
src/TortoiseProc/Settings/SettingGitRemote.cpp [moved from src/TortoiseProc/SettingGitRemote.cpp with 89% similarity]
src/TortoiseProc/Settings/SettingGitRemote.h [moved from src/TortoiseProc/SettingGitRemote.h with 73% similarity]
src/TortoiseProc/Settings/Settings.cpp
src/TortoiseProc/Settings/Settings.h
src/TortoiseProc/TortoiseProc.vcproj

index d59c71a..ae15433 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index 8d51a2d..797fa9e 100644 (file)
@@ -308,8 +308,15 @@ out everything for now, leaving these enabled as they are would make the install
 -->\r
             <Shortcut Id="S__TortoiseProc" Directory="D_TortoisePrgMenu" Name="Help" Advertise="no"\r
               Target="[INSTALLDIR]bin\TortoiseProc.exe" Description="Documentation about TortoiseGit" Arguments="/command:help" Show="normal" />\r
-            </Component>\r
-\r
+            \r
+                       <Shortcut Id="S__puttykeygen" Directory="D_TortoisePrgMenu" Name="Puttygen" Advertise="no"\r
+              Target="[INSTALLDIR]bin\puttygen.exe" Description="putty key generate" Show="normal" />\r
+            \r
+                       <Shortcut Id="S__pageant" Directory="D_TortoisePrgMenu" Name="Pageant" Advertise="no"\r
+              Target="[INSTALLDIR]bin\pageant.exe" Description="putty ageant" Show="normal" />\r
+         \r
+                       </Component>\r
+                       \r
             <Component Id="C__TortoiseMerge" Guid="$(var.GuidTortoiseMerge)" Win64="$(var.Win64YesNo)">\r
               <File Id="F__TortoiseMerge" ShortName="TMERGE.EXE" Name="TortoiseMerge.exe" DiskId="1" Source="..\..\ext\svnbin\TortoiseMerge.exe" KeyPath="yes" />\r
             </Component>\r
similarity index 83%
rename from src/TortoiseProc/SettingGitConfig.cpp
rename to src/TortoiseProc/Settings/SettingGitConfig.cpp
index 63a74bf..6206e39 100644 (file)
@@ -8,10 +8,10 @@
 \r
 // CSettingGitConfig dialog\r
 \r
-IMPLEMENT_DYNAMIC(CSettingGitConfig, CPropertyPage)\r
+IMPLEMENT_DYNAMIC(CSettingGitConfig, ISettingsPropPage)\r
 \r
 CSettingGitConfig::CSettingGitConfig()\r
-       : CPropertyPage(CSettingGitConfig::IDD)\r
+       : ISettingsPropPage(CSettingGitConfig::IDD)\r
     , m_UserName(_T(""))\r
     , m_UserEmail(_T(""))\r
     , m_bGlobal(FALSE)\r
similarity index 64%
rename from src/TortoiseProc/SettingGitConfig.h
rename to src/TortoiseProc/Settings/SettingGitConfig.h
index 3c169a1..0e6bd21 100644 (file)
@@ -1,16 +1,19 @@
 #pragma once\r
 \r
-\r
+#include "SettingsPropPage.h"\r
+#include "Tooltip.h"\r
+#include "registry.h"\r
+#include "afxwin.h"\r
 // CSettingGitConfig dialog\r
 \r
-class CSettingGitConfig : public CPropertyPage\r
+class CSettingGitConfig : public ISettingsPropPage\r
 {\r
        DECLARE_DYNAMIC(CSettingGitConfig)\r
 \r
 public:\r
        CSettingGitConfig();\r
        virtual ~CSettingGitConfig();\r
-\r
+       UINT GetIconID() {return IDI_GENERAL;}\r
 // Dialog Data\r
        enum { IDD = IDD_SETTINGIT_CONFIG };\r
 \r
similarity index 89%
rename from src/TortoiseProc/SettingGitRemote.cpp
rename to src/TortoiseProc/Settings/SettingGitRemote.cpp
index b514557..0329290 100644 (file)
@@ -8,10 +8,10 @@
 \r
 // CSettingGitRemote dialog\r
 \r
-IMPLEMENT_DYNAMIC(CSettingGitRemote, CPropertyPage)\r
+IMPLEMENT_DYNAMIC(CSettingGitRemote, ISettingsPropPage)\r
 \r
 CSettingGitRemote::CSettingGitRemote()\r
-       : CPropertyPage(CSettingGitRemote::IDD)\r
+       : ISettingsPropPage(CSettingGitRemote::IDD)\r
     , m_strRemote(_T(""))\r
     , m_strUrl(_T(""))\r
     , m_strPuttyKeyfile(_T(""))\r
similarity index 73%
rename from src/TortoiseProc/SettingGitRemote.h
rename to src/TortoiseProc/Settings/SettingGitRemote.h
index d06a439..1f4989f 100644 (file)
@@ -1,17 +1,20 @@
 #pragma once\r
 #include "afxwin.h"\r
-\r
+#include "SettingsPropPage.h"\r
+#include "Tooltip.h"\r
+#include "registry.h"\r
+#include "afxwin.h"\r
 \r
 // CSettingGitRemote dialog\r
 \r
-class CSettingGitRemote : public CPropertyPage\r
+class CSettingGitRemote : public ISettingsPropPage\r
 {\r
        DECLARE_DYNAMIC(CSettingGitRemote)\r
 \r
 public:\r
        CSettingGitRemote();\r
        virtual ~CSettingGitRemote();\r
-\r
+       UINT GetIconID() {return IDI_GENERAL;}\r
 // Dialog Data\r
        enum { IDD = IDD_SETTINREMOTE };\r
 \r
index bcf9dbf..12d91e4 100644 (file)
@@ -59,6 +59,9 @@ void CSettings::AddPropPages()
 //     m_pHooksPage = new CSetHooks();\r
        m_pBugTraqPage = new CSetBugTraq();\r
        m_pTBlamePage = new CSettingsTBlame();\r
+       m_pGitConfig = new CSettingGitConfig();\r
+       m_pGitRemote = new CSettingGitRemote();\r
+\r
 \r
        SetPageIcon(m_pMainPage, m_pMainPage->GetIconID());\r
        SetPageIcon(m_pOverlayPage, m_pOverlayPage->GetIconID());\r
@@ -97,7 +100,10 @@ void CSettings::AddPropPages()
        AddPage(m_pColorsPage2);\r
        AddPage(m_pColorsPage3);\r
        AddPage(m_pSavedPage);\r
-//     AddPage(m_pLogCachePage);\r
+\r
+       AddPage(m_pGitConfig);\r
+       AddPage(m_pGitRemote);\r
+//     AddPage(m_pGitRemotem_pLogCachePage);\r
 //    AddPage(m_pLogCacheListPage);\r
 //     AddPage(m_pHooksPage);\r
        AddPage(m_pBugTraqPage);\r
@@ -126,6 +132,10 @@ void CSettings::RemovePropPages()
 //     delete m_pHooksPage;\r
        delete m_pBugTraqPage;\r
        delete m_pTBlamePage;\r
+\r
+       delete m_pGitConfig;\r
+       delete m_pGitRemote;\r
+\r
 }\r
 \r
 void CSettings::HandleRestart()\r
@@ -151,6 +161,10 @@ void CSettings::HandleRestart()
 ////   restart |= m_pHooksPage->GetRestart();\r
        restart |= m_pBugTraqPage->GetRestart();\r
        restart |= m_pTBlamePage->GetRestart();\r
+\r
+       restart |= m_pGitConfig->GetRestart();\r
+       restart |= m_pGitRemote->GetRestart();\r
+\r
        if (restart & ISettingsPropPage::Restart_System)\r
        {\r
                DWORD_PTR res = 0;\r
index 36b5a1e..b2c662f 100644 (file)
@@ -40,6 +40,8 @@
 #include "SettingsTBlame.h"\r
 #include "SettingsRevisionGraph.h"\r
 #include "TreePropSheet/TreePropSheet.h"\r
+#include "SettingGitConfig.h"\r
+#include "SettingGitRemote.h"\r
 \r
 using namespace TreePropSheet;\r
 \r
@@ -86,6 +88,8 @@ private:
 //     CSetHooks *                             m_pHooksPage;\r
        CSetBugTraq *                   m_pBugTraqPage;\r
        CSettingsTBlame *               m_pTBlamePage;\r
+       CSettingGitConfig *             m_pGitConfig;\r
+       CSettingGitRemote *             m_pGitRemote;\r
 \r
        HICON                                   m_hIcon;\r
 public:\r
index 6b50564..9e85335 100644 (file)
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\SettingGitConfig.cpp"\r
+                                       RelativePath=".\Settings\SettingGitConfig.cpp"\r
                                >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\SettingGitConfig.h"\r
+                                       RelativePath=".\Settings\SettingGitConfig.h"\r
                                >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\SettingGitRemote.cpp"\r
+                                       RelativePath=".\Settings\SettingGitRemote.cpp"\r
                                >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\SettingGitRemote.h"\r
+                                       RelativePath=".\Settings\SettingGitRemote.h"\r
                                >\r
                                </File>\r
                        </Filter>\r