Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elfmz/far2l
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmz committed Dec 5, 2024
2 parents ac9cbb5 + 862e83a commit c0e674c
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 50 deletions.
3 changes: 2 additions & 1 deletion WinPort/src/ConsoleInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ const char* VirtualKeyNames[] = {
"VK_ZOOM", // 0xFB
"VK_NONAME", // 0xFC
"VK_PA1", // 0xFD
"VK_OEM_CLEAR" // 0xFE
"VK_OEM_CLEAR", // 0xFE
"0xFF" // 0xFF
};

char* FormatKeyState(uint16_t state) {
Expand Down
8 changes: 4 additions & 4 deletions far2l/bootstrap/scripts/FarEng.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2531,14 +2531,14 @@ $ #Settings dialog: panel#

#Highlight files# Enable ~files highlighting~@Highlight@.

#Highlight files - Marking# Button for open dialog
(works only if #Highlight files# enabled)
#Highlight files# Button for open dialog
# - Marking# (works only if #Highlight files# enabled)
for customize show/align markers in panel
(from the panel it can be switched by
#Ctrl-Alt-N# and #Ctrl-Alt-M#).

#Directory showas settings# Button for open dialog, which can be
also open from panel by #Ctrl-Alt-D#.
#Dirs and symlinks# Button for open dialog, which can be
#in Size column# also open from panel by #Ctrl-Alt-D#.


#Auto change folder# If checked, cursor moves in the ~tree panel~@TreePanel@
Expand Down
8 changes: 4 additions & 4 deletions far2l/bootstrap/scripts/FarHun.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2227,14 +2227,14 @@ $ #Beállítások: panel beállítások#

#Fájlok kiemelése# A ~fájlkiemelések~@Highlight@ engedélyezése.

#Fájlok kiemelése - Jelzés# Button for open dialog
(works only if #Fájlok kiemelése# enabled)
#Fájlok kiemelése# Button for open dialog
# - Jelzés# (works only if #Fájlok kiemelése# enabled)
for customize show/align markers in panel
(from the panel it can be switched by
#Ctrl-Alt-N# and #Ctrl-Alt-M#).

#Könyvtár megjelenítési beállításai# Button for open dialog, which can be
also open from panel by #Ctrl-Alt-D#.
#Dirs and symlinks# Button for open dialog, which can be
#in Size column# also open from panel by #Ctrl-Alt-D#.


#Automatikus# Ha engedélyezett, a ~fastruktúra panelen~@TreePanel@
Expand Down
8 changes: 4 additions & 4 deletions far2l/bootstrap/scripts/FarRus.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2575,14 +2575,14 @@ $ #Настройка панели#

#Раскраска файлов# Разрешает ~раскраску файлов~@Highlight@

#Раскраска файлов - Маркировка# Кнопка для открытия диалога
(работает только, если #Раскраска файлов# включена)
#Раскраска файлов# Кнопка для открытия диалога
# - Маркировка# (работает только, если #Раскраска файлов# включена)
для настройки показа/выравнивания маркеров на панели
(также могут быть переключены из панели по
#Ctrl-Alt-N# и #Ctrl-Alt-M#).

#Настройки отображения каталога# Кнопка для открытия диалога, который
также может быть открыт из панели по #Ctrl-Alt-D#.
#Каталоги и симлинки# Кнопка для открытия диалога, который
#в столбце Размер# также может быть открыт из панели по #Ctrl-Alt-D#.


#Автосмена папки# Если эта опция включена, то передвижения
Expand Down
2 changes: 1 addition & 1 deletion far2l/bootstrap/scripts/FarUkr.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ $ #Налаштування панелі#
(from the panel it can be switched by
#Ctrl-Alt-N# and #Ctrl-Alt-M#).

#Налаштування відображення каталогу# Button for open dialog, which can be
#Dirs and symlinks in Size column# Button for open dialog, which can be
also open from panel by #Ctrl-Alt-D#.


Expand Down
71 changes: 52 additions & 19 deletions far2l/bootstrap/scripts/farlang.templ.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2422,15 +2422,26 @@ upd:"Input settings"
"Налады увода"

DirSettingsTitle
"Настройки отображения каталога"
"Directory showas settings"
"Nastavení zobrazení adresáře"
"Einstellungen zur Anzeige des Verzeichnisses"
"Könyvtár megjelenítési beállításai"
"Ustawienia wyświetlania katalogu"
"Configuración de visualización del directorio"
"Налаштування відображення каталогу"
"Налады адлюстравання каталога"
"Каталоги и симлинки в столбце Размер"
"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"
upd:"Dirs and symlinks in Size column"

DirSettingsHint
"Ctrl-Alt-D для быстрого открытия с панелей"
"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"
upd:"Use Ctrl-Alt-D to quick open from panel"

DirSettingsCenter
"Выравнивать по центру"
Expand Down Expand Up @@ -2465,16 +2476,27 @@ DirSettingsShowAs
"Показувати каталог як:"
"Паказваць каталог як:"

DirSettingsEmpty
"-"
"-"
"-"
"-"
"-"
"-"
"-"
"-"
"-"
DirSettingsSymlinkText
"Для симлинка на файл показывать:"
"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"
upd:"For symlink to file show:"

DirSettingsSymlinkRadio2
"размер целевого файла"
"size of target file"
upd:"size of target file"
upd:"size of target file"
upd:"size of target file"
upd:"size of target file"
upd:"size of target file"
upd:"size of target file"
upd:"size of target file"

DirSettingsApply
"Применить"
Expand All @@ -2487,6 +2509,17 @@ DirSettingsApply
"Застосувати"
"Ужыць"

DirSettingsSymlinkSizeHint
"Ctrl-Alt-L для переключения из панелей"
"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"
upd:"Use Ctrl-Alt-L to quick toggle from panel"

ConfigClock
"&Часы в панелях"
"&Clock in panels"
Expand Down
62 changes: 45 additions & 17 deletions far2l/src/cfg/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,20 @@ enum enumDirCfgDialog
{
ID_DIRCFG_TITLE = 0,

ID_DIRCFG_STYLE_HINT_D,
ID_DIRCFG_STYLE_TEXT,
ID_DIRCFG_STYLE_COMBO,
ID_DIRCFG_SEPARATOR,

ID_DIRCFG_CHECKBOX_CENTER,
ID_DIRCFG_CHECKBOX_SURR,
ID_DIRCFG_SURR_COMBO,

ID_DIRCFG_SEPARATOR,
ID_DIRCFG_SYMLINK_TEXT,
ID_DIRCFG_SYMLINK_RADIO1_TEXT,
ID_DIRCFG_SYMLINK_RADIO2_SIZE,
ID_DIRCFG_STYLE_HINT_L,

ID_DIRCFG_SEPARATOR2,
ID_DIRCFG_BUTTON_OK,
ID_DIRCFG_BUTTON_CANCEL,
Expand Down Expand Up @@ -380,6 +386,9 @@ static LONG_PTR WINAPI DirCfgDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR
SendDlgMessage(hDlg, DM_LISTSET, ID_DIRCFG_STYLE_COMBO, (LONG_PTR)&farlist);
// SendDlgMessage(hDlg, DM_LISTSETCURPOS, dircfg_data->DirNameStyleComboID, (LONG_PTR)&flpos);
update_surrcombo( );

swprintf(tmp, ARRAYSIZE(tmp), L"\"%ls\"", SymLinkNames[dircfg_data->DirNameStyle].CPtr());
SendDlgMessage(hDlg, DM_SETTEXTPTR, ID_DIRCFG_SYMLINK_RADIO1_TEXT, (LONG_PTR)tmp);
}
break;

Expand All @@ -388,6 +397,8 @@ static LONG_PTR WINAPI DirCfgDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR

dircfg_data->DirNameStyle = SendDlgMessage(hDlg, DM_LISTGETCURPOS, ID_DIRCFG_STYLE_COMBO, (LONG_PTR)0);
update_surrcombo( );
swprintf(tmp, ARRAYSIZE(tmp), L"\"%ls\"", SymLinkNames[dircfg_data->DirNameStyle].CPtr());
SendDlgMessage(hDlg, DM_SETTEXTPTR, ID_DIRCFG_SYMLINK_RADIO1_TEXT, (LONG_PTR)tmp);
SendDlgMessage(hDlg, DM_REDRAW, 0, 0);
}
else if (Param1 == ID_DIRCFG_SURR_COMBO) {
Expand All @@ -409,6 +420,11 @@ static LONG_PTR WINAPI DirCfgDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR
Opt.DirNameStyle |= DIRNAME_STYLE_CENTERED * dircfg_data->bCentered;
Opt.DirNameStyle |= DIRNAME_STYLE_SURR_CH * dircfg_data->bSurr;

if (BSTATE_CHECKED == SendDlgMessage(hDlg, DM_GETCHECK, ID_DIRCFG_SYMLINK_RADIO1_TEXT, 0))
Opt.ShowSymlinkSize = 0;
else if (BSTATE_CHECKED == SendDlgMessage(hDlg, DM_GETCHECK, ID_DIRCFG_SYMLINK_RADIO2_SIZE, 0))
Opt.ShowSymlinkSize = 1;

SendDlgMessage(hDlg, DM_SHOWDIALOG, 0, 0);
UpdateDefaultColumnTypeWidths( );
CtrlObject->Cp()->LeftPanel->Update(UPDATE_KEEP_SELECTION);
Expand All @@ -429,22 +445,29 @@ void DirectoryNameSettings()
{
dircfg_data_t dircfg_data;
DialogDataEx DirCfgDlgData[] = {

{DI_DOUBLEBOX, 3, 1, 47, 10, {}, 0, Msg::DirSettingsTitle},
{DI_TEXT, 5, 2, 35, 2, {}, 0, Msg::DirSettingsShowAs},
{DI_COMBOBOX, 5, 3, 5+40, 3, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""},
{DI_TEXT, 0, 4, 0, 4, {}, DIF_SEPARATOR, L""},

{DI_CHECKBOX, 5, 5, 20, 5, {}, DIF_AUTOMATION, Msg::DirSettingsCenter},
{DI_CHECKBOX, 5, 6, 20, 6, {}, DIF_AUTOMATION, Msg::DirSettingsSurround},
{DI_COMBOBOX, 9, 7, 26, 7, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""},

{DI_TEXT, 0, 8, 0, 8, {}, DIF_SEPARATOR, L""},
{DI_BUTTON, 0, 9, 0, 9, {}, DIF_DEFAULT | DIF_CENTERGROUP, Msg::Ok},
{DI_BUTTON, 0, 9, 0, 9, {}, DIF_CENTERGROUP, Msg::Cancel},
{DI_BUTTON, 0, 9, 0, 9, {}, DIF_CENTERGROUP | DIF_BTNNOCLOSE, Msg::DirSettingsApply},
{DI_DOUBLEBOX, 3, 1, 48, 15, {}, 0, Msg::DirSettingsTitle},
{DI_TEXT, 5, 2, 46, 2, {}, DIF_DISABLE, Msg::DirSettingsHint},
{DI_TEXT, 5, 3, 46, 3, {}, 0, Msg::DirSettingsShowAs},
{DI_COMBOBOX, 5, 4, 5+40, 4, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""},

{DI_CHECKBOX, 5, 5, 46, 5, {}, DIF_AUTOMATION, Msg::DirSettingsCenter},
{DI_CHECKBOX, 5, 6, 46, 6, {}, DIF_AUTOMATION, Msg::DirSettingsSurround},
{DI_COMBOBOX, 9, 7, 26, 7, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""},

{DI_TEXT, 0, 8, 0, 8, {}, DIF_SEPARATOR, L""},
{DI_TEXT, 5, 9, 46, 9, {}, 0, Msg::DirSettingsSymlinkText},
{DI_RADIOBUTTON, 5, 10, 46, 10, {}, DIF_GROUP, Msg::SymLinkName},
{DI_RADIOBUTTON, 5, 11, 46, 11, {}, 0, Msg::DirSettingsSymlinkRadio2},
{DI_TEXT, 5, 12, 46, 12, {}, DIF_DISABLE, Msg::DirSettingsSymlinkSizeHint},

{DI_TEXT, 0, 13, 0, 13, {}, DIF_SEPARATOR, L""},
{DI_BUTTON, 0, 14, 0, 14, {}, DIF_DEFAULT | DIF_CENTERGROUP, Msg::Ok},
{DI_BUTTON, 0, 14, 0, 14, {}, DIF_CENTERGROUP, Msg::Cancel},
{DI_BUTTON, 0, 14, 0, 14, {}, DIF_CENTERGROUP | DIF_BTNNOCLOSE, Msg::DirSettingsApply},

};
const int dialogsizex = 52;
const int dialogsizey = 17;

MakeDialogItemsEx(DirCfgDlgData, DirCfgDlg);

Expand All @@ -459,10 +482,10 @@ void DirectoryNameSettings()
if (!dircfg_data.bSurr)
DirCfgDlg[ID_DIRCFG_SURR_COMBO].Flags |= DIF_DISABLE;

DirCfgDlg[ID_DIRCFG_SYMLINK_RADIO1_TEXT + (Opt.ShowSymlinkSize ? 1 : 0)].Selected = TRUE;

Dialog Dlg(DirCfgDlg, ARRAYSIZE(DirCfgDlg), DirCfgDlgProc, (LONG_PTR)&dircfg_data);

int dialogsizex = 51;
int dialogsizey = 12;
Dlg.SetPosition(-1, -1, dialogsizex, dialogsizey);
Dlg.SetAutomation(ID_DIRCFG_CHECKBOX_SURR, ID_DIRCFG_SURR_COMBO, DIF_DISABLE, DIF_NONE, DIF_NONE, DIF_DISABLE);

Expand All @@ -475,6 +498,11 @@ void DirectoryNameSettings()
Opt.DirNameStyle |= DIRNAME_STYLE_CENTERED * dircfg_data.bCentered;
Opt.DirNameStyle |= DIRNAME_STYLE_SURR_CH * dircfg_data.bSurr;

if (DirCfgDlg[ID_DIRCFG_SYMLINK_RADIO1_TEXT].Selected)
Opt.ShowSymlinkSize = 0;
else if (DirCfgDlg[ID_DIRCFG_SYMLINK_RADIO2_SIZE].Selected)
Opt.ShowSymlinkSize = 1;

UpdateDefaultColumnTypeWidths( );
CtrlObject->Cp()->LeftPanel->Update(UPDATE_KEEP_SELECTION);
CtrlObject->Cp()->RightPanel->Update(UPDATE_KEEP_SELECTION);
Expand Down

0 comments on commit c0e674c

Please sign in to comment.