OSDN Git Service

Add Show Whole Project Checkbox at commitdlg.
authorFrank Li <lznuaa@gmail.com>
Fri, 20 Feb 2009 06:27:41 +0000 (14:27 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 20 Feb 2009 06:27:41 +0000 (14:27 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/GitStatusListCtrl.cpp
src/TortoiseProc/Commands/CommitCommand.cpp
src/TortoiseProc/CommitDlg.cpp
src/TortoiseProc/CommitDlg.h
src/TortoiseProc/RebaseDlg.cpp
src/TortoiseProc/TortoiseProc.vcproj

index df54196..719f775 100644 (file)
@@ -299,7 +299,7 @@ BOOL CGitStatusListCtrl::GetStatus ( const CTGitPathList* pathList
                mask|= CGitStatusListCtrl::FILELIST_IGNORE;\r
        if(bShowUnRev)\r
                mask|= CGitStatusListCtrl::FILELIST_UNVER;\r
-       this->UpdateFileList(mask,bUpdate,pathList);\r
+       this->UpdateFileList(mask,bUpdate,(CTGitPathList*)pathList);\r
 \r
 \r
 #if 0\r
index a30bc42..fa5bda5 100644 (file)
@@ -75,6 +75,12 @@ bool CommitCommand::Execute()
                {\r
                        dlg.m_sBugID = parser.GetVal(_T("bugid"));\r
                }\r
+        \r
+        if (parser.HasKey(_T("wholeproject")))\r
+               {\r
+            dlg.m_bWholeProject = TRUE;\r
+               }\r
+\r
                dlg.m_sLogMessage = sLogMsg;\r
                dlg.m_pathList = pathList;\r
                dlg.m_checkedPathList = selectedList;\r
index 8b06ab6..7bf2c24 100644 (file)
@@ -98,6 +98,7 @@ BEGIN_MESSAGE_MAP(CCommitDlg, CResizableStandAloneDialog)
        ON_BN_CLICKED(IDC_SIGNOFF, &CCommitDlg::OnBnClickedSignOff)\r
        ON_STN_CLICKED(IDC_COMMITLABEL, &CCommitDlg::OnStnClickedCommitlabel)\r
     ON_BN_CLICKED(IDC_COMMIT_AMEND, &CCommitDlg::OnBnClickedCommitAmend)\r
+    ON_BN_CLICKED(IDC_WHOLE_PROJECT, &CCommitDlg::OnBnClickedWholeProject)\r
 END_MESSAGE_MAP()\r
 \r
 BOOL CCommitDlg::OnInitDialog()\r
@@ -656,6 +657,7 @@ UINT CCommitDlg::StatusThread()
 \r
        DialogEnableWindow(IDOK, false);\r
        DialogEnableWindow(IDC_SHOWUNVERSIONED, false);\r
+    DialogEnableWindow(IDC_WHOLE_PROJECT, false);\r
        DialogEnableWindow(IDC_SELECTALL, false);\r
        GetDlgItem(IDC_EXTERNALWARNING)->ShowWindow(SW_HIDE);\r
        DialogEnableWindow(IDC_EXTERNALWARNING, false);\r
@@ -677,7 +679,11 @@ UINT CCommitDlg::StatusThread()
 #endif\r
     // Initialise the list control with the status of the files/folders below us\r
        m_ListCtrl.Clear();\r
-       BOOL success = m_ListCtrl.GetStatus(&m_pathList);\r
+       BOOL success;\r
+    if(m_bWholeProject)\r
+        success=m_ListCtrl.GetStatus(NULL);\r
+    else\r
+        success=m_ListCtrl.GetStatus(&m_pathList);\r
 \r
        //m_ListCtrl.UpdateFileList(git_revnum_t(GIT_REV_ZERO));\r
        if(this->m_bShowUnversioned)\r
@@ -730,7 +736,11 @@ UINT CCommitDlg::StatusThread()
        }\r
 \r
        CTGitPath commonDir = m_ListCtrl.GetCommonDirectory(false);\r
-       SetWindowText(m_sWindowTitle + _T(" - ") + commonDir.GetWinPathString());\r
+\r
+    if(this->m_bWholeProject)   \r
+        SetWindowText(m_sWindowTitle + _T(" - ") + CString(_T("Whole Project")));\r
+    else\r
+           SetWindowText(m_sWindowTitle + _T(" - ") + commonDir.GetWinPathString());\r
 \r
        m_autolist.clear();\r
        // we don't have to block the commit dialog while we fetch the\r
@@ -746,6 +756,7 @@ UINT CCommitDlg::StatusThread()
        if (m_bRunThread)\r
        {\r
                DialogEnableWindow(IDC_SHOWUNVERSIONED, true);\r
+        DialogEnableWindow(IDC_WHOLE_PROJECT, true);\r
                DialogEnableWindow(IDC_SELECTALL, true);\r
                if (m_ListCtrl.HasChangeLists())\r
                        DialogEnableWindow(IDC_KEEPLISTS, true);\r
@@ -894,7 +905,10 @@ void CCommitDlg::OnBnClickedShowunversioned()
                        dwShow &= ~SVNSLC_SHOWUNVERSIONED;\r
                if(dwShow & SVNSLC_SHOWUNVERSIONED)\r
                {\r
-                       m_ListCtrl.GetStatus(&this->m_pathList,false,false,true);\r
+            if(m_bWholeProject)\r
+                m_ListCtrl.GetStatus(NULL,false,false,true);\r
+            else\r
+                           m_ListCtrl.GetStatus(&this->m_pathList,false,false,true);\r
                }\r
                m_ListCtrl.Show(dwShow);\r
        }\r
@@ -1510,3 +1524,28 @@ void CCommitDlg::OnBnClickedCommitAmend()
        }\r
 \r
 }\r
