From: Frank Li Date: Wed, 14 Jan 2009 15:20:30 +0000 (+0800) Subject: Share resource file between TortoiseGitBlame and TortoiseProc X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=commitdiff_plain;h=658e7d1c3bd8e072736cd8b212c394078bc8affc Share resource file between TortoiseGitBlame and TortoiseProc But log speed is very slow Signed-off-by: Frank Li --- diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 48f8525..94a9738 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -214,7 +214,7 @@ int CGit::GetLog(CString& logOut, CString &hash, CTGitPath *path ,int count,int CString param; if(mask& LOG_INFO_STAT ) - param += _T(" -numstat "); + param += _T(" --numstat "); if(mask& LOG_INFO_FILESTATE) param += _T(" --raw "); diff --git a/src/Git/GitRev.cpp b/src/Git/GitRev.cpp index 9513952..bc9aee3 100644 --- a/src/Git/GitRev.cpp +++ b/src/Git/GitRev.cpp @@ -60,7 +60,7 @@ int GitRev::ParserFromLog(CString &log) CString key; CString text; CString filelist; - TCHAR mode; + TCHAR mode=0; CTGitPath path; this->m_Files.Clear(); m_Action=0; diff --git a/src/Git/GitStatusListCtrl.cpp b/src/Git/GitStatusListCtrl.cpp index 49241ac..46aebff 100644 --- a/src/Git/GitStatusListCtrl.cpp +++ b/src/Git/GitStatusListCtrl.cpp @@ -52,6 +52,7 @@ //#include "EditPropertiesDlg.h" //#include "CreateChangelistDlg.h" #include "XPTheme.h" +#include "CommonResource.h" const UINT CGitStatusListCtrl::SVNSLNM_ITEMCOUNTCHANGED = ::RegisterWindowMessage(_T("GITSLNM_ITEMCOUNTCHANGED")); diff --git a/src/Resources/CommonResource.h b/src/Resources/CommonResource.h new file mode 100644 index 0000000..cbe674c --- /dev/null +++ b/src/Resources/CommonResource.h @@ -0,0 +1,58 @@ + +#define IDS_LOG_GRAPH 20000 +#define IDS_LOG_ACTIONS 20001 +#define IDS_LOG_MESSAGE 20002 +#define IDS_LOG_AUTHOR 20003 +#define IDS_LOG_DATE 20004 +#define IDS_LOG_BUGIDS 20006 +#define IDS_LOG_ID 20007 +#define IDS_LOG_POPUP_COMPARE 20009 +#define IDS_LOG_POPUP_BLAMECOMPARE 20010 +#define IDS_LOG_POPUP_GNUDIFF_CH 20011 +#define IDS_LOG_POPUP_COMPAREWITHPREVIOUS 20012 +#define IDS_LOG_POPUP_OPEN 20014 +#define IDS_LOG_POPUP_OPENWITH 20015 +#define IDS_LOG_POPUP_BLAME 20016 +#define IDS_LOG_POPUP_VIEWREV 20019 +#define IDS_LOG_POPUP_VIEWPATHREV 20020 +#define IDS_LOG_POPUP_REVERTTOREV 20021 +#define IDS_LOG_POPUP_REVERTREV 20022 +#define IDS_LOG_POPUP_MERGEREV 20023 +#define IDS_LOG_POPUP_COMPARETWO 20024 +#define IDS_LOG_POPUP_BLAMEREVS 20025 +#define IDS_LOG_POPUP_GNUDIFF 20026 +#define IDS_LOG_POPUP_REVERTREVS 20027 +#define IDS_LOG_POPUP_MERGEREVS 20028 +#define IDS_LOG_POPUP_EDITAUTHOR 20029 +#define IDS_REPOBROWSE_SHOWREVPROP 20030 +#define IDS_LOG_POPUP_COPYTOCLIPBOARD 20031 +#define IDS_LOG_POPUP_FIND 20032 +#define IDS_ERR_THREADSTARTFAILED 20033 +#define IDS_SCIEDIT_ADDWORD 20034 +#define IDS_SCIEDIT_UNDO 20035 +#define IDS_SCIEDIT_REDO 20036 +#define IDS_SCIEDIT_CUT 20037 +#define IDS_SCIEDIT_COPY 20038 +#define IDS_SCIEDIT_PASTE 20039 +#define IDS_SCIEDIT_SELECTALL 20040 +#define IDS_SCIEDIT_SPLITLINES 20041 +#define IDS_SPELLEDIT_THESAURUS 20042 +#define IDS_SPELLEDIT_NOTHESAURUS 20043 + +#define IDS_APPNAME 20044 + +#define IDS_LOG_REVISION 20045 + +#define IDS_LOG_POPUP_SAVE 20046 +#define IDS_LOG_POPUP_UPDATE 20047 +#define IDS_LOG_POPUP_BLAMEDIFF 20048 +#define IDS_LOG_POPUP_BLAMEWITHPREVIOUS 20049 +#define IDS_LOG_POPUP_GETMERGELOGS 20050 +#define IDS_LOG_POPUP_DIFF 20051 +#define IDS_LOG_POPUP_EDITLOG 20052 +#define IDS_SPELLEDIT_CORRECTIONS 20053 +#define IDS_SPELLEDIT_NOCORRECTIONS 20054 + + + + diff --git a/src/Resources/TortoiseCommon.rc2 b/src/Resources/TortoiseCommon.rc2 new file mode 100644 index 0000000..dc23f60 --- /dev/null +++ b/src/Resources/TortoiseCommon.rc2 @@ -0,0 +1,94 @@ +// +// TortoiseCommon.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// +#include "..\Resources\CommonResource.h" + +///////////////////////////////////////////////////////////////////////////// +STRINGTABLE +BEGIN + IDS_LOG_GRAPH "Graph" + IDS_LOG_ACTIONS "Actions" + IDS_LOG_MESSAGE "Message" + IDS_LOG_REVISION "Revision" + IDS_LOG_AUTHOR "Author" + IDS_LOG_DATE "Date" + IDS_LOG_BUGIDS "Bug-ID" + IDS_LOG_ID "ID" + IDS_LOG_POPUP_COMPARE "Compare with &working copy" + IDS_LOG_POPUP_SAVE "Save revision &to..." + IDS_LOG_POPUP_COMPARETWO "&Compare revisions" + IDS_LOG_POPUP_UPDATE "&Update item to revision" +END + + +STRINGTABLE +BEGIN + IDS_LOG_POPUP_REVERTREVS "&Revert changes from these revisions" + IDS_LOG_POPUP_COPYTOCLIPBOARD "Copy to clipboard" + IDS_LOG_POPUP_REVERTTOREV "R&evert to this revision" + IDS_LOG_POPUP_BLAMECOMPARE "Compare and &blame with working BASE" + IDS_LOG_POPUP_BLAMEREVS "&Blame revisions" + IDS_LOG_POPUP_BLAMEDIFF "&Blame changes" + IDS_LOG_POPUP_VIEWREV "View revision in &webviewer" + IDS_LOG_POPUP_VIEWPATHREV "View revision for path in &webviewer" + IDS_LOG_POPUP_COMPAREWITHPREVIOUS "Compare with previous revision" + IDS_LOG_POPUP_BLAMEWITHPREVIOUS "Compare and blame with previous revision" + IDS_LOG_POPUP_BLAME "Blame" + IDS_LOG_POPUP_GNUDIFF_CH "Show changes as &unified diff" + IDS_LOG_POPUP_GETMERGELOGS "Get merge logs" + IDS_LOG_POPUP_MERGEREV "Merge revision to..." + IDS_LOG_POPUP_MERGEREVS "Merge revisions to..." +END + +STRINGTABLE +BEGIN + IDS_LOG_POPUP_DIFF "Show &changes" + IDS_LOG_POPUP_REVERTREV "&Revert changes from this revision" + IDS_LOG_POPUP_GNUDIFF "Show differences as &unified diff" + IDS_LOG_POPUP_FIND "Search &log messages..." + IDS_LOG_POPUP_OPEN "&Open" + IDS_LOG_POPUP_EDITAUTHOR "Edit author" + IDS_LOG_POPUP_EDITLOG "Edit log message" + IDS_LOG_POPUP_OPENWITH "Open with..." + IDS_REPOBROWSE_SHOWREVPROP "Show revision properties" +END + + +STRINGTABLE +BEGIN + IDS_ERR_THREADSTARTFAILED "Could not start thread!" +END + +STRINGTABLE +BEGIN + IDS_SCIEDIT_UNDO "&Undo" + IDS_SCIEDIT_REDO "&Redo" + IDS_SCIEDIT_CUT "Cu&t" + IDS_SCIEDIT_COPY "Cop&y" + IDS_SCIEDIT_PASTE "&Paste" + IDS_SCIEDIT_SELECTALL "Select &All" + IDS_SCIEDIT_ADDWORD "Add '%s' to dictionary" + IDS_SCIEDIT_SPLITLINES "Split lines" +END + + +STRINGTABLE +BEGIN + IDS_SPELLEDIT_THESAURUS "Thesaurus" + IDS_SPELLEDIT_CORRECTIONS "Corrections" + IDS_SPELLEDIT_NOCORRECTIONS "No spell corrections" + IDS_SPELLEDIT_NOTHESAURUS "No thesaurus suggestions" + IDS_APPNAME "TortoiseGit" + +END + diff --git a/src/Resources/TortoiseGitBlame.rc2 b/src/Resources/TortoiseGitBlame.rc2 index 44b4966..cb34520 100644 --- a/src/Resources/TortoiseGitBlame.rc2 +++ b/src/Resources/TortoiseGitBlame.rc2 @@ -13,16 +13,7 @@ ///////////////////////////////////////////////////////////////////////////// #include "..\version.h" #include "..\\TortoiseShell\\resourceshell.rc" +#include "..\Resources\TortoiseCommon.rc2" ///////////////////////////////////////////////////////////////////////////// -STRINGTABLE -BEGIN - IDS_LOG_GRAPH "Graph" - IDS_LOG_ACTIONS "Actions" - IDS_LOG_MESSAGE "Message" - IDS_LOG_REVISION "Revision" - IDS_LOG_AUTHOR "Author" - IDS_LOG_DATE "Date" - IDS_LOG_BUGIDS "Bug-ID" - IDS_LOG_ID "ID" -END + diff --git a/src/Resources/TortoiseProc.rc2 b/src/Resources/TortoiseProc.rc2 index c4afd7a..14b6b51 100644 --- a/src/Resources/TortoiseProc.rc2 +++ b/src/Resources/TortoiseProc.rc2 @@ -48,4 +48,5 @@ BEGIN END #include "..\\TortoiseShell\\resourceshell.rc" +#include "..\\Resources\\TortoiseCommon.rc2" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 7f347f8..e28c147 100644 Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ diff --git a/src/TortoiseGitBlame/Resource.h b/src/TortoiseGitBlame/Resource.h index 0b3e399..e3fa2f8 100644 --- a/src/TortoiseGitBlame/Resource.h +++ b/src/TortoiseGitBlame/Resource.h @@ -48,14 +48,6 @@ #define IDS_GIT_LOG_TAB 20307 -#define IDS_LOG_GRAPH 1184 -#define IDS_LOG_ACTIONS 1870 -#define IDS_LOG_MESSAGE 1207 -#define IDS_LOG_AUTHOR 1209 -#define IDS_LOG_DATE 1210 -#define IDS_LOG_REVISION 1208 -#define IDS_LOG_BUGIDS 1840 -#define IDS_LOG_ID 9605 // Next default values for new objects // #ifdef APSTUDIO_INVOKED diff --git a/src/TortoiseGitBlame/TortoiseGitBlame.vcproj b/src/TortoiseGitBlame/TortoiseGitBlame.vcproj index 46e2be4..80e2018 100644 --- a/src/TortoiseGitBlame/TortoiseGitBlame.vcproj +++ b/src/TortoiseGitBlame/TortoiseGitBlame.vcproj @@ -45,7 +45,7 @@ #include #include diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index 7e430f4..1966392 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -40,7 +40,7 @@ //#include #include "Commands\Command.h" - +#include "CommonResource.h" #include "..\version.h" #define STRUCT_IOVEC_DEFINED //#include "sasl.h" diff --git a/src/TortoiseProc/TortoiseProc.vcproj b/src/TortoiseProc/TortoiseProc.vcproj index 5b1c3be..078aa33 100644 --- a/src/TortoiseProc/TortoiseProc.vcproj +++ b/src/TortoiseProc/TortoiseProc.vcproj @@ -48,7 +48,7 @@