This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 deletions

View File

@@ -11,6 +11,7 @@
using namespace NWindows;
#ifdef Z7_LANG
static const UInt32 kLangIDs[] =
{
IDT_FOLDERS_WORKING_FOLDER,
@@ -19,8 +20,9 @@ static const UInt32 kLangIDs[] =
IDR_FOLDERS_WORK_SPECIFIED,
IDX_FOLDERS_WORK_FOR_REMOVABLE
};
#endif
static const int kWorkModeButtons[] =
static const unsigned kWorkModeButtons[] =
{
IDR_FOLDERS_WORK_SYSTEM,
IDR_FOLDERS_WORK_CURRENT,
@@ -29,19 +31,23 @@ static const int kWorkModeButtons[] =
#define kFoldersTopic "fm/options.htm#folders"
static const unsigned kNumWorkModeButtons = ARRAY_SIZE(kWorkModeButtons);
static const unsigned kNumWorkModeButtons = Z7_ARRAY_SIZE(kWorkModeButtons);
bool CFoldersPage::OnInit()
{
_initMode = true;
_needSave = false;
LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
#ifdef Z7_LANG
LangSetDlgItems(*this, kLangIDs, Z7_ARRAY_SIZE(kLangIDs));
#endif
m_WorkDirInfo.Load();
CheckButton(IDX_FOLDERS_WORK_FOR_REMOVABLE, m_WorkDirInfo.ForRemovableOnly);
CheckRadioButton(kWorkModeButtons[0], kWorkModeButtons[kNumWorkModeButtons - 1],
CheckRadioButton(
kWorkModeButtons[0],
kWorkModeButtons[kNumWorkModeButtons - 1],
kWorkModeButtons[m_WorkDirInfo.Mode]);
m_WorkPath.Init(*this, IDE_FOLDERS_WORK_PATH);
@@ -58,7 +64,7 @@ int CFoldersPage::GetWorkMode() const
{
for (unsigned i = 0; i < kNumWorkModeButtons; i++)
if (IsButtonCheckedBool(kWorkModeButtons[i]))
return i;
return (int)i;
throw 0;
}
@@ -104,7 +110,7 @@ void CFoldersPage::ModifiedEvent()
*/
}
bool CFoldersPage::OnButtonClicked(int buttonID, HWND buttonHWND)
bool CFoldersPage::OnButtonClicked(unsigned buttonID, HWND buttonHWND)
{
for (unsigned i = 0; i < kNumWorkModeButtons; i++)
if (buttonID == kWorkModeButtons[i])
@@ -129,7 +135,7 @@ bool CFoldersPage::OnButtonClicked(int buttonID, HWND buttonHWND)
return true;
}
bool CFoldersPage::OnCommand(int code, int itemID, LPARAM lParam)
bool CFoldersPage::OnCommand(unsigned code, unsigned itemID, LPARAM lParam)
{
if (code == EN_CHANGE && itemID == IDE_FOLDERS_WORK_PATH)
{