+\r
+void CCommitDlg::OnBnClickedWholeProject()\r
+{\r
+    // TODO: Add your control notification handler code here\r
+    m_tooltips.Pop();  // hide the tooltips\r
+       UpdateData();\r
+    m_ListCtrl.Clear();\r
+       if (!m_bBlock)\r
+       {\r
+           if(m_bWholeProject)\r
+            m_ListCtrl.GetStatus(NULL,true,false,true);\r
+        else\r
+                   m_ListCtrl.GetStatus(&this->m_pathList,true,false,true);\r
+               \r
+               m_ListCtrl.Show(m_ListCtrl.GetShowFlags());\r
+       }\r
+\r
+       CTGitPath commonDir = m_ListCtrl.GetCommonDirectory(false);\r
+\r
+    if(this->m_bWholeProject)   \r
+        SetWindowText(m_sWindowTitle + _T(" - ") + CString(_T("Whole Project")));\r
+    else\r
+           SetWindowText(m_sWindowTitle + _T(" - ") + commonDir.GetWinPathString());\r
+\r
+}\r
index 8a235b1..0d188fc 100644 (file)
@@ -143,4 +143,5 @@ public:
        afx_msg void OnBnClickedSignOff();\r
        afx_msg void OnStnClickedCommitlabel();\r
        afx_msg void OnBnClickedCommitAmend();\r
+    afx_msg void OnBnClickedWholeProject();\r
 };\r
index cab8be1..e1f0cdf 100644 (file)
@@ -1037,7 +1037,7 @@ void CRebaseDlg::ListConflictFile()
        CTGitPath path;\r
        list.AddPath(path);\r
 \r
