CommitDlg: Update empty file list message
[TortoiseGit.git] / src / TortoiseShell / ShellCache.h
blob4021c83039fbbb4ec477ffbfdb77b6f6bdee9e39
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012-2015 - TortoiseGit
4 // Copyright (C) 2003-2008 - Stefan Kueng
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "registry.h"
22 #include "Globals.h"
23 #include "GitAdminDir.h"
24 #include "Git.h"
26 #define REGISTRYTIMEOUT 2000
27 #define EXCLUDELISTTIMEOUT 5000
28 #define ADMINDIRTIMEOUT 10000
29 #define DRIVETYPETIMEOUT 300000 // 5 min
30 #define MENUTIMEOUT 100
32 #define DEFAULTMENUTOPENTRIES MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT
33 #define DEFAULTMENUEXTENTRIES MENUSVNIGNORE|MENUSTASHAPPLY|MENUSUBSYNC
35 typedef CComCritSecLock<CComCriticalSection> Locker;
37 /**
38 * \ingroup TortoiseShell
39 * Helper class which caches access to the registry. Also provides helper methods
40 * for checks against the settings stored in the registry.
42 class ShellCache
44 public:
45 enum CacheType
47 none,
48 exe,
49 dll,
50 dllFull,// same as dll except it uses commandline git tool with all status modes supported
52 ShellCache()
54 cachetype = CRegStdDWORD(_T("Software\\TortoiseGit\\CacheType"), GetSystemMetrics(SM_REMOTESESSION) ? dll : exe);
55 showrecursive = CRegStdDWORD(_T("Software\\TortoiseGit\\RecursiveOverlay"), TRUE);
56 folderoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\FolderOverlay"), TRUE);
57 driveremote = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemote"));
58 drivefixed = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFixed"), TRUE);
59 drivecdrom = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskCDROM"));
60 driveremove = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemovable"));
61 drivefloppy = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFloppy"));
62 driveram = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRAM"));
63 driveunknown = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskUnknown"));
64 shellmenuaccelerators = CRegStdDWORD(_T("Software\\TortoiseGit\\ShellMenuAccelerators"), TRUE);
65 excludelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
66 includelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
67 simplecontext = CRegStdDWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE);
68 unversionedasmodified = CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE);
69 recursesubmodules = CRegStdDWORD(_T("Software\\TortoiseGit\\TGitCacheRecurseSubmodules"), FALSE);
70 hidemenusforunversioneditems = CRegStdDWORD(_T("Software\\TortoiseGit\\HideMenusForUnversionedItems"), FALSE);
71 showunversionedoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE);
72 showignoredoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE);
73 getlocktop = CRegStdDWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE);
74 excludedasnormal = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE);
75 cachetypeticker = GetTickCount();
76 recursiveticker = cachetypeticker;
77 folderoverlayticker = cachetypeticker;
78 driveticker = cachetypeticker;
79 drivetypeticker = cachetypeticker;
80 langticker = cachetypeticker;
81 excludelistticker = cachetypeticker;
82 includelistticker = cachetypeticker;
83 simplecontextticker = cachetypeticker;
84 shellmenuacceleratorsticker = cachetypeticker;
85 unversionedasmodifiedticker = cachetypeticker;
86 recursesubmodulesticker = cachetypeticker;
87 showunversionedoverlayticker = cachetypeticker;
88 showignoredoverlayticker = cachetypeticker;
89 admindirticker = cachetypeticker;
90 getlocktopticker = cachetypeticker;
91 excludedasnormalticker = cachetypeticker;
92 hidemenusforunversioneditemsticker = cachetypeticker;
93 excontextticker = cachetypeticker;
95 unsigned __int64 entries = (DEFAULTMENUTOPENTRIES);
96 menulayoutlow = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), entries&0xFFFFFFFF);
97 menulayouthigh = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), entries>>32);
98 layoutticker = cachetypeticker;
100 unsigned __int64 ext = (DEFAULTMENUEXTENTRIES);
101 menuextlow = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesLow"), ext&0xFFFFFFFF );
102 menuexthigh = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesHigh"), ext>>32 );
103 exticker = cachetypeticker;
105 menumasklow_lm = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE, HKEY_LOCAL_MACHINE);
106 menumaskhigh_lm = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE, HKEY_LOCAL_MACHINE);
107 menumasklow_cu = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
108 menumaskhigh_cu = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
109 menumaskticker = cachetypeticker;
110 langid = CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
111 blockstatus = CRegStdDWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
112 blockstatusticker = cachetypeticker;
113 for (int i = 0; i < 27; ++i)
115 drivetypecache[i] = (UINT)-1;
117 // A: and B: are floppy disks
118 drivetypecache[0] = DRIVE_REMOVABLE;
119 drivetypecache[1] = DRIVE_REMOVABLE;
120 drivetypepathcache[0] = 0;
121 sAdminDirCacheKey.reserve(MAX_PATH); // MAX_PATH as buffer reservation ok.
122 nocontextpaths = CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
123 m_critSec.Init();
125 void ForceRefresh()
127 cachetype.read();
128 showrecursive.read();
129 folderoverlay.read();
130 driveremote.read();
131 drivefixed.read();
132 drivecdrom.read();
133 driveremove.read();
134 drivefloppy.read();
135 driveram.read();
136 driveunknown.read();
137 excludelist.read();
138 includelist.read();
139 simplecontext.read();
140 shellmenuaccelerators.read();
141 unversionedasmodified.read();
142 recursesubmodules.read();
143 showunversionedoverlay.read();
144 showignoredoverlay.read();
145 excludedasnormal.read();
146 hidemenusforunversioneditems.read();
147 menulayoutlow.read();
148 menulayouthigh.read();
149 langid.read();
150 blockstatus.read();
151 getlocktop.read();
152 menumasklow_lm.read();
153 menumaskhigh_lm.read();
154 menumasklow_cu.read();
155 menumaskhigh_cu.read();
156 nocontextpaths.read();
158 CacheType GetCacheType()
160 if ((GetTickCount() - REGISTRYTIMEOUT) > cachetypeticker)
162 cachetypeticker = GetTickCount();
163 cachetype.read();
165 return CacheType(DWORD((cachetype)));
167 DWORD BlockStatus()
169 if ((GetTickCount() - REGISTRYTIMEOUT) > blockstatusticker)
171 blockstatusticker = GetTickCount();
172 blockstatus.read();
174 return (blockstatus);
176 unsigned __int64 GetMenuLayout()
178 if ((GetTickCount() - REGISTRYTIMEOUT) > layoutticker)
180 layoutticker = GetTickCount();
181 menulayoutlow.read();
182 menulayouthigh.read();
184 unsigned __int64 temp = unsigned __int64(DWORD(menulayouthigh))<<32;
185 temp |= unsigned __int64(DWORD(menulayoutlow));
186 return temp;
189 unsigned __int64 GetMenuExt()
191 if ((GetTickCount() - REGISTRYTIMEOUT) > exticker)
193 exticker = GetTickCount();
194 menuextlow.read();
195 menuexthigh.read();
197 unsigned __int64 temp = unsigned __int64(DWORD(menuexthigh))<<32;
198 temp |= unsigned __int64(DWORD(menuextlow));
199 return temp;
202 unsigned __int64 GetMenuMask()
204 if ((GetTickCount() - REGISTRYTIMEOUT) > menumaskticker)
206 menumaskticker = GetTickCount();
207 menumasklow_lm.read();
208 menumaskhigh_lm.read();
209 menumasklow_cu.read();
210 menumaskhigh_cu.read();
212 DWORD low = (DWORD)menumasklow_lm | (DWORD)menumasklow_cu;
213 DWORD high = (DWORD)menumaskhigh_lm | (DWORD)menumaskhigh_cu;
214 unsigned __int64 temp = unsigned __int64(high)<<32;
215 temp |= unsigned __int64(low);
216 return temp;
218 BOOL IsRecursive()
220 if ((GetTickCount() - REGISTRYTIMEOUT)>recursiveticker)
222 recursiveticker = GetTickCount();
223 showrecursive.read();
225 return (showrecursive);
227 BOOL IsFolderOverlay()
229 if ((GetTickCount() - REGISTRYTIMEOUT)>folderoverlayticker)
231 folderoverlayticker = GetTickCount();
232 folderoverlay.read();
234 return (folderoverlay);
236 BOOL IsSimpleContext()
238 if ((GetTickCount() - REGISTRYTIMEOUT)>simplecontextticker)
240 simplecontextticker = GetTickCount();
241 simplecontext.read();
243 return (simplecontext!=0);
245 BOOL HasShellMenuAccelerators()
247 if ((GetTickCount() - shellmenuacceleratorsticker)>REGISTRYTIMEOUT)
249 shellmenuacceleratorsticker = GetTickCount();
250 shellmenuaccelerators.read();
252 return (shellmenuaccelerators!=0);
254 BOOL IsUnversionedAsModified()
256 if ((GetTickCount() - REGISTRYTIMEOUT)>unversionedasmodifiedticker)
258 unversionedasmodifiedticker = GetTickCount();
259 unversionedasmodified.read();
261 return (unversionedasmodified);
263 BOOL IsRecurseSubmodules()
265 if ((GetTickCount() - REGISTRYTIMEOUT) > recursesubmodulesticker)
267 recursesubmodulesticker = GetTickCount();
268 recursesubmodules.read();
270 return (recursesubmodules);
272 BOOL ShowUnversionedOverlay()
274 if ((GetTickCount() - REGISTRYTIMEOUT)>showunversionedoverlayticker)
276 showunversionedoverlayticker = GetTickCount();
277 showunversionedoverlay.read();
279 return (showunversionedoverlay);
281 BOOL ShowIgnoredOverlay()
283 if ((GetTickCount() - REGISTRYTIMEOUT)>showignoredoverlayticker)
285 showignoredoverlayticker = GetTickCount();
286 showignoredoverlay.read();
288 return (showignoredoverlay);
290 BOOL IsGetLockTop()
292 if ((GetTickCount() - REGISTRYTIMEOUT)>getlocktopticker)
294 getlocktopticker = GetTickCount();
295 getlocktop.read();
297 return (getlocktop);
299 BOOL ShowExcludedAsNormal()
301 if ((GetTickCount() - REGISTRYTIMEOUT)>excludedasnormalticker)
303 excludedasnormalticker = GetTickCount();
304 excludedasnormal.read();
306 return (excludedasnormal);
308 BOOL HideMenusForUnversionedItems()
310 if ((GetTickCount() - hidemenusforunversioneditemsticker)>REGISTRYTIMEOUT)
312 hidemenusforunversioneditemsticker = GetTickCount();
313 hidemenusforunversioneditems.read();
315 return (hidemenusforunversioneditems);
317 BOOL IsRemote()
319 DriveValid();
320 return (driveremote);
322 BOOL IsFixed()
324 DriveValid();
325 return (drivefixed);
327 BOOL IsCDRom()
329 DriveValid();
330 return (drivecdrom);
332 BOOL IsRemovable()
334 DriveValid();
335 return (driveremove);
337 BOOL IsRAM()
339 DriveValid();
340 return (driveram);
342 BOOL IsUnknown()
344 DriveValid();
345 return (driveunknown);
347 BOOL IsContextPathAllowed(LPCTSTR path)
349 Locker lock(m_critSec);
350 ExcludeContextValid();
351 for (std::vector<stdstring>::iterator I = excontextvector.begin(); I != excontextvector.end(); ++I)
353 if (I->empty())
354 continue;
355 if (!I->empty() && I->at(I->size()-1)=='*')
357 stdstring str = I->substr(0, I->size()-1);
358 if (_tcsnicmp(str.c_str(), path, str.size())==0)
359 return FALSE;
361 else if (_tcsicmp(I->c_str(), path)==0)
362 return FALSE;
364 return TRUE;
366 BOOL IsPathAllowed(LPCTSTR path)
368 Locker lock(m_critSec);
369 IncludeListValid();
370 for (std::vector<stdstring>::iterator I = invector.begin(); I != invector.end(); ++I)
372 if (I->empty())
373 continue;
374 if (I->at(I->size()-1)=='*')
376 stdstring str = I->substr(0, I->size()-1);
377 if (_tcsnicmp(str.c_str(), path, str.size())==0)
378 return TRUE;
379 if (!str.empty() && (str.at(str.size()-1) == '\\') && (_tcsnicmp(str.c_str(), path, str.size()-1)==0))
380 return TRUE;
382 else if (_tcsicmp(I->c_str(), path)==0)
383 return TRUE;
384 else if ((I->at(I->size()-1) == '\\') &&
385 ((_tcsnicmp(I->c_str(), path, I->size())==0) || (_tcsicmp(I->c_str(), path)==0)) )
386 return TRUE;
389 UINT drivetype = 0;
390 int drivenumber = PathGetDriveNumber(path);
391 if ((drivenumber >=0)&&(drivenumber < 25))
393 drivetype = drivetypecache[drivenumber];
394 if ((drivetype == -1)||((GetTickCount() - DRIVETYPETIMEOUT)>drivetypeticker))
396 if ((drivenumber == 0)||(drivenumber == 1))
397 drivetypecache[drivenumber] = DRIVE_REMOVABLE;
398 else
400 drivetypeticker = GetTickCount();
401 TCHAR pathbuf[MAX_PATH+4] = {0}; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
402 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
403 PathStripToRoot(pathbuf);
404 PathAddBackslash(pathbuf);
405 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": GetDriveType for %s, Drive %d\n"), pathbuf, drivenumber);
406 drivetype = GetDriveType(pathbuf);
407 drivetypecache[drivenumber] = drivetype;
411 else
413 TCHAR pathbuf[MAX_PATH+4] = {0}; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
414 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
415 if (PathIsUNCServer(pathbuf))
416 drivetype = DRIVE_REMOTE;
417 else
419 PathStripToRoot(pathbuf);
420 PathAddBackslash(pathbuf);
421 if (_tcsncmp(pathbuf, drivetypepathcache, MAX_PATH-1)==0) // MAX_PATH ok.
422 drivetype = drivetypecache[26];
423 else
425 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T("GetDriveType for %s\n"), pathbuf);
426 drivetype = GetDriveType(pathbuf);
427 drivetypecache[26] = drivetype;
428 _tcsncpy_s(drivetypepathcache, MAX_PATH, pathbuf, MAX_PATH - 1); // MAX_PATH ok.
432 if ((drivetype == DRIVE_REMOVABLE)&&(!IsRemovable()))
433 return FALSE;
434 if ((drivetype == DRIVE_REMOVABLE)&&(drivefloppy == 0)&&((drivenumber==0)||(drivenumber==1)))
435 return FALSE;
436 if ((drivetype == DRIVE_FIXED)&&(!IsFixed()))
437 return FALSE;
438 if (((drivetype == DRIVE_REMOTE)||(drivetype == DRIVE_NO_ROOT_DIR))&&(!IsRemote()))
439 return FALSE;
440 if ((drivetype == DRIVE_CDROM)&&(!IsCDRom()))
441 return FALSE;
442 if ((drivetype == DRIVE_RAMDISK)&&(!IsRAM()))
443 return FALSE;
444 if ((drivetype == DRIVE_UNKNOWN)&&(IsUnknown()))
445 return FALSE;
447 ExcludeListValid();
448 for (std::vector<stdstring>::iterator I = exvector.begin(); I != exvector.end(); ++I)
450 if (I->empty())
451 continue;
452 if (I->size() && I->at(I->size()-1)=='*')
454 stdstring str = I->substr(0, I->size()-1);
455 if (_tcsnicmp(str.c_str(), path, str.size())==0)
456 return FALSE;
458 else if (_tcsicmp(I->c_str(), path)==0)
459 return FALSE;
461 return TRUE;
463 DWORD GetLangID()
465 if ((GetTickCount() - REGISTRYTIMEOUT) > langticker)
467 langticker = GetTickCount();
468 langid.read();
470 return (langid);
472 BOOL HasGITAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL)
474 size_t len = _tcslen(path);
475 std::unique_ptr<TCHAR[]> buf(new TCHAR[len + 1]);
476 _tcscpy_s(buf.get(), len + 1, path);
477 if (! bIsDir)
479 TCHAR * ptr = _tcsrchr(buf.get(), '\\');
480 if (ptr != 0)
482 *ptr = 0;
485 if ((GetTickCount() - ADMINDIRTIMEOUT) < admindirticker)
487 std::map<stdstring, AdminDir_s>::iterator iter;
488 sAdminDirCacheKey.assign(buf.get());
489 if ((iter = admindircache.find(sAdminDirCacheKey)) != admindircache.end())
491 if (ProjectTopDir && iter->second.bHasAdminDir)
492 *ProjectTopDir = iter->second.sProjectRoot.c_str();
493 return iter->second.bHasAdminDir;
496 CString sProjectRoot;
497 BOOL hasAdminDir = GitAdminDir::HasAdminDir(buf.get(), true, &sProjectRoot);
498 admindirticker = GetTickCount();
499 Locker lock(m_critSec);
501 AdminDir_s &ad = admindircache[buf.get()];
502 ad.bHasAdminDir = hasAdminDir;
503 if (hasAdminDir)
505 ad.sProjectRoot.assign(sProjectRoot);
507 if (ProjectTopDir)
508 *ProjectTopDir = sProjectRoot;
511 return hasAdminDir;
513 private:
514 void DriveValid()
516 if ((GetTickCount() - REGISTRYTIMEOUT)>driveticker)
518 driveticker = GetTickCount();
519 driveremote.read();
520 drivefixed.read();
521 drivecdrom.read();
522 driveremove.read();
523 drivefloppy.read();
526 void ExcludeContextValid()
528 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excontextticker)
530 Locker lock(m_critSec);
531 excontextticker = GetTickCount();
532 nocontextpaths.read();
533 if (excludecontextstr.compare((stdstring)nocontextpaths)==0)
534 return;
535 excludecontextstr = (stdstring)nocontextpaths;
536 excontextvector.clear();
537 size_t pos = 0, pos_ant = 0;
538 pos = excludecontextstr.find(_T("\n"), pos_ant);
539 while (pos != stdstring::npos)
541 stdstring token = excludecontextstr.substr(pos_ant, pos-pos_ant);
542 excontextvector.push_back(token);
543 pos_ant = pos+1;
544 pos = excludecontextstr.find(_T("\n"), pos_ant);
546 if (!excludecontextstr.empty())
548 excontextvector.push_back(excludecontextstr.substr(pos_ant, excludecontextstr.size()-1));
550 excludecontextstr = (stdstring)nocontextpaths;
553 void ExcludeListValid()
555 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excludelistticker)
557 Locker lock(m_critSec);
558 excludelistticker = GetTickCount();
559 excludelist.read();
560 if (excludeliststr.compare((stdstring)excludelist)==0)
561 return;
562 excludeliststr = (stdstring)excludelist;
563 exvector.clear();
564 size_t pos = 0, pos_ant = 0;
565 pos = excludeliststr.find(_T("\n"), pos_ant);
566 while (pos != stdstring::npos)
568 stdstring token = excludeliststr.substr(pos_ant, pos-pos_ant);
569 exvector.push_back(token);
570 pos_ant = pos+1;
571 pos = excludeliststr.find(_T("\n"), pos_ant);
573 if (!excludeliststr.empty())
575 exvector.push_back(excludeliststr.substr(pos_ant, excludeliststr.size()-1));
577 excludeliststr = (stdstring)excludelist;
580 void IncludeListValid()
582 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>includelistticker)
584 Locker lock(m_critSec);
585 includelistticker = GetTickCount();
586 includelist.read();
587 if (includeliststr.compare((stdstring)includelist)==0)
588 return;
589 includeliststr = (stdstring)includelist;
590 invector.clear();
591 size_t pos = 0, pos_ant = 0;
592 pos = includeliststr.find(_T("\n"), pos_ant);
593 while (pos != stdstring::npos)
595 stdstring token = includeliststr.substr(pos_ant, pos-pos_ant);
596 invector.push_back(token);
597 pos_ant = pos+1;
598 pos = includeliststr.find(_T("\n"), pos_ant);
600 if (!includeliststr.empty())
602 invector.push_back(includeliststr.substr(pos_ant, includeliststr.size()-1));
604 includeliststr = (stdstring)includelist;
608 struct AdminDir_s
610 BOOL bHasAdminDir;
611 stdstring sProjectRoot;
613 public:
614 CRegStdDWORD cachetype;
615 CRegStdDWORD blockstatus;
616 CRegStdDWORD langid;
617 CRegStdDWORD showrecursive;
618 CRegStdDWORD folderoverlay;
619 CRegStdDWORD getlocktop;
620 CRegStdDWORD driveremote;
621 CRegStdDWORD drivefixed;
622 CRegStdDWORD drivecdrom;
623 CRegStdDWORD driveremove;
624 CRegStdDWORD drivefloppy;
625 CRegStdDWORD driveram;
626 CRegStdDWORD driveunknown;
627 CRegStdDWORD menulayoutlow; /* Fist level mask */
628 CRegStdDWORD menulayouthigh;
629 CRegStdDWORD shellmenuaccelerators;
630 CRegStdDWORD menuextlow; /* ext menu mask */
631 CRegStdDWORD menuexthigh;
632 CRegStdDWORD simplecontext;
633 CRegStdDWORD menumasklow_lm;
634 CRegStdDWORD menumaskhigh_lm;
635 CRegStdDWORD menumasklow_cu;
636 CRegStdDWORD menumaskhigh_cu;
637 CRegStdDWORD unversionedasmodified;
638 CRegStdDWORD recursesubmodules;
639 CRegStdDWORD showunversionedoverlay;
640 CRegStdDWORD showignoredoverlay;
641 CRegStdDWORD excludedasnormal;
642 CRegStdString excludelist;
643 CRegStdDWORD hidemenusforunversioneditems;
644 stdstring excludeliststr;
645 std::vector<stdstring> exvector;
646 CRegStdString includelist;
647 stdstring includeliststr;
648 std::vector<stdstring> invector;
649 DWORD cachetypeticker;
650 DWORD recursiveticker;
651 DWORD folderoverlayticker;
652 DWORD getlocktopticker;
653 DWORD driveticker;
654 DWORD drivetypeticker;
655 DWORD layoutticker;
656 DWORD exticker;
657 DWORD menumaskticker;
658 DWORD langticker;
659 DWORD blockstatusticker;
660 DWORD excludelistticker;
661 DWORD includelistticker;
662 DWORD simplecontextticker;
663 DWORD shellmenuacceleratorsticker;
664 DWORD unversionedasmodifiedticker;
665 DWORD recursesubmodulesticker;
666 DWORD showunversionedoverlayticker;
667 DWORD showignoredoverlayticker;
668 DWORD excludedasnormalticker;
669 DWORD hidemenusforunversioneditemsticker;
670 UINT drivetypecache[27];
671 TCHAR drivetypepathcache[MAX_PATH]; // MAX_PATH ok.
672 TCHAR szDecSep[5];
673 TCHAR szThousandsSep[5];
674 std::map<stdstring, AdminDir_s> admindircache;
675 stdstring sAdminDirCacheKey;
676 CRegStdString nocontextpaths;
677 stdstring excludecontextstr;
678 std::vector<stdstring> excontextvector;
679 DWORD excontextticker;
680 DWORD admindirticker;
681 CComCriticalSection m_critSec;