1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - Stefan Kueng
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include "GitAdminDir.h"
25 #define REGISTRYTIMEOUT 2000
26 #define EXCLUDELISTTIMEOUT 5000
27 #define ADMINDIRTIMEOUT 10000
28 #define DRIVETYPETIMEOUT 300000 // 5 min
29 #define NUMBERFMTTIMEOUT 300000
30 #define MENUTIMEOUT 100
32 #define DEFAULTMENUTOPENTRIES MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT
33 #define DEFAULTMENUEXTENTRIES MENUSVNIGNORE|MENUREFLOG|MENUREFBROWSE|MENUSTASHAPPLY|MENUSUBSYNC
35 typedef CComCritSecLock
<CComCriticalSection
> Locker
;
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.
50 dllFull
,// same as dll except it uses commandline git tool with all status modes supported
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 excludelist
= CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
65 includelist
= CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
66 simplecontext
= CRegStdDWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE
);
67 unversionedasmodified
= CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE
);
68 hidemenusforunversioneditems
= CRegStdDWORD(_T("Software\\TortoiseGit\\HideMenusForUnversionedItems"), FALSE
);
69 showunversionedoverlay
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE
);
70 showignoredoverlay
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE
);
71 getlocktop
= CRegStdDWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE
);
72 excludedasnormal
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE
);
73 cachetypeticker
= GetTickCount();
74 recursiveticker
= cachetypeticker
;
75 folderoverlayticker
= cachetypeticker
;
76 driveticker
= cachetypeticker
;
77 drivetypeticker
= cachetypeticker
;
78 langticker
= cachetypeticker
;
79 columnrevformatticker
= cachetypeticker
;
80 excludelistticker
= cachetypeticker
;
81 includelistticker
= cachetypeticker
;
82 simplecontextticker
= cachetypeticker
;
83 unversionedasmodifiedticker
= cachetypeticker
;
84 showunversionedoverlayticker
= cachetypeticker
;
85 showignoredoverlayticker
= cachetypeticker
;
86 admindirticker
= cachetypeticker
;
87 columnseverywhereticker
= cachetypeticker
;
88 getlocktopticker
= cachetypeticker
;
89 excludedasnormalticker
= cachetypeticker
;
90 hidemenusforunversioneditemsticker
= cachetypeticker
;
91 excontextticker
= cachetypeticker
;
93 unsigned __int64 entries
= (DEFAULTMENUTOPENTRIES
);
94 menulayoutlow
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), entries
&0xFFFFFFFF);
95 menulayouthigh
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), entries
>>32);
97 unsigned __int64 ext
= (DEFAULTMENUEXTENTRIES
);
98 menuextlow
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesLow"), ext
&0xFFFFFFFF );
99 menuexthigh
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesHigh"), ext
>>32 );
101 menumasklow_lm
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE
, HKEY_LOCAL_MACHINE
);
102 menumaskhigh_lm
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE
, HKEY_LOCAL_MACHINE
);
103 menumasklow_cu
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
104 menumaskhigh_cu
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
105 langid
= CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
106 blockstatus
= CRegStdDWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
107 columnseverywhere
= CRegStdDWORD(_T("Software\\TortoiseGit\\ColumnsEveryWhere"), FALSE
);
108 for (int i
=0; i
<27; i
++)
110 drivetypecache
[i
] = (UINT
)-1;
112 // A: and B: are floppy disks
113 drivetypecache
[0] = DRIVE_REMOVABLE
;
114 drivetypecache
[1] = DRIVE_REMOVABLE
;
116 columnrevformatticker
= GetTickCount();
117 SecureZeroMemory(&columnrevformat
, sizeof(NUMBERFMT
));
118 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, &szDecSep
[0], _countof(szDecSep
));
119 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_STHOUSAND
, &szThousandsSep
[0], _countof(szThousandsSep
));
120 columnrevformat
.lpDecimalSep
= szDecSep
;
121 columnrevformat
.lpThousandSep
= szThousandsSep
;
122 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SGROUPING
, &szBuffer
[0], _countof(szBuffer
));
123 columnrevformat
.Grouping
= _ttoi(szBuffer
);
124 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_INEGNUMBER
, &szBuffer
[0], _countof(szBuffer
));
125 columnrevformat
.NegativeOrder
= _ttoi(szBuffer
);
126 sAdminDirCacheKey
.reserve(MAX_PATH
); // MAX_PATH as buffer reservation ok.
127 nocontextpaths
= CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
133 showrecursive
.read();
134 folderoverlay
.read();
144 simplecontext
.read();
145 unversionedasmodified
.read();
146 showunversionedoverlay
.read();
147 showignoredoverlay
.read();
148 excludedasnormal
.read();
149 hidemenusforunversioneditems
.read();
150 menulayoutlow
.read();
151 menulayouthigh
.read();
154 columnseverywhere
.read();
156 menumasklow_lm
.read();
157 menumaskhigh_lm
.read();
158 menumasklow_cu
.read();
159 menumaskhigh_cu
.read();
160 nocontextpaths
.read();
162 CacheType
GetCacheType()
164 if ((GetTickCount() - REGISTRYTIMEOUT
) > cachetypeticker
)
166 cachetypeticker
= GetTickCount();
169 return CacheType(DWORD((cachetype
)));
173 if ((GetTickCount() - REGISTRYTIMEOUT
) > blockstatusticker
)
175 blockstatusticker
= GetTickCount();
178 return (blockstatus
);
180 unsigned __int64
GetMenuLayout()
182 if ((GetTickCount() - REGISTRYTIMEOUT
) > layoutticker
)
184 layoutticker
= GetTickCount();
185 menulayoutlow
.read();
186 menulayouthigh
.read();
188 unsigned __int64 temp
= unsigned __int64(DWORD(menulayouthigh
))<<32;
189 temp
|= unsigned __int64(DWORD(menulayoutlow
));
193 unsigned __int64
GetMenuExt()
195 if ((GetTickCount() - REGISTRYTIMEOUT
) > exticker
)
197 exticker
= GetTickCount();
201 unsigned __int64 temp
= unsigned __int64(DWORD(menuexthigh
))<<32;
202 temp
|= unsigned __int64(DWORD(menuextlow
));
206 unsigned __int64
GetMenuMask()
208 if ((GetTickCount() - REGISTRYTIMEOUT
) > menumaskticker
)
210 menumaskticker
= GetTickCount();
211 menumasklow_lm
.read();
212 menumaskhigh_lm
.read();
213 menumasklow_cu
.read();
214 menumaskhigh_cu
.read();
216 DWORD low
= (DWORD
)menumasklow_lm
| (DWORD
)menumasklow_cu
;
217 DWORD high
= (DWORD
)menumaskhigh_lm
| (DWORD
)menumaskhigh_cu
;
218 unsigned __int64 temp
= unsigned __int64(high
)<<32;
219 temp
|= unsigned __int64(low
);
224 if ((GetTickCount() - REGISTRYTIMEOUT
)>recursiveticker
)
226 recursiveticker
= GetTickCount();
227 showrecursive
.read();
229 return (showrecursive
);
231 BOOL
IsFolderOverlay()
233 if ((GetTickCount() - REGISTRYTIMEOUT
)>folderoverlayticker
)
235 folderoverlayticker
= GetTickCount();
236 folderoverlay
.read();
238 return (folderoverlay
);
240 BOOL
IsSimpleContext()
242 if ((GetTickCount() - REGISTRYTIMEOUT
)>simplecontextticker
)
244 simplecontextticker
= GetTickCount();
245 simplecontext
.read();
247 return (simplecontext
!=0);
249 BOOL
IsUnversionedAsModified()
251 if ((GetTickCount() - REGISTRYTIMEOUT
)>unversionedasmodifiedticker
)
253 unversionedasmodifiedticker
= GetTickCount();
254 unversionedasmodified
.read();
256 return (unversionedasmodified
);
258 BOOL
ShowUnversionedOverlay()
260 if ((GetTickCount() - REGISTRYTIMEOUT
)>showunversionedoverlayticker
)
262 showunversionedoverlayticker
= GetTickCount();
263 showunversionedoverlay
.read();
265 return (showunversionedoverlay
);
267 BOOL
ShowIgnoredOverlay()
269 if ((GetTickCount() - REGISTRYTIMEOUT
)>showignoredoverlayticker
)
271 showignoredoverlayticker
= GetTickCount();
272 showignoredoverlay
.read();
274 return (showignoredoverlay
);
278 if ((GetTickCount() - REGISTRYTIMEOUT
)>getlocktopticker
)
280 getlocktopticker
= GetTickCount();
285 BOOL
ShowExcludedAsNormal()
287 if ((GetTickCount() - REGISTRYTIMEOUT
)>excludedasnormalticker
)
289 excludedasnormalticker
= GetTickCount();
290 excludedasnormal
.read();
292 return (excludedasnormal
);
294 BOOL
HideMenusForUnversionedItems()
296 if ((GetTickCount() - hidemenusforunversioneditemsticker
)>REGISTRYTIMEOUT
)
298 hidemenusforunversioneditemsticker
= GetTickCount();
299 hidemenusforunversioneditems
.read();
301 return (hidemenusforunversioneditems
);
306 return (driveremote
);
321 return (driveremove
);
331 return (driveunknown
);
333 BOOL
IsContextPathAllowed(LPCTSTR path
)
335 Locker
lock(m_critSec
);
336 ExcludeContextValid();
337 for (std::vector
<stdstring
>::iterator I
= excontextvector
.begin(); I
!= excontextvector
.end(); ++I
)
341 if (I
->size() && I
->at(I
->size()-1)=='*')
343 stdstring str
= I
->substr(0, I
->size()-1);
344 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
347 else if (_tcsicmp(I
->c_str(), path
)==0)
352 BOOL
IsPathAllowed(LPCTSTR path
)
354 Locker
lock(m_critSec
);
356 for (std::vector
<stdstring
>::iterator I
= invector
.begin(); I
!= invector
.end(); ++I
)
360 if (I
->at(I
->size()-1)=='*')
362 stdstring str
= I
->substr(0, I
->size()-1);
363 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
365 if (!str
.empty() && (str
.at(str
.size()-1) == '\\') && (_tcsnicmp(str
.c_str(), path
, str
.size()-1)==0))
368 else if (_tcsicmp(I
->c_str(), path
)==0)
370 else if ((I
->at(I
->size()-1) == '\\') &&
371 ((_tcsnicmp(I
->c_str(), path
, I
->size())==0) || (_tcsicmp(I
->c_str(), path
)==0)) )
376 int drivenumber
= PathGetDriveNumber(path
);
377 if ((drivenumber
>=0)&&(drivenumber
< 25))
379 drivetype
= drivetypecache
[drivenumber
];
380 if ((drivetype
== -1)||((GetTickCount() - DRIVETYPETIMEOUT
)>drivetypeticker
))
382 if ((drivenumber
== 0)||(drivenumber
== 1))
383 drivetypecache
[drivenumber
] = DRIVE_REMOVABLE
;
386 drivetypeticker
= GetTickCount();
387 TCHAR pathbuf
[MAX_PATH
+4]; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
388 _tcsncpy_s(pathbuf
, MAX_PATH
+4, path
, MAX_PATH
+3);
389 PathStripToRoot(pathbuf
);
390 PathAddBackslash(pathbuf
);
391 ATLTRACE2(_T("GetDriveType for %s, Drive %d\n"), pathbuf
, drivenumber
);
392 drivetype
= GetDriveType(pathbuf
);
393 drivetypecache
[drivenumber
] = drivetype
;
399 TCHAR pathbuf
[MAX_PATH
+4]; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
400 _tcsncpy_s(pathbuf
, MAX_PATH
+4, path
, MAX_PATH
+3);
401 if (PathIsUNCServer(pathbuf
))
402 drivetype
= DRIVE_REMOTE
;
405 PathStripToRoot(pathbuf
);
406 PathAddBackslash(pathbuf
);
407 if (_tcsncmp(pathbuf
, drivetypepathcache
, MAX_PATH
-1)==0) // MAX_PATH ok.
408 drivetype
= drivetypecache
[26];
411 ATLTRACE2(_T("GetDriveType for %s\n"), pathbuf
);
412 drivetype
= GetDriveType(pathbuf
);
413 drivetypecache
[26] = drivetype
;
414 _tcsncpy_s(drivetypepathcache
, MAX_PATH
, pathbuf
, MAX_PATH
); // MAX_PATH ok.
418 if ((drivetype
== DRIVE_REMOVABLE
)&&(!IsRemovable()))
420 if ((drivetype
== DRIVE_REMOVABLE
)&&(drivefloppy
== 0)&&((drivenumber
==0)||(drivenumber
==1)))
422 if ((drivetype
== DRIVE_FIXED
)&&(!IsFixed()))
424 if (((drivetype
== DRIVE_REMOTE
)||(drivetype
== DRIVE_NO_ROOT_DIR
))&&(!IsRemote()))
426 if ((drivetype
== DRIVE_CDROM
)&&(!IsCDRom()))
428 if ((drivetype
== DRIVE_RAMDISK
)&&(!IsRAM()))
430 if ((drivetype
== DRIVE_UNKNOWN
)&&(IsUnknown()))
434 for (std::vector
<stdstring
>::iterator I
= exvector
.begin(); I
!= exvector
.end(); ++I
)
438 if (I
->size() && I
->at(I
->size()-1)=='*')
440 stdstring str
= I
->substr(0, I
->size()-1);
441 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
444 else if (_tcsicmp(I
->c_str(), path
)==0)
451 if ((GetTickCount() - REGISTRYTIMEOUT
) > langticker
)
453 langticker
= GetTickCount();
458 NUMBERFMT
* GetNumberFmt()
460 if ((GetTickCount() - NUMBERFMTTIMEOUT
) > columnrevformatticker
)
463 columnrevformatticker
= GetTickCount();
464 SecureZeroMemory(&columnrevformat
, sizeof(NUMBERFMT
));
465 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, &szDecSep
[0], _countof(szDecSep
));
466 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_STHOUSAND
, &szThousandsSep
[0], _countof(szThousandsSep
));
467 columnrevformat
.lpDecimalSep
= szDecSep
;
468 columnrevformat
.lpThousandSep
= szThousandsSep
;
469 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SGROUPING
, &szBuffer
[0], _countof(szBuffer
));
470 columnrevformat
.Grouping
= _ttoi(szBuffer
);
471 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_INEGNUMBER
, &szBuffer
[0], _countof(szBuffer
));
472 columnrevformat
.NegativeOrder
= _ttoi(szBuffer
);
474 return &columnrevformat
;
476 BOOL
HasGITAdminDir(LPCTSTR path
, BOOL bIsDir
, CString
*ProjectTopDir
= NULL
)
478 size_t len
= _tcslen(path
);
479 TCHAR
* buf
= new TCHAR
[len
+1];
480 _tcscpy_s(buf
, len
+1, path
);
483 TCHAR
* ptr
= _tcsrchr(buf
, '\\');
489 if ((GetTickCount() - ADMINDIRTIMEOUT
) < admindirticker
)
491 std::map
<stdstring
, AdminDir_s
>::iterator iter
;
492 sAdminDirCacheKey
.assign(buf
);
493 if ((iter
= admindircache
.find(sAdminDirCacheKey
)) != admindircache
.end())
496 if (ProjectTopDir
&& iter
->second
.bHasAdminDir
)
497 *ProjectTopDir
= iter
->second
.sProjectRoot
.c_str();
498 return iter
->second
.bHasAdminDir
;
501 CString sProjectRoot
;
502 BOOL hasAdminDir
= g_GitAdminDir
.HasAdminDir(buf
, true, &sProjectRoot
);
503 admindirticker
= GetTickCount();
504 Locker
lock(m_critSec
);
506 AdminDir_s
&ad
= admindircache
[buf
];
507 ad
.bHasAdminDir
= hasAdminDir
;
510 ad
.sProjectRoot
.assign(sProjectRoot
);
513 *ProjectTopDir
= sProjectRoot
;
519 bool IsColumnsEveryWhere()
521 if ((GetTickCount() - REGISTRYTIMEOUT
) > columnseverywhereticker
)
523 columnseverywhereticker
= GetTickCount();
524 columnseverywhere
.read();
526 return !!(DWORD
)columnseverywhere
;
531 if ((GetTickCount() - REGISTRYTIMEOUT
)>driveticker
)
533 driveticker
= GetTickCount();
541 void ExcludeContextValid()
543 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>excontextticker
)
545 Locker
lock(m_critSec
);
546 excontextticker
= GetTickCount();
547 nocontextpaths
.read();
548 if (excludecontextstr
.compare((stdstring
)nocontextpaths
)==0)
550 excludecontextstr
= (stdstring
)nocontextpaths
;
551 excontextvector
.clear();
552 size_t pos
= 0, pos_ant
= 0;
553 pos
= excludecontextstr
.find(_T("\n"), pos_ant
);
554 while (pos
!= stdstring::npos
)
556 stdstring token
= excludecontextstr
.substr(pos_ant
, pos
-pos_ant
);
557 excontextvector
.push_back(token
);
559 pos
= excludecontextstr
.find(_T("\n"), pos_ant
);
561 if (!excludecontextstr
.empty())
563 excontextvector
.push_back(excludecontextstr
.substr(pos_ant
, excludecontextstr
.size()-1));
565 excludecontextstr
= (stdstring
)nocontextpaths
;
568 void ExcludeListValid()
570 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>excludelistticker
)
572 Locker
lock(m_critSec
);
573 excludelistticker
= GetTickCount();
575 if (excludeliststr
.compare((stdstring
)excludelist
)==0)
577 excludeliststr
= (stdstring
)excludelist
;
579 size_t pos
= 0, pos_ant
= 0;
580 pos
= excludeliststr
.find(_T("\n"), pos_ant
);
581 while (pos
!= stdstring::npos
)
583 stdstring token
= excludeliststr
.substr(pos_ant
, pos
-pos_ant
);
584 exvector
.push_back(token
);
586 pos
= excludeliststr
.find(_T("\n"), pos_ant
);
588 if (!excludeliststr
.empty())
590 exvector
.push_back(excludeliststr
.substr(pos_ant
, excludeliststr
.size()-1));
592 excludeliststr
= (stdstring
)excludelist
;
595 void IncludeListValid()
597 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>includelistticker
)
599 Locker
lock(m_critSec
);
600 includelistticker
= GetTickCount();
602 if (includeliststr
.compare((stdstring
)includelist
)==0)
604 includeliststr
= (stdstring
)includelist
;
606 size_t pos
= 0, pos_ant
= 0;
607 pos
= includeliststr
.find(_T("\n"), pos_ant
);
608 while (pos
!= stdstring::npos
)
610 stdstring token
= includeliststr
.substr(pos_ant
, pos
-pos_ant
);
611 invector
.push_back(token
);
613 pos
= includeliststr
.find(_T("\n"), pos_ant
);
615 if (!includeliststr
.empty())
617 invector
.push_back(includeliststr
.substr(pos_ant
, includeliststr
.size()-1));
619 includeliststr
= (stdstring
)includelist
;
626 stdstring sProjectRoot
;
629 CRegStdDWORD cachetype
;
630 CRegStdDWORD blockstatus
;
632 CRegStdDWORD showrecursive
;
633 CRegStdDWORD folderoverlay
;
634 CRegStdDWORD getlocktop
;
635 CRegStdDWORD driveremote
;
636 CRegStdDWORD drivefixed
;
637 CRegStdDWORD drivecdrom
;
638 CRegStdDWORD driveremove
;
639 CRegStdDWORD drivefloppy
;
640 CRegStdDWORD driveram
;
641 CRegStdDWORD driveunknown
;
642 CRegStdDWORD menulayoutlow
; /* Fist level mask */
643 CRegStdDWORD menulayouthigh
;
644 CRegStdDWORD menuextlow
; /* ext menu mask */
645 CRegStdDWORD menuexthigh
;
646 CRegStdDWORD simplecontext
;
647 CRegStdDWORD menumasklow_lm
;
648 CRegStdDWORD menumaskhigh_lm
;
649 CRegStdDWORD menumasklow_cu
;
650 CRegStdDWORD menumaskhigh_cu
;
651 CRegStdDWORD unversionedasmodified
;
652 CRegStdDWORD showunversionedoverlay
;
653 CRegStdDWORD showignoredoverlay
;
654 CRegStdDWORD excludedasnormal
;
655 CRegStdString excludelist
;
656 CRegStdDWORD hidemenusforunversioneditems
;
657 CRegStdDWORD columnseverywhere
;
658 stdstring excludeliststr
;
659 std::vector
<stdstring
> exvector
;
660 CRegStdString includelist
;
661 stdstring includeliststr
;
662 std::vector
<stdstring
> invector
;
663 DWORD cachetypeticker
;
664 DWORD recursiveticker
;
665 DWORD folderoverlayticker
;
666 DWORD getlocktopticker
;
668 DWORD drivetypeticker
;
671 DWORD menumaskticker
;
673 DWORD blockstatusticker
;
674 DWORD columnrevformatticker
;
675 DWORD excludelistticker
;
676 DWORD includelistticker
;
677 DWORD simplecontextticker
;
678 DWORD unversionedasmodifiedticker
;
679 DWORD showunversionedoverlayticker
;
680 DWORD showignoredoverlayticker
;
681 DWORD excludedasnormalticker
;
682 DWORD hidemenusforunversioneditemsticker
;
683 DWORD columnseverywhereticker
;
684 UINT drivetypecache
[27];
685 TCHAR drivetypepathcache
[MAX_PATH
]; // MAX_PATH ok.
686 NUMBERFMT columnrevformat
;
688 TCHAR szThousandsSep
[5];
689 std::map
<stdstring
, AdminDir_s
> admindircache
;
690 stdstring sAdminDirCacheKey
;
691 CRegStdString nocontextpaths
;
692 stdstring excludecontextstr
;
693 std::vector
<stdstring
> excontextvector
;
694 DWORD excontextticker
;
695 DWORD admindirticker
;
696 CComCriticalSection m_critSec
;