Skip to content

Commit

Permalink
Merge branch 'elfmz:master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
unxed authored May 19, 2024
2 parents d8259ec + 1e81782 commit 4704c3b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
22 changes: 22 additions & 0 deletions far2l/bootstrap/scripts/farlang.templ.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16459,6 +16459,28 @@ upd:"Last status change time"
"Час зміни статусу"
"Час змены статута"

SetAttrSymlinkExplain1
"Для символьных ссылок время, владение, права,..."
"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."
upd:"For symlinks all times, ownership, permissions,..."

SetAttrSymlinkExplain2
" показаны и будут изменены для оригинального объекта"
" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"
upd:" are displayed and will be modified for the original object"

SetColorPanel
l:
"&Панель"
Expand Down
4 changes: 3 additions & 1 deletion far2l/src/findfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,9 @@ static bool ScanFileByMapping(const char *Name)
for (UINT LastPercents = 0;;) {
const bool FirstFragment = (FilePos == 0);
const bool LastFragment = (FilePos + off_t(smm.Length()) >= FileSize);
if (findPattern->FindMatch(View, Length, FirstFragment, LastFragment).first != (size_t)-1) {
const size_t AnalyzeLength = LastFragment
? Length - (FilePos + off_t(smm.Length()) - FileSize) : Length;
if (findPattern->FindMatch(View, AnalyzeLength, FirstFragment, LastFragment).first != (size_t)-1) {
return true;
}
if (LastFragment) {
Expand Down
2 changes: 1 addition & 1 deletion far2l/src/panels/flshow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ void FileList::ShowList(int ShowStatus, int StartColumn)
SetShowColor(ListPos);
}

uint64_t color = GetShowColor(ListPos, HIGHLIGHTCOLORTYPE_FILE);
//uint64_t color = GetShowColor(ListPos, HIGHLIGHTCOLORTYPE_FILE);

if (!ShowStatus)
SetShowColor(ListPos);
Expand Down
17 changes: 17 additions & 0 deletions far2l/src/setattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ enum SETATTRDLG
SA_SEPARATOR4,
SA_CHECKBOX_SUBFOLDERS,
SA_SEPARATOR5,
SC_SYMLINK_PROPERTIES_EXPLAIN_TEXT_1,
SC_SYMLINK_PROPERTIES_EXPLAIN_TEXT_2,
SA_BUTTON_SET,
SA_BUTTON_CANCEL
};
Expand Down Expand Up @@ -932,6 +934,8 @@ bool ShellSetFileAttributes(Panel *SrcPanel, LPCWSTR Object)
{DI_TEXT, 3, 21, 0, 21, {}, DIF_SEPARATOR | DIF_HIDDEN, L""},
{DI_CHECKBOX, 5, 22, 0, 22, {}, DIF_DISABLE | DIF_HIDDEN, Msg::SetAttrSubfolders},
{DI_TEXT, 3, short(DlgY - 4), 0, short(DlgY - 4), {}, DIF_SEPARATOR, L""},
{DI_TEXT, 5, short(DlgY - 3), 0, short(DlgY - 3), {}, DIF_DISABLE | DIF_HIDDEN, Msg::SetAttrSymlinkExplain1},
{DI_TEXT, 5, short(DlgY - 2), 0, short(DlgY - 2), {}, DIF_DISABLE | DIF_HIDDEN, Msg::SetAttrSymlinkExplain2},
{DI_BUTTON, 0, short(DlgY - 3), 0, short(DlgY - 3), {}, DIF_DEFAULT | DIF_CENTERGROUP, Msg::SetAttrSet},
{DI_BUTTON, 0, short(DlgY - 3), 0, short(DlgY - 3), {}, DIF_CENTERGROUP, Msg::Cancel}
};
Expand Down Expand Up @@ -1034,6 +1038,7 @@ bool ShellSetFileAttributes(Panel *SrcPanel, LPCWSTR Object)
AttrDlg[SA_EDIT_INFO].strData = DlgParam.SymLink;
AttrDlg[SA_EDIT_INFO].Flags &= ~DIF_READONLY; // not readonly only if symlink

Link2FileCount=1; // only for show symlink explain text
}
else if (FileAttr & FILE_ATTRIBUTE_DEVICE_CHAR)
AttrDlg[SA_EDIT_INFO].strData = Msg::FileFilterAttrDevChar;
Expand Down Expand Up @@ -1274,6 +1279,18 @@ bool ShellSetFileAttributes(Panel *SrcPanel, LPCWSTR Object)
DlgParam.OriginalCBFlag[i] = AttrDlg[PreserveOriginalIDs[i]].Flags;
}

// explain text about symlinks properties
if (FolderPresent || Link2FileCount>0 || Link2DirCount>0) {
AttrDlg[SC_SYMLINK_PROPERTIES_EXPLAIN_TEXT_1].Flags&= ~DIF_HIDDEN;
AttrDlg[SC_SYMLINK_PROPERTIES_EXPLAIN_TEXT_2].Flags&= ~DIF_HIDDEN;
AttrDlg[SA_DOUBLEBOX].Y2+= 2;
for (int i = SC_SYMLINK_PROPERTIES_EXPLAIN_TEXT_2+1; i <= SA_BUTTON_CANCEL; i++) {
AttrDlg[i].Y1+= 2;
AttrDlg[i].Y2+= 2;
}
DlgY+= 2;
}

DlgParam.strOwner = AttrDlg[SA_COMBO_OWNER].strData;
DlgParam.strGroup = AttrDlg[SA_COMBO_GROUP].strData;
FARString strInitOwner = DlgParam.strOwner, strInitGroup = DlgParam.strGroup;
Expand Down

0 comments on commit 4704c3b

Please sign in to comment.