diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2017-04-30 03:00:00 +0300 |
---|---|---|
committer | Kornel <kornel@geekhood.net> | 2017-05-05 20:56:20 +0300 |
commit | 2efa10565ac395d2ce9a679ead46e70fb2f963eb (patch) | |
tree | 84c8df4deb69ec44ea15af9378f24347db55c357 /CPP/7zip/UI/FileManager/RegistryUtils.cpp | |
parent | 603abd5528c97346e9448c0ff47949f818fe558c (diff) |
17.0017.00
Diffstat (limited to 'CPP/7zip/UI/FileManager/RegistryUtils.cpp')
-rw-r--r-- | CPP/7zip/UI/FileManager/RegistryUtils.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/CPP/7zip/UI/FileManager/RegistryUtils.cpp b/CPP/7zip/UI/FileManager/RegistryUtils.cpp index 9cc76c36..91b69a21 100644 --- a/CPP/7zip/UI/FileManager/RegistryUtils.cpp +++ b/CPP/7zip/UI/FileManager/RegistryUtils.cpp @@ -13,31 +13,31 @@ using namespace NRegistry; #define REG_PATH_7Z TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") -static const TCHAR *kCUBasePath = REG_PATH_7Z; -static const TCHAR *kCU_FMPath = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); -// static const TCHAR *kLM_Path = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); +static LPCTSTR const kCUBasePath = REG_PATH_7Z; +static LPCTSTR const kCU_FMPath = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); +// static LPCTSTR const kLM_Path = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); -static const WCHAR *kLangValueName = L"Lang"; +static LPCWSTR const kLangValueName = L"Lang"; -static const WCHAR *kViewer = L"Viewer"; -static const WCHAR *kEditor = L"Editor"; -static const WCHAR *kDiff = L"Diff"; +static LPCWSTR const kViewer = L"Viewer"; +static LPCWSTR const kEditor = L"Editor"; +static LPCWSTR const kDiff = L"Diff"; -static const TCHAR *kShowDots = TEXT("ShowDots"); -static const TCHAR *kShowRealFileIcons = TEXT("ShowRealFileIcons"); -static const TCHAR *kFullRow = TEXT("FullRow"); -static const TCHAR *kShowGrid = TEXT("ShowGrid"); -static const TCHAR *kSingleClick = TEXT("SingleClick"); -static const TCHAR *kAlternativeSelection = TEXT("AlternativeSelection"); -// static const TCHAR *kUnderline = TEXT("Underline"); +static LPCTSTR const kShowDots = TEXT("ShowDots"); +static LPCTSTR const kShowRealFileIcons = TEXT("ShowRealFileIcons"); +static LPCTSTR const kFullRow = TEXT("FullRow"); +static LPCTSTR const kShowGrid = TEXT("ShowGrid"); +static LPCTSTR const kSingleClick = TEXT("SingleClick"); +static LPCTSTR const kAlternativeSelection = TEXT("AlternativeSelection"); +// static LPCTSTR const kUnderline = TEXT("Underline"); -static const TCHAR *kShowSystemMenu = TEXT("ShowSystemMenu"); +static LPCTSTR const kShowSystemMenu = TEXT("ShowSystemMenu"); -// static const TCHAR *kLockMemoryAdd = TEXT("LockMemoryAdd"); -static const TCHAR *kLargePages = TEXT("LargePages"); +// static LPCTSTR const kLockMemoryAdd = TEXT("LockMemoryAdd"); +static LPCTSTR const kLargePages = TEXT("LargePages"); -static const TCHAR *kFlatViewName = TEXT("FlatViewArc"); -// static const TCHAR *kShowDeletedFiles = TEXT("ShowDeleted"); +static LPCTSTR const kFlatViewName = TEXT("FlatViewArc"); +// static LPCTSTR const kShowDeletedFiles = TEXT("ShowDeleted"); static void SaveCuString(LPCTSTR keyPath, LPCWSTR valuePath, LPCWSTR value) { @@ -63,21 +63,21 @@ void ReadRegEditor(bool useEditor, UString &path) { ReadCuString(kCU_FMPath, use void SaveRegDiff(const UString &path) { SaveCuString(kCU_FMPath, kDiff, path); } void ReadRegDiff(UString &path) { ReadCuString(kCU_FMPath, kDiff, path); } -static void Save7ZipOption(const TCHAR *value, bool enabled) +static void Save7ZipOption(LPCTSTR value, bool enabled) { CKey key; key.Create(HKEY_CURRENT_USER, kCUBasePath); key.SetValue(value, enabled); } -static void SaveOption(const TCHAR *value, bool enabled) +static void SaveOption(LPCTSTR value, bool enabled) { CKey key; key.Create(HKEY_CURRENT_USER, kCU_FMPath); key.SetValue(value, enabled); } -static bool Read7ZipOption(const TCHAR *value, bool defaultValue) +static bool Read7ZipOption(LPCTSTR value, bool defaultValue) { CKey key; if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) == ERROR_SUCCESS) @@ -89,7 +89,7 @@ static bool Read7ZipOption(const TCHAR *value, bool defaultValue) return defaultValue; } -static void ReadOption(CKey &key, const TCHAR *value, bool &dest) +static void ReadOption(CKey &key, LPCTSTR value, bool &dest) { bool enabled = false; if (key.QueryValue(value, enabled) == ERROR_SUCCESS) @@ -97,14 +97,14 @@ static void ReadOption(CKey &key, const TCHAR *value, bool &dest) } /* -static void SaveLmOption(const TCHAR *value, bool enabled) +static void SaveLmOption(LPCTSTR value, bool enabled) { CKey key; key.Create(HKEY_LOCAL_MACHINE, kLM_Path); key.SetValue(value, enabled); } -static bool ReadLmOption(const TCHAR *value, bool defaultValue) +static bool ReadLmOption(LPCTSTR value, bool defaultValue) { CKey key; if (key.Open(HKEY_LOCAL_MACHINE, kLM_Path, KEY_READ) == ERROR_SUCCESS) |