Changeset a3b01d1f74eb…
Parent 34d5e3a3faa1…
by
Changes to 6 files · Browse files at a3b01d1f74eb Showing diff from parent 34d5e3a3faa1 Diff from another changeset...
|
@@ -1,60 +0,0 @@ -
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "InitStatus.h"
-#include "Thgstatus.h"
-
-
-CInitStatus& CInitStatus::Inst()
-{
- static CInitStatus s;
- return s;
-}
-
-
-void CInitStatus::Add(CString& s, const char* missing)
-{
- if (!s.IsEmpty())
- s += ", ";
- s += missing;
-}
-
-
-CString CInitStatus::Check()
-{
- const CInitStatus& self = Inst();
- CString missing;
-
- if (self.unchanged_ == 0)
- Add(missing, "unchanged");
- if (self.added_ == 0)
- Add(missing, "added");
- if (self.modified_ == 0)
- Add(missing, "modified");
- if (self.notinrepo_ == 0)
- Add(missing, "notinrepo");
-
- if (missing.IsEmpty())
- return "";
-
- CString reason = "uninitialized handlers: " + missing;
- CTHgStatus::Error(reason);
- CString res = "InitStatus: error: " + reason;
- ATLTRACE("***** %s\n", (LPCTSTR)res);
- return res;
-}
|
|
@@ -1,33 +0,0 @@ -
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-class CInitStatus
-{
-public:
- int unchanged_;
- int added_;
- int modified_;
- int notinrepo_;
-
- static CInitStatus& Inst();
- static CString Check();
-
-private:
- CInitStatus() :
- unchanged_(0), added_(0), modified_(0), notinrepo_(0) {}
-
- static void Add(CString& s, const char* missing);
-};
|
@@ -20,7 +20,6 @@
#include "TortoiseUtils.h"
#include "StringUtils.h"
-#include "InitStatus.h"
#include "TortoiseHgCmenu.h"
#include "TortoiseHgDropHandler.h"
#include "TortoiseHgOverlay.h"
|
@@ -210,7 +210,6 @@ <ClCompile Include="Dirstate.cpp" />
<ClCompile Include="DirstateCache.cpp" />
<ClCompile Include="IconBitmapUtils.cpp" />
- <ClCompile Include="InitStatus.cpp" />
<ClCompile Include="QueryDirstate.cpp" />
<ClCompile Include="RegistryConfig.cpp" />
<ClCompile Include="StringUtils.cpp" />
@@ -232,7 +231,6 @@ <ClInclude Include="Dirstate.h" />
<ClInclude Include="DirstateCache.h" />
<ClInclude Include="IconBitmapUtils.h" />
- <ClInclude Include="InitStatus.h" />
<ClInclude Include="QueryDirstate.h" />
<ClInclude Include="RegistryConfig.h" />
<ClInclude Include="resource.h" />
|
@@ -33,9 +33,6 @@ <ClCompile Include="IconBitmapUtils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="InitStatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="QueryDirstate.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -95,9 +92,6 @@ <ClInclude Include="IconBitmapUtils.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="InitStatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="QueryDirstate.h">
<Filter>Header Files</Filter>
</ClInclude>
|
@@ -20,7 +20,6 @@ #include "StringUtils.h"
#include "THgStatus.h"
#include "Winstat.h"
-#include "InitStatus.h"
#include "SysInfo.h"
#include "RegistryConfig.h"
#include "TortoiseIconBitmap.h"
@@ -547,8 +546,6 @@
::InsertMenu(hMenu, indexMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
- CInitStatus::Check();
-
TweakMenuForVista(hMenu);
return ResultFromShort(idCmd - idCmdFirst);
@@ -804,7 +801,6 @@ CString strPath = strDir + "\\TortoiseHgOverlayServer.exe";
LaunchCommand(Quote(strPath), strDir);
}
- CInitStatus::Check();
return;
}
@@ -840,7 +836,6 @@ }
LaunchCommand(strHgCmd, strCwd);
- CInitStatus::Check();
}
void CTortoiseHgCmenuBase::PrintDebugHeader(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj)
|
Loading...