-       this->m_FileListCtrl.GetStatus(list,true);\r
+       this->m_FileListCtrl.GetStatus(&list,true);\r
        this->m_FileListCtrl.Show(CTGitPath::LOGACTIONS_UNMERGED|CTGitPath::LOGACTIONS_MODIFIED,CTGitPath::LOGACTIONS_UNMERGED);\r
        if( this->m_FileListCtrl.GetItemCount() == 0 )\r
        {\r
index dae2a4d..264fdd8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9,00"\r
+       Version="9.00"\r
        Name="TortoiseProc"\r
        ProjectGUID="{50797F06-39C5-4802-8E2B-7B7A4EF03214}"\r
        RootNamespace="TortoiseProc"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseProc\$(ConfigurationName)"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="..\..\bin\Debug64\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseProc\Debug64"\r
                        ConfigurationType="1"\r
                        UseOfMFC="2"\r
+                       UseOfATL="0"\r
                        CharacterSet="1"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                MkTypLibCompatible="false"\r
+                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="1"\r
-                               InlineFunctionExpansion="1"\r
-                               FavorSizeOrSpeed="2"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
-                               PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;THESAURUS"\r
-                               StringPooling="true"\r
-                               MinimalRebuild="false"\r
+                               PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
+                               MinimalRebuild="true"\r
                                ExceptionHandling="2"\r
-                               RuntimeLibrary="2"\r
-                               BufferSecurityCheck="false"\r
+                               RuntimeLibrary="3"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="4"\r
                                DebugInformationFormat="3"\r
-                               DisableSpecificWarnings="4996,4018"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                Culture="1033"\r
                                AdditionalIncludeDirectories="&quot;$(IntDir)&quot;;..\TortoiseShell"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               LinkIncremental="1"\r
-                               AdditionalLibraryDirectories="../../ext/wingit"\r
+                               LinkIncremental="2"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
-                               Profile="true"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="..\..\bin\Debug64\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseProc\Debug64"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseProc\$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        UseOfMFC="2"\r
-                       UseOfATL="0"\r
                        CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="false"\r
-                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               Optimization="1"\r
+                               InlineFunctionExpansion="1"\r
+                               FavorSizeOrSpeed="2"\r
                                AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
-                               PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
-                               MinimalRebuild="true"\r
+                               PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;THESAURUS"\r
+                               StringPooling="true"\r
+                               MinimalRebuild="false"\r
                                ExceptionHandling="2"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="4"\r
                                DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4996,4018"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                Culture="1033"\r
                                AdditionalIncludeDirectories="&quot;$(IntDir)&quot;;..\TortoiseShell"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               LinkIncremental="2"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="17"\r
+                               TargetMachine="1"\r
+                               Profile="true"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\explorer.ico"\r
+                               RelativePath="..\Resources\explorer.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\explorer.ico"\r
+                               RelativePath=".\explorer.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\newfolder.ico"\r
+                               RelativePath="..\Resources\newfolder.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\newfolder.ico"\r
+                               RelativePath=".\newfolder.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\open.ico"\r
+                               RelativePath="..\Resources\open.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\open.ico"\r
+                               RelativePath=".\open.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\save.ico"\r
+                               RelativePath="..\Resources\save.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\save.ico"\r
+                               RelativePath=".\save.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\saveas.ico"\r
+                               RelativePath="..\Resources\saveas.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\saveas.ico"\r
+                               RelativePath=".\saveas.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\up.ico"\r
+                               RelativePath="..\Resources\up.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\up.ico"\r
+                               RelativePath=".\up.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                />\r
                        </FileConfiguration>\r
                        <FileConfiguration\r
-                               Name="Release|Win32"\r
+                               Name="Debug|x64"\r
                                >\r
                                <Tool\r
                                        Name="VCCLCompilerTool"\r
                                />\r
                        </FileConfiguration>\r
                        <FileConfiguration\r
-                               Name="Debug|x64"\r
+                               Name="Release|Win32"\r
                                >\r
                                <Tool\r
                                        Name="VCCLCompilerTool"\r
                />\r
                <Global\r
                        Name="RESOURCE_FILE"\r
-                       Value="\\geo\msdev\TortoiseGit\src\Resources\TortoiseProcENG.rc"\r
+                       Value="\build\x64\TortoiseGit\src\Resources\TortoiseProcENG.rc"\r
                />\r
        </Globals>\r
 </VisualStudioProject>\r