This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions

View File

@@ -9,13 +9,18 @@ using namespace NWindows;
using namespace NRegistry;
static const TCHAR *kCUBasePath = TEXT("Software\\7-ZIP");
static const TCHAR *kCU_FMPath = TEXT("Software\\7-ZIP\\FM");
static const TCHAR *kLangValueName = TEXT("Lang");
static const TCHAR *kEditorValueName = TEXT("Editor");
static const TCHAR *kShowDotsValueName = TEXT("ShowDots");
static const TCHAR *kShowRealFileIconsValueName = TEXT("ShowRealFileIcons");
static const TCHAR *kShowSystemMenuValueName = TEXT("ShowSystemMenu");
static const TCHAR *kEditor = TEXT("Editor");
static const TCHAR *kShowDots = TEXT("ShowDots");
static const TCHAR *kShowRealFileIcons = TEXT("ShowRealFileIcons");
static const TCHAR *kShowSystemMenu = TEXT("ShowSystemMenu");
static const TCHAR *kFullRow = TEXT("FullRow");
static const TCHAR *kShowGrid = TEXT("ShowGrid");
// static const TCHAR *kSingleClick = TEXT("SingleClick");
// static const TCHAR *kUnderline = TEXT("Underline");
void SaveRegLang(const CSysString &langFile)
{
@@ -36,7 +41,7 @@ void SaveRegEditor(const CSysString &editorPath)
{
CKey cuKey;
cuKey.Create(HKEY_CURRENT_USER, kCU_FMPath);
cuKey.SetValue(kEditorValueName, editorPath);
cuKey.SetValue(kEditor, editorPath);
}
void ReadRegEditor(CSysString &editorPath)
@@ -44,7 +49,7 @@ void ReadRegEditor(CSysString &editorPath)
editorPath.Empty();
CKey cuKey;
cuKey.Create(HKEY_CURRENT_USER, kCU_FMPath);
cuKey.QueryValue(kEditorValueName, editorPath);
cuKey.QueryValue(kEditor, editorPath);
/*
if (editorPath.IsEmpty())
editorPath = TEXT("notepad.exe");
@@ -68,17 +73,25 @@ static bool ReadOption(const TCHAR *value, bool defaultValue)
return enabled;
}
void SaveShowDots(bool showDots)
{ SaveOption(kShowDotsValueName, showDots); }
bool ReadShowDots()
{ return ReadOption(kShowDotsValueName, false); }
void SaveShowDots(bool showDots) { SaveOption(kShowDots, showDots); }
bool ReadShowDots() { return ReadOption(kShowDots, false); }
void SaveShowRealFileIcons(bool show)
{ SaveOption(kShowRealFileIconsValueName, show); }
bool ReadShowRealFileIcons()
{ return ReadOption(kShowRealFileIconsValueName, false); }
void SaveShowRealFileIcons(bool show) { SaveOption(kShowRealFileIcons, show); }
bool ReadShowRealFileIcons() { return ReadOption(kShowRealFileIcons, false); }
void SaveShowSystemMenu(bool show)
{ SaveOption(kShowSystemMenuValueName, show); }
bool ReadShowSystemMenu()
{ return ReadOption(kShowSystemMenuValueName, false); }
void SaveShowSystemMenu(bool show) { SaveOption(kShowSystemMenu, show); }
bool ReadShowSystemMenu(){ return ReadOption(kShowSystemMenu, false); }
void SaveFullRow(bool enable) { SaveOption(kFullRow, enable); }
bool ReadFullRow() { return ReadOption(kFullRow, false); }
void SaveShowGrid(bool enable) { SaveOption(kShowGrid, enable); }
bool ReadShowGrid(){ return ReadOption(kShowGrid, false); }
/*
void SaveSingleClick(bool enable) { SaveOption(kSingleClick, enable); }
bool ReadSingleClick(){ return ReadOption(kSingleClick, false); }
void SaveUnderline(bool enable) { SaveOption(kUnderline, enable); }
bool ReadUnderline(){ return ReadOption(kUnderline, false); }
*/