From 3fdd7c46fd732b88b8968b8d6142d1c06d502596 Mon Sep 17 00:00:00 2001 From: akruphi <92621645+akruphi@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:23:46 +0300 Subject: [PATCH 1/4] Adjust column width to "folder" text only if in mode it width = 0 and add tips in dialog Yet more after #2452 --- far2l/bootstrap/scripts/farlang.templ.m4 | 76 +++++++++++++++--------- far2l/src/cfg/config.cpp | 28 +++++---- far2l/src/panels/flshow.cpp | 4 +- 3 files changed, 68 insertions(+), 40 deletions(-) diff --git a/far2l/bootstrap/scripts/farlang.templ.m4 b/far2l/bootstrap/scripts/farlang.templ.m4 index a6a4fa17b..357201161 100644 --- a/far2l/bootstrap/scripts/farlang.templ.m4 +++ b/far2l/bootstrap/scripts/farlang.templ.m4 @@ -2444,37 +2444,59 @@ upd:"Use Ctrl-Alt-D to quick open from panel" upd:"Use Ctrl-Alt-D to quick open from panel" DirSettingsCenter -"Выравнивать по центру" -"Center align" -"Zarovnat do středu" -"Zentrieren" -"Középre igazítani" -"Wyśrodkować" -"Alinear al centro" -"Вирівняти по центру" -"Выраўнаваць па цэнтры" +"Выравнивать по &центру" +"&Center align" +"&Zarovnat do středu" +"&Zentrieren" +"&Középre igazítani" +"&Wyśrodkować" +"Alinear al ¢ro" +"Вирівняти по &центру" +"Выраўнаваць па &цэнтры" DirSettingsSurround -"Символы вокруг" -"Symbols around" -"Symboly kolem" -"Symbole um" -"Szimbólumok körül" -"Symbole wokół" -"Símbolos alrededor" -"Символи навколо" -"Сімвалы вакол" +"&Символы вокруг" +"&Symbols around" +"&Symboly kolem" +"&Symbole um" +"&Szimbólumok körül" +"&Symbole wokół" +"&Símbolos alrededor" +"&Символи навколо" +"&Сімвалы вакол" DirSettingsShowAs -"Показывать директорию как:" -"Show directory as:" -"Zobrazit adresář jako:" -"Verzeichnis anzeigen als:" -"Könyvtár megjelenítéseként:" -"Pokaż katalog jako:" -"Mostrar directorio como:" -"Показувати каталог як:" -"Паказваць каталог як:" +"Показывать &директорию как:" +"Show &directory as:" +"Zobrazit &adresář jako:" +"&Verzeichnis anzeigen als:" +"Könyvtár &megjelenítéseként:" +"Pokaż &katalog jako:" +"Mostrar &directorio como:" +"Показувати &каталог як:" +"Паказваць &каталог як:" + +DirSettingsHint1 +"Для подстройки ширины столбца под текст" +"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" +upd:"To adjust column width to text" + +DirSettingsHint2 +" установите в режимах панели её ширину в 0" +" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" +upd:" set in file panel mode it width to 0" DirSettingsSymlinkText "Для симлинка на файл показывать:" diff --git a/far2l/src/cfg/config.cpp b/far2l/src/cfg/config.cpp index 2bd90a3cd..a4ee62606 100644 --- a/far2l/src/cfg/config.cpp +++ b/far2l/src/cfg/config.cpp @@ -322,6 +322,9 @@ enum enumDirCfgDialog ID_DIRCFG_CHECKBOX_SURR, ID_DIRCFG_SURR_COMBO, + ID_DIRCFG_STYLE_HINT_1, + ID_DIRCFG_STYLE_HINT_2, + ID_DIRCFG_SEPARATOR, ID_DIRCFG_SYMLINK_TEXT, ID_DIRCFG_SYMLINK_RADIO1_TEXT, @@ -445,7 +448,7 @@ void DirectoryNameSettings() { dircfg_data_t dircfg_data; DialogDataEx DirCfgDlgData[] = { - {DI_DOUBLEBOX, 3, 1, 48, 15, {}, 0, Msg::DirSettingsTitle}, + {DI_DOUBLEBOX, 3, 1, 48, 17, {}, 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""}, @@ -454,20 +457,23 @@ void DirectoryNameSettings() {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, 5, 8, 46, 8, {}, DIF_DISABLE, Msg::DirSettingsHint1}, + {DI_TEXT, 5, 9, 46, 9, {}, DIF_DISABLE, Msg::DirSettingsHint2}, + + {DI_TEXT, 0, 10, 0, 10, {}, DIF_SEPARATOR, L""}, + {DI_TEXT, 5, 11, 46, 11, {}, 0, Msg::DirSettingsSymlinkText}, + {DI_RADIOBUTTON, 5, 12, 46, 12, {}, DIF_GROUP, Msg::SymLinkName}, + {DI_RADIOBUTTON, 5, 13, 46, 13, {}, 0, Msg::DirSettingsSymlinkRadio2}, + {DI_TEXT, 5, 14, 46, 14, {}, 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}, + {DI_TEXT, 0, 15, 0, 15, {}, DIF_SEPARATOR, L""}, + {DI_BUTTON, 0, 16, 0, 16, {}, DIF_DEFAULT | DIF_CENTERGROUP, Msg::Ok}, + {DI_BUTTON, 0, 16, 0, 16, {}, DIF_CENTERGROUP, Msg::Cancel}, + {DI_BUTTON, 0, 16, 0, 16, {}, DIF_CENTERGROUP | DIF_BTNNOCLOSE, Msg::DirSettingsApply}, }; const int dialogsizex = 52; - const int dialogsizey = 17; + const int dialogsizey = 19; MakeDialogItemsEx(DirCfgDlgData, DirCfgDlg); diff --git a/far2l/src/panels/flshow.cpp b/far2l/src/panels/flshow.cpp index a2554e140..be8fcf462 100644 --- a/far2l/src/panels/flshow.cpp +++ b/far2l/src/panels/flshow.cpp @@ -753,12 +753,12 @@ int FileList::PrepareColumnWidths(unsigned int *ColumnTypes, int *ColumnWidths, ColumnWidths[I]++; } } - else { + /*else { // revert after #2452 if (ColumnType == SIZE_COLUMN || ColumnType == PHYSICAL_COLUMN) { if (ColumnWidths[I] < ColumnTypeWidth[SIZE_COLUMN]) ColumnWidths[I] = ColumnTypeWidth[SIZE_COLUMN]; } - } + }*/ if (!ColumnWidths[I]) ZeroLengthCount++; From 7c4281379678ea707d02369e4f43bf6fbfe7b2ef Mon Sep 17 00:00:00 2001 From: akruphi <92621645+akruphi@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:32:51 +0300 Subject: [PATCH 2/4] Make #2452 feature with adjust column width to text more customizable --- far2l/bootstrap/scripts/farlang.templ.m4 | 82 +++++++++++++++--------- far2l/src/cfg/ConfigOpt.cpp | 1 + far2l/src/cfg/config.cpp | 50 ++++++++++----- far2l/src/cfg/config.hpp | 1 + far2l/src/panels/flshow.cpp | 4 +- 5 files changed, 89 insertions(+), 49 deletions(-) diff --git a/far2l/bootstrap/scripts/farlang.templ.m4 b/far2l/bootstrap/scripts/farlang.templ.m4 index 357201161..265aee1af 100644 --- a/far2l/bootstrap/scripts/farlang.templ.m4 +++ b/far2l/bootstrap/scripts/farlang.templ.m4 @@ -2476,27 +2476,38 @@ DirSettingsShowAs "Показувати &каталог як:" "Паказваць &каталог як:" -DirSettingsHint1 -"Для подстройки ширины столбца под текст" -"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" -upd:"To adjust column width to text" - -DirSettingsHint2 -" установите в режимах панели её ширину в 0" -" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" -upd:" set in file panel mode it width to 0" +DirSettingsWidthText +"Подстройка &ширины столбца "Размер" под текст:" +"Adjust "Size" column &width to text:" +upd:"Adjust "Size" column &width to text:" +upd:"Adjust "Size" column &width to text:" +upd:"Adjust "Size" column &width to text:" +upd:"Adjust "Size" column &width to text:" +upd:"Adjust "Size" column &width to text:" +"Відрегулюйте &ширину стовпця "Розмір" до тексту:" +"Адрэгулюйце &шырыню слупка "Памер" да тэксту:" + +DirSettingsWidthCombo0 +"когда в режимах панели ширина столбца 0" +"when in file panel mode it width is 0" +upd:"when in file panel mode it width is 0" +upd:"when in file panel mode it width is 0" +upd:"when in file panel mode it width is 0" +upd:"when in file panel mode it width is 0" +upd:"when in file panel mode it width is 0" +"коли в режимі панелі файлів ширина 0" +"калі ў рэжыме панэлі файла шырыня 0" + +DirSettingsWidthCombo1 +"всегда" +"always" +upd:"always" +upd:"always" +upd:"always" +upd:"always" +upd:"always" +"завжди" +"заўсёды" DirSettingsSymlinkText "Для симлинка на файл показывать:" @@ -2509,16 +2520,27 @@ upd:"For symlink to file show:" upd:"For symlink to file show:" upd:"For symlink to file show:" +DirSettingsSymlinkRadio1 +"&текст" +"&text" +upd:"&text" +upd:"&text" +upd:"&text" +upd:"&text" +upd:"&text" +upd:"&text" +upd:"&text" + 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" +"размер целевого &файла" +"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 "&Применить" diff --git a/far2l/src/cfg/ConfigOpt.cpp b/far2l/src/cfg/ConfigOpt.cpp index 766fb8498..69b922779 100644 --- a/far2l/src/cfg/ConfigOpt.cpp +++ b/far2l/src/cfg/ConfigOpt.cpp @@ -395,6 +395,7 @@ const ConfigOpt g_cfg_opts[] { {true, NSecPanel, "MinFilenameIndentation", &Opt.MinFilenameIndentation, 0}, {true, NSecPanel, "MaxFilenameIndentation", &Opt.MaxFilenameIndentation, HIGHLIGHT_MAX_MARK_LENGTH}, {true, NSecPanel, "DirNameStyle", &Opt.DirNameStyle, 0 }, + {true, NSecPanel, "DirNameStyleColumnWidthAlways", &Opt.DirNameStyleColumnWidthAlways, 0 }, {true, NSecPanel, "ShowSymlinkSize", &Opt.ShowSymlinkSize, 0}, {true, NSecPanelLeft, "Type", &Opt.LeftPanel.Type, 0}, diff --git a/far2l/src/cfg/config.cpp b/far2l/src/cfg/config.cpp index a4ee62606..811d0c561 100644 --- a/far2l/src/cfg/config.cpp +++ b/far2l/src/cfg/config.cpp @@ -322,8 +322,8 @@ enum enumDirCfgDialog ID_DIRCFG_CHECKBOX_SURR, ID_DIRCFG_SURR_COMBO, - ID_DIRCFG_STYLE_HINT_1, - ID_DIRCFG_STYLE_HINT_2, + ID_DIRCFG_WIDTH_TEXT, + ID_DIRCFG_WIDTH_COMBO, ID_DIRCFG_SEPARATOR, ID_DIRCFG_SYMLINK_TEXT, @@ -390,7 +390,8 @@ static LONG_PTR WINAPI DirCfgDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR // SendDlgMessage(hDlg, DM_LISTSETCURPOS, dircfg_data->DirNameStyleComboID, (LONG_PTR)&flpos); update_surrcombo( ); - swprintf(tmp, ARRAYSIZE(tmp), L"\"%ls\"", SymLinkNames[dircfg_data->DirNameStyle].CPtr()); + swprintf(tmp, ARRAYSIZE(tmp), L"%ls \"%ls\"", + Msg::DirSettingsSymlinkRadio1.CPtr(), SymLinkNames[dircfg_data->DirNameStyle].CPtr()); SendDlgMessage(hDlg, DM_SETTEXTPTR, ID_DIRCFG_SYMLINK_RADIO1_TEXT, (LONG_PTR)tmp); } break; @@ -400,7 +401,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()); + swprintf(tmp, ARRAYSIZE(tmp), L"%ls \"%ls\"", + Msg::DirSettingsSymlinkRadio1.CPtr(), SymLinkNames[dircfg_data->DirNameStyle].CPtr()); SendDlgMessage(hDlg, DM_SETTEXTPTR, ID_DIRCFG_SYMLINK_RADIO1_TEXT, (LONG_PTR)tmp); SendDlgMessage(hDlg, DM_REDRAW, 0, 0); } @@ -423,6 +425,8 @@ 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; + Opt.DirNameStyleColumnWidthAlways = SendDlgMessage(hDlg, DM_LISTGETCURPOS, ID_DIRCFG_WIDTH_COMBO, 0); + 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)) @@ -448,23 +452,23 @@ void DirectoryNameSettings() { dircfg_data_t dircfg_data; DialogDataEx DirCfgDlgData[] = { - {DI_DOUBLEBOX, 3, 1, 48, 17, {}, 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_DOUBLEBOX, 3, 1, 52, 17, {}, 0, Msg::DirSettingsTitle}, + {DI_TEXT, 5, 2, 50, 2, {}, DIF_DISABLE, Msg::DirSettingsHint}, + {DI_TEXT, 5, 3, 50, 3, {}, 0, Msg::DirSettingsShowAs}, + {DI_COMBOBOX, 6, 4, 6+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_CHECKBOX, 5, 5, 50, 5, {}, DIF_AUTOMATION, Msg::DirSettingsCenter}, + {DI_CHECKBOX, 5, 6, 50, 6, {}, DIF_AUTOMATION, Msg::DirSettingsSurround}, {DI_COMBOBOX, 9, 7, 26, 7, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""}, - {DI_TEXT, 5, 8, 46, 8, {}, DIF_DISABLE, Msg::DirSettingsHint1}, - {DI_TEXT, 5, 9, 46, 9, {}, DIF_DISABLE, Msg::DirSettingsHint2}, + {DI_TEXT, 5, 8, 50, 8, {}, 0, Msg::DirSettingsWidthText}, + {DI_COMBOBOX, 6, 9, 50, 9, {}, DIF_DROPDOWNLIST | DIF_LISTNOAMPERSAND | DIF_LISTWRAPMODE, L""}, {DI_TEXT, 0, 10, 0, 10, {}, DIF_SEPARATOR, L""}, - {DI_TEXT, 5, 11, 46, 11, {}, 0, Msg::DirSettingsSymlinkText}, - {DI_RADIOBUTTON, 5, 12, 46, 12, {}, DIF_GROUP, Msg::SymLinkName}, - {DI_RADIOBUTTON, 5, 13, 46, 13, {}, 0, Msg::DirSettingsSymlinkRadio2}, - {DI_TEXT, 5, 14, 46, 14, {}, DIF_DISABLE, Msg::DirSettingsSymlinkSizeHint}, + {DI_TEXT, 5, 11, 50, 11, {}, 0, Msg::DirSettingsSymlinkText}, + {DI_RADIOBUTTON, 5, 12, 50, 12, {}, DIF_GROUP, Msg::DirSettingsSymlinkRadio1}, + {DI_RADIOBUTTON, 5, 13, 50, 13, {}, 0, Msg::DirSettingsSymlinkRadio2}, + {DI_TEXT, 5, 14, 50, 14, {}, DIF_DISABLE, Msg::DirSettingsSymlinkSizeHint}, {DI_TEXT, 0, 15, 0, 15, {}, DIF_SEPARATOR, L""}, {DI_BUTTON, 0, 16, 0, 16, {}, DIF_DEFAULT | DIF_CENTERGROUP, Msg::Ok}, @@ -472,7 +476,7 @@ void DirectoryNameSettings() {DI_BUTTON, 0, 16, 0, 16, {}, DIF_CENTERGROUP | DIF_BTNNOCLOSE, Msg::DirSettingsApply}, }; - const int dialogsizex = 52; + const int dialogsizex = 56; const int dialogsizey = 19; MakeDialogItemsEx(DirCfgDlgData, DirCfgDlg); @@ -485,6 +489,16 @@ void DirectoryNameSettings() DirCfgDlg[ID_DIRCFG_CHECKBOX_CENTER].Selected = dircfg_data.bCentered; DirCfgDlg[ID_DIRCFG_CHECKBOX_SURR].Selected = dircfg_data.bSurr; + FarList ColumnWidthComboList; + FarListItem ColumnWidthItems[2]{}; + + ColumnWidthItems[0].Text = Msg::DirSettingsWidthCombo0; + ColumnWidthItems[1].Text = Msg::DirSettingsWidthCombo1; + ColumnWidthComboList.ItemsNumber = ARRAYSIZE(ColumnWidthItems); + ColumnWidthComboList.Items = ColumnWidthItems; + ColumnWidthItems[Opt.DirNameStyleColumnWidthAlways ? 1 : 0].Flags|= LIF_SELECTED; + DirCfgDlg[ID_DIRCFG_WIDTH_COMBO].ListItems = &ColumnWidthComboList; + if (!dircfg_data.bSurr) DirCfgDlg[ID_DIRCFG_SURR_COMBO].Flags |= DIF_DISABLE; @@ -504,6 +518,8 @@ void DirectoryNameSettings() Opt.DirNameStyle |= DIRNAME_STYLE_CENTERED * dircfg_data.bCentered; Opt.DirNameStyle |= DIRNAME_STYLE_SURR_CH * dircfg_data.bSurr; + Opt.DirNameStyleColumnWidthAlways = DirCfgDlg[ID_DIRCFG_WIDTH_COMBO].ListPos; + if (DirCfgDlg[ID_DIRCFG_SYMLINK_RADIO1_TEXT].Selected) Opt.ShowSymlinkSize = 0; else if (DirCfgDlg[ID_DIRCFG_SYMLINK_RADIO2_SIZE].Selected) diff --git a/far2l/src/cfg/config.hpp b/far2l/src/cfg/config.hpp index 5e8280271..107900e0d 100644 --- a/far2l/src/cfg/config.hpp +++ b/far2l/src/cfg/config.hpp @@ -404,6 +404,7 @@ struct Options int FilenameMarksInStatusBar; DWORD MinFilenameIndentation, MaxFilenameIndentation; DWORD DirNameStyle; + DWORD DirNameStyleColumnWidthAlways; DWORD ShowSymlinkSize; int Highlight; diff --git a/far2l/src/panels/flshow.cpp b/far2l/src/panels/flshow.cpp index be8fcf462..588612a55 100644 --- a/far2l/src/panels/flshow.cpp +++ b/far2l/src/panels/flshow.cpp @@ -753,12 +753,12 @@ int FileList::PrepareColumnWidths(unsigned int *ColumnTypes, int *ColumnWidths, ColumnWidths[I]++; } } - /*else { // revert after #2452 + else if (Opt.DirNameStyleColumnWidthAlways) { if (ColumnType == SIZE_COLUMN || ColumnType == PHYSICAL_COLUMN) { if (ColumnWidths[I] < ColumnTypeWidth[SIZE_COLUMN]) ColumnWidths[I] = ColumnTypeWidth[SIZE_COLUMN]; } - }*/ + } if (!ColumnWidths[I]) ZeroLengthCount++; From 692191459b40259b56e5892b4c5e14dd9eca6f33 Mon Sep 17 00:00:00 2001 From: akruphi <92621645+akruphi@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:19:17 +0300 Subject: [PATCH 3/4] minor --- far2l/bootstrap/scripts/farlang.templ.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/far2l/bootstrap/scripts/farlang.templ.m4 b/far2l/bootstrap/scripts/farlang.templ.m4 index 265aee1af..a4190eddf 100644 --- a/far2l/bootstrap/scripts/farlang.templ.m4 +++ b/far2l/bootstrap/scripts/farlang.templ.m4 @@ -2477,18 +2477,18 @@ DirSettingsShowAs "Паказваць &каталог як:" DirSettingsWidthText -"Подстройка &ширины столбца "Размер" под текст:" +"Подстройка &ширины колонки "Размер" под текст:" "Adjust "Size" column &width to text:" upd:"Adjust "Size" column &width to text:" upd:"Adjust "Size" column &width to text:" upd:"Adjust "Size" column &width to text:" upd:"Adjust "Size" column &width to text:" upd:"Adjust "Size" column &width to text:" -"Відрегулюйте &ширину стовпця "Розмір" до тексту:" +"Відрегулюйте &ширину колонки "Розмір" до тексту:" "Адрэгулюйце &шырыню слупка "Памер" да тэксту:" DirSettingsWidthCombo0 -"когда в режимах панели ширина столбца 0" +"когда в режимах панели ширина колонки 0" "when in file panel mode it width is 0" upd:"when in file panel mode it width is 0" upd:"when in file panel mode it width is 0" From 4fb3c422dd02f8e05574bb8c3a52b48f950899e6 Mon Sep 17 00:00:00 2001 From: akruphi <92621645+akruphi@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:37:33 +0300 Subject: [PATCH 4/4] Calc width taking into account also SymLinkNames --- far2l/src/mix/panelmix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/far2l/src/mix/panelmix.cpp b/far2l/src/mix/panelmix.cpp index b2af7123e..7574abf28 100644 --- a/far2l/src/mix/panelmix.cpp +++ b/far2l/src/mix/panelmix.cpp @@ -90,7 +90,8 @@ void UpdateDefaultColumnTypeWidths( void ) size_t nameindex = Opt.DirNameStyle & 3; ColumnTypeWidth[SIZE_COLUMN] = ColumnTypeWidth[PHYSICAL_COLUMN] = \ - std::max( std::max(DirUpNames[nameindex].Len(), DirNames[nameindex].Len()) + \ + std::max( + std::max( std::max(DirUpNames[nameindex].Len(), DirNames[nameindex].Len()), SymLinkNames[nameindex].Len()) + \ ((Opt.DirNameStyle & DIRNAME_STYLE_SURR_CH) >> 3), (size_t)6ul ); }