FIX: conflicts

This commit is contained in:
j2969719 2024-10-28 20:22:29 +03:00
commit 1eb249bb6c
49 changed files with 440 additions and 128 deletions

View file

@ -3156,7 +3156,7 @@ msgid "C&onfiguration"
msgstr "&Канфігурацыя"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Улюбёнае"
#: tfrmmain.mnufiles.caption
@ -3174,7 +3174,7 @@ msgstr "&Пазначэнне"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "Сетка"
#: tfrmmain.mnushow.caption

View file

@ -3252,7 +3252,7 @@ msgid "C&onfiguration"
msgstr "&Настройка"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Предпочитани"
#: tfrmmain.mnufiles.caption
@ -3270,7 +3270,7 @@ msgstr "&Избор"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Мрежа"
#: tfrmmain.mnushow.caption

View file

@ -3464,7 +3464,7 @@ msgid "C&onfiguration"
msgstr "C&onfiguració"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr ""
#: tfrmmain.mnufiles.caption
@ -3484,7 +3484,7 @@ msgstr "&Selecció"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Xarxa"
#: tfrmmain.mnushow.caption

View file

@ -3166,7 +3166,7 @@ msgid "C&onfiguration"
msgstr "N&astavení"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Oblíbené"
#: tfrmmain.mnufiles.caption
@ -3184,7 +3184,7 @@ msgstr "&Výběr"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Síť"
#: tfrmmain.mnushow.caption

View file

@ -3374,7 +3374,7 @@ msgstr "&Opsætning"
# In the menu bar
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Favo&ritter"
#: tfrmmain.mnufiles.caption
@ -3394,7 +3394,7 @@ msgstr "&Marker"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "&Netværk"
# Vis

View file

@ -3150,7 +3150,7 @@ msgid "C&onfiguration"
msgstr "K&onfigurieren"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "☆-&Tabs"
#: tfrmmain.mnufiles.caption
@ -3168,7 +3168,7 @@ msgstr "&Markieren"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "&Netzwerk"
#: tfrmmain.mnushow.caption

View file

@ -3211,7 +3211,7 @@ msgid "C&onfiguration"
msgstr "Διαμόρφωση"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Αγαπημένα"
#: tfrmmain.mnufiles.caption
@ -3229,7 +3229,7 @@ msgstr "Επιλογή"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Δίκτυο"
#: tfrmmain.mnushow.caption

View file

@ -3180,7 +3180,7 @@ msgid "C&onfiguration"
msgstr "C&onfiguración"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Pestañas favoritas"
#: tfrmmain.mnufiles.caption
@ -3198,7 +3198,7 @@ msgstr "&Seleccionar"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "Red"
#: tfrmmain.mnushow.caption

View file

@ -3272,7 +3272,7 @@ msgid "C&onfiguration"
msgstr "Confi&guration"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Onglets favoris"
#: tfrmmain.mnufiles.caption
@ -3290,7 +3290,7 @@ msgstr "&Sélection"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Réseau"
#: tfrmmain.mnushow.caption

View file

@ -3404,8 +3404,7 @@ msgid "C&onfiguration"
msgstr "&Postavke"
#: tfrmmain.mnufavoritetabs.caption
msgctxt "TFRMMAIN.MNUCONTEXTLINE2.CAPTION"
msgid "Favorites"
msgid "F&avorites"
msgstr "Omiljeno"
#: tfrmmain.mnufiles.caption
@ -3424,7 +3423,7 @@ msgstr "Oznaka&"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Mreža"
#: tfrmmain.mnushow.caption

View file

@ -3150,7 +3150,7 @@ msgid "C&onfiguration"
msgstr "&Beállítások"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "&Kedvencek"
#: tfrmmain.mnufiles.caption
@ -3168,7 +3168,7 @@ msgstr "&Megjelölés"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "Hálózat"
#: tfrmmain.mnushow.caption

View file

@ -3151,7 +3151,7 @@ msgid "C&onfiguration"
msgstr "C&onfigurazione"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Pr&eferiti"
#: tfrmmain.mnufiles.caption
@ -3169,7 +3169,7 @@ msgstr "&Selezione"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "&Rete"
#: tfrmmain.mnushow.caption

View file

@ -3220,7 +3220,7 @@ msgid "C&onfiguration"
msgstr "構成設定(&o)"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "お気に入り"
#: tfrmmain.mnufiles.caption
@ -3238,7 +3238,7 @@ msgstr "マーク(&M)"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "ネットワーク(&N)"
#: tfrmmain.mnushow.caption

View file

@ -3149,7 +3149,7 @@ msgid "C&onfiguration"
msgstr "구성(&O)"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "즐겨찾기"
#: tfrmmain.mnufiles.caption
@ -3167,7 +3167,7 @@ msgstr "선택(&M)"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "네트워크"
#: tfrmmain.mnushow.caption

View file

@ -3238,7 +3238,7 @@ msgid "C&onfiguration"
msgstr "&Oppsett"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Favo&ritter"
#: tfrmmain.mnufiles.caption
@ -3256,7 +3256,7 @@ msgstr "&Markér"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Nettverk"
#: tfrmmain.mnushow.caption

View file

@ -3163,7 +3163,7 @@ msgid "C&onfiguration"
msgstr "&Instellingen"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Favorieten"
#: tfrmmain.mnufiles.caption
@ -3181,7 +3181,7 @@ msgstr "&Markeren"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "Netwerk"
#: tfrmmain.mnushow.caption

View file

@ -3238,7 +3238,7 @@ msgid "C&onfiguration"
msgstr "&Oppsett"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "&Favorittar"
#: tfrmmain.mnufiles.caption
@ -3256,7 +3256,7 @@ msgstr "&Markér"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "&Nettverk"
#: tfrmmain.mnushow.caption

View file

@ -3141,7 +3141,7 @@ msgid "C&onfiguration"
msgstr "&Konfiguracja"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "&Ulubione"
#: tfrmmain.mnufiles.caption
@ -3159,7 +3159,7 @@ msgstr "Zaz&nacz"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "&Sieć"
#: tfrmmain.mnushow.caption

View file

@ -3147,7 +3147,7 @@ msgid "C&onfiguration"
msgstr ""
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr ""
#: tfrmmain.mnufiles.caption
@ -3165,7 +3165,7 @@ msgstr ""
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr ""
#: tfrmmain.mnushow.caption

View file

@ -3238,7 +3238,7 @@ msgid "C&onfiguration"
msgstr "C&onfiguração"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Favoritos"
#: tfrmmain.mnufiles.caption
@ -3256,7 +3256,7 @@ msgstr "&Marcar"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Rede"
#: tfrmmain.mnushow.caption

View file

@ -3269,7 +3269,7 @@ msgid "C&onfiguration"
msgstr "C&onfiguração"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Favoritos"
#: tfrmmain.mnufiles.caption
@ -3287,7 +3287,7 @@ msgstr "&Marcar"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Rede"
#: tfrmmain.mnushow.caption

View file

@ -3233,7 +3233,7 @@ msgid "C&onfiguration"
msgstr "C&onfigurare"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr ""
#: tfrmmain.mnufiles.caption
@ -3251,7 +3251,7 @@ msgstr "&Marchează"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Rețea"
#: tfrmmain.mnushow.caption

View file

@ -3203,7 +3203,7 @@ msgid "C&onfiguration"
msgstr "&Настройки"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Избранное"
#: tfrmmain.mnufiles.caption
@ -3221,7 +3221,7 @@ msgstr "&Выделение"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Сеть"
#: tfrmmain.mnushow.caption

View file

@ -3149,7 +3149,7 @@ msgid "C&onfiguration"
msgstr "Kon&figurácia"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Obľúbené"
#: tfrmmain.mnufiles.caption
@ -3167,7 +3167,7 @@ msgstr "&Označiť"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "S&ieť"
#: tfrmmain.mnushow.caption

View file

@ -3157,7 +3157,7 @@ msgid "C&onfiguration"
msgstr "&Nastavitve"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Priljubljeno"
#: tfrmmain.mnufiles.caption
@ -3175,7 +3175,7 @@ msgstr "&Izbor"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "Omrežje"
#: tfrmmain.mnushow.caption

View file

@ -3210,7 +3210,7 @@ msgid "C&onfiguration"
msgstr "&Поставке"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Омиљено"
#: tfrmmain.mnufiles.caption
@ -3228,7 +3228,7 @@ msgstr "Ознака&"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Мрежа"
#: tfrmmain.mnushow.caption

View file

@ -3261,7 +3261,7 @@ msgid "C&onfiguration"
msgstr "&Postavke"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr ""
#: tfrmmain.mnufiles.caption
@ -3279,7 +3279,7 @@ msgstr "Oznaka&"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Mreža"
#: tfrmmain.mnushow.caption

View file

@ -3386,7 +3386,7 @@ msgid "C&onfiguration"
msgstr "&Yapılandır"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr ""
#: tfrmmain.mnufiles.caption
@ -3404,7 +3404,7 @@ msgstr "&İşaretle"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Ağ"
#: tfrmmain.mnushow.caption

View file

@ -3229,7 +3229,7 @@ msgid "C&onfiguration"
msgstr "&Налаштування"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "Вибране"
#: tfrmmain.mnufiles.caption
@ -3247,7 +3247,7 @@ msgstr "&Виділення"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "Мережа"
#: tfrmmain.mnushow.caption

View file

@ -3148,7 +3148,7 @@ msgid "C&onfiguration"
msgstr "配置(&O)"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "收藏夹(&A)"
#: tfrmmain.mnufiles.caption
@ -3166,7 +3166,7 @@ msgstr "标记(&M)"
#: tfrmmain.mnunetwork.caption
msgctxt "tfrmmain.mnunetwork.caption"
msgid "Network"
msgid "&Network"
msgstr "网络(&N)"
#: tfrmmain.mnushow.caption

View file

@ -3196,7 +3196,7 @@ msgid "C&onfiguration"
msgstr "設置 (&O)"
#: tfrmmain.mnufavoritetabs.caption
msgid "Favorites"
msgid "F&avorites"
msgstr "我的最愛"
#: tfrmmain.mnufiles.caption
@ -3214,7 +3214,7 @@ msgstr "標記 (&M)"
#: tfrmmain.mnunetwork.caption
msgctxt "TFRMMAIN.MNUNETWORK.CAPTION"
msgid "Network"
msgid "&Network"
msgstr "網路"
#: tfrmmain.mnushow.caption

View file

@ -574,9 +574,21 @@ begin
end;
procedure TFTPSendEx.OnSocketStatus(Sender: TObject; Reason: THookSocketReason; const Value: String);
var
MsgType: Integer;
begin
if (Reason in [HR_Error]) and (Length(Value) > 0) then
LogProc(PluginNumber, msgtype_importanterror, PWideChar(ServerToClient(Value)));
if (Reason in [HR_ResolvingBegin, HR_ResolvingEnd, HR_Error]) then
begin
if (Length(Value) > 0) then
begin
if Reason = HR_Error then
MsgType:= msgtype_importanterror
else begin
MsgType:= msgtype_details;
end;
LogProc(PluginNumber, MsgType, PWideChar(ServerToClient(Value)));
end;
end;
end;
function TFTPSendEx.ClientToServer(const Value: AnsiString): AnsiString;

View file

@ -446,6 +446,86 @@ function ResolvePort(Port: string; Family, SockProtocol, SockType: integer): Wor
{==============================================================================}
implementation
uses
InitC;
{$if defined(LINUX) or defined(OPENBSD)}
{$define FIRST_ADDR_THEN_CANONNAME}
{$elseif defined(FREEBSD) or defined(NETBSD) or defined(DRAGONFLY) or defined(SOLARIS) or defined(ANDROID) or defined(DARWIN)}
{$define FIRST_CANONNAME_THEN_ADDR}
{$else}
{$error fatal 'Please consult the netdb.h file for your system to determine the order of ai_addr and ai_canonname'}
{$endif}
{$push}{$packrecords c}
type
PAddrInfo = ^addrinfo;
addrinfo = record
ai_flags: cint; {* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST *}
ai_family: cint; {* PF_xxx *}
ai_socktype: cint; {* SOCK_xxx *}
ai_protocol: cint; {* 0 or IPPROTO_xxx for IPv4 and IPv6 *}
ai_addrlen: TSockLen; {* length of ai_addr *}
{$ifdef FIRST_CANONNAME_THEN_ADDR}
ai_canonname: PAnsiChar; {* canonical name for hostname *}
ai_addr: psockaddr; {* binary address *}
{$endif}
{$ifdef FIRST_ADDR_THEN_CANONNAME}
ai_addr: psockaddr; {* binary address *}
ai_canonname: PAnsiChar; {* canonical name for hostname *}
{$endif}
ai_next: PAddrInfo; {* next structure in linked list *}
end;
TAddrInfo = addrinfo;
PPAddrInfo = ^PAddrInfo;
{$pop}
function getaddrinfo(name, service: PAnsiChar; hints: PAddrInfo; res: PPAddrInfo): cint; cdecl; external clib;
procedure freeaddrinfo(ai: PAddrInfo); cdecl; external clib;
function ResolveName(const HostName: String; Addresses: Pointer; MaxAddresses, Family: Integer): Integer; overload;
var
hints: TAddrInfo;
res, ai: PAddrInfo;
begin
Result:= -1;
if MaxAddresses = 0 then Exit;
res:= nil;
hints:= Default(TAddrInfo);
hints.ai_family:= Family;
hints.ai_socktype:= SOCK_STREAM;
if (getaddrinfo(PAnsiChar(HostName), nil, @hints, @res) <> 0) or (res = nil) then
Exit;
ai:= res;
Result:= 0;
repeat
if ai^.ai_family = Family then
begin
if Family = AF_INET then
begin
Move(PInetSockAddr(ai^.ai_addr)^.sin_addr, Addresses^, SizeOf(TInAddr));
Inc(PInAddr(Addresses));
end
else begin
Move(PInetSockAddr6(ai^.ai_addr)^.sin6_addr, Addresses^, SizeOf(TIn6Addr));
Inc(PIn6Addr(Addresses));
end;
Inc(Result);
end;
ai:= ai^.ai_next;
until (ai = nil) or (Result >= MaxAddresses);
freeaddrinfo(res);
end;
function ResolveName(HostName: String; var Addresses: array of THostAddr): Integer; overload;
begin
Result:= ResolveName(HostName, @Addresses, Length(Addresses), AF_INET);
end;
function ResolveName6(HostName: String; var Addresses: array of THostAddr6): Integer;
begin
Result:= ResolveName(HostName, @Addresses, Length(Addresses), AF_INET6);
end;
function IN6_IS_ADDR_UNSPECIFIED(const a: PInAddr6): boolean;
begin

View file

@ -361,9 +361,9 @@ begin
LinkProperty := TFileLinkProperty.Create;
AFilePath:= Path + pSearchRecord^.Name;
if fpS_ISLNK(pSearchRecord^.Attr) then
begin
AFilePath:= Path + pSearchRecord^.Name;
LinkAttrs := mbFileGetAttrNoLinks(AFilePath);
LinkProperty.LinkTo := ReadSymLink(AFilePath);
LinkProperty.IsValid := LinkAttrs <> faInvalidAttributes;
@ -387,6 +387,9 @@ begin
end;
{$ENDIF}
end;
{$IFDEF DARWIN}
FinderTagProperty := uMyDarwin.getMacOSFinderTagFileProperty(AFilePath);
{$ENDIF}
end;
// Set name after assigning Attributes property, because it is used to get extension.
@ -712,6 +715,12 @@ begin
CommentProperty.Value := FDescr.ReadDescription(sFullPath);
end;
{$IFDEF DARWIN}
if fpMacOSFinderTag in PropertiesToSet then begin
FinderTagProperty := uMyDarwin.getMacOSFinderTagFileProperty(sFullPath);
end;
{$ENDIF}
PropertiesToSet:= PropertiesToSet * fpVariantAll;
for AProp in PropertiesToSet do
begin
@ -854,6 +863,9 @@ begin
{$ENDIF}
fpLastAccessTime,
uFileProperty.fpLink
{$IF DEFINED(DARWIN)}
,fpMacOSFinderTag
{$ENDIF}
];
end;
@ -875,6 +887,9 @@ begin
{$IF DEFINED(MSWINDOWS)}
, fpCompressedSize
{$ENDIF}
{$IF DEFINED(DARWIN)}
,fpMacOSFinderTag
{$ENDIF}
] + fpVariantAll;
{$IF DEFINED(LINUX)}
if HasStatX then Result += [fpCreationTime];

View file

@ -110,6 +110,7 @@ end;
class function TGioFileSource.CreateFile(const APath: String; AFolder: PGFile;
AFileInfo: PGFileInfo): TFile;
var
Addr: TURI;
AFile: PGFile;
ATarget: Pgchar;
AFileType: TGFileType;
@ -166,6 +167,18 @@ begin
ATarget:= g_file_info_get_attribute_string(AFileInfo, FILE_ATTRIBUTE_STANDARD_TARGET_URI);
Result.LinkProperty.IsValid := Length(ATarget) > 0;
Result.LinkProperty.LinkTo := ATarget;
// Remove a standard port from address
Addr:= ParseURI(Result.LinkProperty.LinkTo);
if Addr.Port > 0 then
begin
case Addr.Port of
22: if (Addr.Protocol = 'sftp') then Addr.Port:= 0;
445: if (Addr.Protocol = 'smb') then Addr.Port:= 0;
2049: if (Addr.Protocol = 'nfs') then Addr.Port:= 0;
end;
if Addr.Port = 0 then Result.LinkProperty.LinkTo:= EncodeURI(Addr);
end;
end;
end;

View file

@ -72,6 +72,7 @@ type
Comment: string;
procedure ClearStore; virtual;
function CheckValues: Boolean; virtual;
function CheckSizeChar(Chr: AnsiChar): Boolean; virtual;
procedure FillRecord(const Value: TArchiveItem); virtual;
function ParseByMask(Value, NextValue, Mask: ansistring): Integer; virtual;
public
@ -227,7 +228,7 @@ begin
begin
while IValue <= Length(Value) do
begin
if not(Value[Ivalue] in ['0'..'9']) then
if CheckSizeChar(Value[Ivalue]) = False then
break;
s := s + Value[Ivalue];
Inc(Ivalue);
@ -304,6 +305,21 @@ begin
end;
end;
function TMultiArchiveDynamicParser.CheckSizeChar(Chr: AnsiChar): Boolean;
var
I: Integer;
begin
Result:= False;
if not (Chr in ['0'..'9']) then
begin
with FMultiArcItem do
if (FSizeStripChars <> EmptyStr) and ContainsOneOf(Chr, FSizeStripChars) then
Result:= True;
end
else
Result:= True;
end;
function TMultiArchiveDynamicParser.CheckValues: Boolean;
var
x, n: integer;
@ -356,7 +372,7 @@ begin
begin
Size := Trim(Size);
for n := 1 to Length(Size) do
if not (Size[n] in ['0'..'9']) then
if CheckSizeChar(Size[n]) = False then
Exit;
end;
if ThreeMonth <> '' then
@ -400,8 +416,8 @@ var
begin
Value.FileName:= FGetFileName(FileName);
Value.FileExt:= FGetFileName(FileExt);
Value.PackSize:= StrToInt64Def(PackSize, -1);
Value.UnpSize:= StrToInt64Def(Size, -1);
Value.PackSize:= StrToInt64Def(CleanSize(PackSize), -1);
Value.UnpSize:= StrToInt64Def(CleanSize(Size), -1);
Value.Year:= YearShortToLong(StrToIntDef(Year, 0));
Value.Month:= StrToIntDef(Month, 0);
Value.Day:= StrToIntDef(Day, 0);

View file

@ -41,6 +41,7 @@ type
procedure Prepare; virtual; abstract;
procedure ParseLines; virtual; abstract;
procedure AddLine(const Str: String); virtual; abstract;
function CleanSize(Str: String): String;
property OnGetArchiveItem: TOnGetArchiveItem write FOnGetArchiveItem;
end;
@ -247,6 +248,20 @@ begin
end;
function TMultiArchiveParser.CleanSize(Str: String): String;
var
I: Integer;
Size: String;
begin
Size:= Trim(Str);
if FMultiArcItem.FSizeStripChars <> EmptyStr then
begin
for I:= 1 to Length(FMultiArcItem.FSizeStripChars) do
Size:= Size.Replace(FMultiArcItem.FSizeStripChars[I], '');
end;
Result:= Size;
end;
procedure TMultiArchiveStaticParser.AddLine(const Str: String);
begin
// if next item
@ -262,9 +277,9 @@ begin
if FNamePos.Index = FFormatIndex then
FArchiveItem.FileName := FGetFileName(Trim(GetKeyValue(str, FNamePos)));
if FUnpSizePos.Index = FFormatIndex then
FArchiveItem.UnpSize := StrToInt64Def(Trim(GetKeyValue(str, FUnpSizePos)), -1);
FArchiveItem.UnpSize := StrToInt64Def(CleanSize(GetKeyValue(str, FUnpSizePos)), -1);
if FPackSizePos.Index = FFormatIndex then
FArchiveItem.PackSize := StrToInt64Def(Trim(GetKeyValue(str, FPackSizePos)), -1);
FArchiveItem.PackSize := StrToInt64Def(CleanSize(GetKeyValue(str, FPackSizePos)), -1);
if FYearPos.Index = FFormatIndex then
FArchiveItem.Year := YearShortToLong(StrToIntDef(Trim(GetKeyValue(str, FYearPos)), 0));
if FMonthPos.Index = FFormatIndex then

View file

@ -52,7 +52,8 @@ begin
FFileSource := AFileSource as IWcxArchiveFileSource;
inherited Create(AOwner, AFileSource);
pnlCheckboxes.Visible := True;
btnConfig.Visible := True;
cbEncrypt.Enabled:= ((FFileSource.PluginCapabilities and PK_CAPS_ENCRYPT) <> 0);
btnConfig.Visible := ((FFileSource.PluginCapabilities and PK_CAPS_OPTIONS) <> 0);
end;
{ TWcxArchiveCopyOperationOptionsUI }

View file

@ -491,7 +491,11 @@ begin
Result := [fsoList, fsoCopyOut, fsoTestArchive, fsoExecute, fsoCalcStatistics]; // by default
with FWcxModule do
begin
if (((FPluginCapabilities and PK_CAPS_NEW) <> 0) or ((FPluginCapabilities and PK_CAPS_MODIFY) <> 0)) and
if (((FPluginCapabilities and PK_CAPS_MODIFY) = 0) and mbFileExists(ArchiveFileName)) then
begin
// not supported
end
else if (((FPluginCapabilities and PK_CAPS_NEW) <> 0) or ((FPluginCapabilities and PK_CAPS_MODIFY) <> 0)) and
(Assigned(PackFiles) or Assigned(PackFilesW)) then
Result:= Result + [fsoCopyIn];
if ((FPluginCapabilities and PK_CAPS_DELETE) <> 0) and

View file

@ -620,6 +620,9 @@ begin
fpAttributes, // For distinguishing directories
fpLink, // For distinguishing directories (link to dir) and link icons
fpModificationTime // For selecting/coloring files (by SearchTemplate)
{$IFDEF DARWIN}
,fpMacOSFinderTag // macOS finder tag
{$ENDIF}
];
ColumnsClass := GetColumnsClass;

View file

@ -618,6 +618,9 @@ begin
fpAttributes, // For distinguishing directories
fpLink, // For distinguishing directories (link to dir) and link icons
fpModificationTime // For selecting/coloring files (by SearchTemplate)
{$IFDEF DARWIN}
,fpMacOSFinderTag // macOS finder tag
{$ENDIF}
];
end;

View file

@ -1230,7 +1230,7 @@ object frmMain: TfrmMain
end
end
object mnuNetwork: TMenuItem
Caption = 'Network'
Caption = '&Network'
object miNetworkConnect: TMenuItem
Action = actNetworkConnect
end
@ -1342,7 +1342,7 @@ object frmMain: TfrmMain
end
end
object mnuFavoriteTabs: TMenuItem
Caption = 'Favorites'
Caption = 'F&avorites'
object mnuCreateNewFavoriteTabs: TMenuItem
Action = actSaveFavoriteTabs
end

View file

@ -25,10 +25,10 @@
{"hash":44892867,"name":"tfrmmain.mnufiles.caption","sourcebytes":[38,70,105,108,101,115],"value":"&Files"},
{"hash":2832523,"name":"tfrmmain.mnumark.caption","sourcebytes":[38,77,97,114,107],"value":"&Mark"},
{"hash":105082387,"name":"tfrmmain.mnucmd.caption","sourcebytes":[38,67,111,109,109,97,110,100,115],"value":"&Commands"},
{"hash":80471771,"name":"tfrmmain.mnunetwork.caption","sourcebytes":[78,101,116,119,111,114,107],"value":"Network"},
{"hash":80471099,"name":"tfrmmain.mnunetwork.caption","sourcebytes":[38,78,101,116,119,111,114,107],"value":"&Network"},
{"hash":2860947,"name":"tfrmmain.mnutabs.caption","sourcebytes":[38,84,97,98,115],"value":"&Tabs"},
{"hash":64866531,"name":"tfrmmain.mnutaboptions.caption","sourcebytes":[84,97,98,32,38,79,112,116,105,111,110,115],"value":"Tab &Options"},
{"hash":225003075,"name":"tfrmmain.mnufavoritetabs.caption","sourcebytes":[70,97,118,111,114,105,116,101,115],"value":"Favorites"},
{"hash":225281603,"name":"tfrmmain.mnufavoritetabs.caption","sourcebytes":[70,38,97,118,111,114,105,116,101,115],"value":"F&avorites"},
{"hash":2858855,"name":"tfrmmain.mnushow.caption","sourcebytes":[38,83,104,111,119],"value":"&Show"},
{"hash":32269806,"name":"tfrmmain.mnuconfig.caption","sourcebytes":[67,38,111,110,102,105,103,117,114,97,116,105,111,110],"value":"C&onfiguration"},
{"hash":2812976,"name":"tfrmmain.mnuhelp.caption","sourcebytes":[38,72,101,108,112],"value":"&Help"},

View file

@ -117,7 +117,6 @@ inherited frmOptionsToolTips: TfrmOptionsToolTips
Width = 54
AutoSize = True
BorderSpacing.Left = 3
Cancel = True
Caption = 'Cop&y'
OnClick = btnCopyToolTipsFileTypeClick
TabOrder = 2

View file

@ -53,8 +53,6 @@ type
class procedure attachFinderTagsMenu( const path: String; const lclMenu: TPopupMenu );
class procedure attachSearchForTagsMenu( const lclMenu: TMenuItem );
class procedure drawTagsAsDecoration(
const tagNames: NSArray; const drawRect: TRect; const focused: Boolean );
private
class procedure drawTagName( const tagName: NSString;
const fontSize: CGFloat; const color: NSColor; const rect: NSRect );
@ -939,41 +937,6 @@ begin
end;
end;
class procedure uDarwinFinderUtil.drawTagsAsDecoration(
const tagNames: NSArray; const drawRect: TRect; const focused: Boolean );
var
tagName: NSString;
tag: TFinderTag;
length: NSUInteger;
i: NSUInteger;
tagRect: NSRect;
path: NSBezierPath;
begin
tagRect.size.width:= 11;
tagRect.size.height:= 11;
tagRect.origin.x:= drawRect.Right - 17;
tagRect.origin.y:= drawRect.Top + (drawRect.Height-tagRect.size.height)/2;
length:= tagNames.count;
i:= 0;
if length > 3 then
i:= length - 3;
while i < length do begin
tagName:= NSString( tagNames.objectAtIndex(i) );
tag:= TFinderTags.getTagOfName( tagName );
tag.color.set_;
path:= NSBezierPath.bezierPathWithOvalInRect( tagRect );
path.fill;
if focused then
NSColor.alternateSelectedControlTextColor.set_
else
NSColor.textBackgroundColor.set_;
path.stroke;
tagRect.origin.x:= tagRect.origin.x - 5;
inc( i );
end;
end;
class procedure uDarwinFinderUtil.drawTagName( const tagName: NSString;
const fontSize: CGFloat; const color: NSColor; const rect: NSRect );
var

View file

@ -35,8 +35,8 @@ interface
uses
Classes, SysUtils, UnixType,
InterfaceBase, Menus, Controls, Forms, Grids,
uFileSourceProperty, uDisplayFile, uFileView, uColumnsFileView,
InterfaceBase, Menus, Controls, Forms,
uFileProperty, uFileSourceProperty, uDisplayFile, uFileView, uColumnsFileView,
Cocoa_Extra, MacOSAll, CocoaAll, QuickLookUI,
CocoaUtils, CocoaInt, CocoaPrivate, CocoaConst, CocoaMenus,
uDarwinFSWatch, uDarwinFinder, uDarwinFinderModel;
@ -162,6 +162,7 @@ procedure performMacOSService( serviceName: String );
procedure showQuickLookPanel;
procedure showEditFinderTagsPanel( const Sender: id; const control: TWinControl );
function getMacOSFinderTagFileProperty( const path: String ): TFileFinderTagProperty;
// MacOS Sharing
procedure showMacOSSharingServiceMenu;
@ -185,6 +186,8 @@ type
TDarwinFileViewDrawHelper = class
procedure onDrawCell(Sender: TFileView; aCol, aRow: Integer;
aRect: TRect; focused: Boolean; aFile: TDisplayFile);
procedure drawTagsAsDecoration(
const colors: TFileFinderTagPrimaryColors; const drawRect: TRect; const focused: Boolean );
end;
var
@ -311,20 +314,48 @@ end;
procedure TDarwinFileViewDrawHelper.onDrawCell(Sender: TFileView; aCol, aRow: Integer;
aRect: TRect; focused: Boolean; aFile: TDisplayFile);
var
url: NSURL;
tagNames: NSArray;
tagProperty: TFileFinderTagProperty;
begin
if (Sender is TColumnsFileView) and (aCol<>0) then
Exit;
if NOT (fspDirectAccess in Sender.FileSource.Properties) then
tagProperty:= aFile.FSFile.FinderTagProperty;
if tagProperty = nil then
Exit;
url:= NSURL.fileURLWithPath( StrToNSString(aFile.FSFile.FullPath) );
tagNames:= uDarwinFinderModelUtil.getTagNamesOfFile( url );
if tagNames.count = 0 then
Exit;
uDarwinFinderUtil.drawTagsAsDecoration( tagNames, aRect, focused );
drawTagsAsDecoration( tagProperty.Colors, aRect, focused );
end;
procedure TDarwinFileViewDrawHelper.drawTagsAsDecoration(
const colors: TFileFinderTagPrimaryColors; const drawRect: TRect;
const focused: Boolean);
var
i: Integer;
colorIndex: Integer;
color: NSColor;
tagRect: NSRect;
path: NSBezierPath;
begin
tagRect.size.width:= 11;
tagRect.size.height:= 11;
tagRect.origin.x:= drawRect.Right - 17;
tagRect.origin.y:= drawRect.Top + (drawRect.Height-tagRect.size.height)/2;
for i:=0 to 2 do begin
colorIndex:= colors.indexes[i];
if colorIndex < 0 then
break;
color:= uDarwinFinderModelUtil.rectFinderTagNSColors[colorIndex];
color.set_;
path:= NSBezierPath.bezierPathWithOvalInRect( tagRect );
path.fill;
if focused then
NSColor.alternateSelectedControlTextColor.set_
else
NSColor.textBackgroundColor.set_;
path.stroke;
tagRect.origin.x:= tagRect.origin.x - 5;
end;
end;
@ -814,6 +845,46 @@ begin
uDarwinFinderUtil.popoverFileTagsEditor( filenames[0], handler.onClose, view , NSMaxYEdge );
end;
function getMacOSFinderTagFileProperty( const path: String ): TFileFinderTagProperty;
var
url: NSURL;
tagNames: NSArray;
tagName: NSString;
function toPrimaryColors: TFileFinderTagPrimaryColors;
var
tag: TFinderTag;
iSource: NSUInteger;
iDest: Integer;
colorIndex: Integer;
begin
iSource:= 0;
if tagNames.count > 3 then
iSource:= tagNames.count - 3;
for iDest:=0 to 2 do begin
colorIndex:= -1;
if iSource < tagNames.count then begin
tagName:= NSString( tagNames.objectAtIndex(iSource) );
tag:= TFinderTags.getTagOfName( tagName );
colorIndex:= tag.colorIndex;
end;
Result.indexes[iDest]:= colorIndex;
inc( iSource );
end;
end;
begin
Result:= nil;
url:= NSURL.fileURLWithPath( StrToNSString(path) );
tagNames:= uDarwinFinderModelUtil.getTagNamesOfFile( url );
if tagNames = nil then
Exit;
Result:= TFileFinderTagProperty.Create;
Result.Colors:= toPrimaryColors;
end;
initialization
Initialize;

View file

@ -89,6 +89,10 @@ type
procedure SetTypeProperty(NewValue: TFileTypeProperty);
function GetCommentProperty: TFileCommentProperty;
procedure SetCommentProperty(NewValue: TFileCommentProperty);
{$IFDEF DARWIN}
function GetFinderTagProperty: TFileFinderTagProperty;
procedure SetFinderTagProperty(NewValue: TFileFinderTagProperty);
{$ENDIF}
public
constructor Create(const APath: String);
constructor CreateForCloning;
@ -162,6 +166,9 @@ type
property OwnerProperty: TFileOwnerProperty read GetOwnerProperty write SetOwnerProperty;
property TypeProperty: TFileTypeProperty read GetTypeProperty write SetTypeProperty;
property CommentProperty: TFileCommentProperty read GetCommentProperty write SetCommentProperty;
{$IFDEF DARWIN}
property FinderTagProperty: TFileFinderTagProperty read GetFinderTagProperty write SetFinderTagProperty;
{$ENDIF}
{ Accessors to each property's value. }
@ -800,6 +807,22 @@ begin
Exclude(FSupportedProperties, fpComment);
end;
{$IFDEF DARWIN}
function TFile.GetFinderTagProperty: TFileFinderTagProperty;
begin
Result := TFileFinderTagProperty(FProperties[fpMacOSFinderTag]);
end;
procedure TFile.SetFinderTagProperty(NewValue: TFileFinderTagProperty);
begin
FProperties[fpMacOSFinderTag] := NewValue;
if Assigned(NewValue) then
Include(FSupportedProperties, fpMacOSFinderTag)
else
Exclude(FSupportedProperties, fpMacOSFinderTag);
end;
{$ENDIF}
function TFile.IsNameValid: Boolean;
begin
if Name <> '..' then

View file

@ -29,7 +29,8 @@ type
fpLink = 9,
fpType = 10,
fpComment = 11,
fpInvalid = 12,
fpMacOSFinderTag = 12,
fpInvalid = 13,
fpVariant = 128,
fpMaximum = 255
);
@ -422,6 +423,40 @@ type
end;
{$IFDEF DARWIN}
{ TFileFinderTagPrimaryColors }
TFileFinderTagPrimaryColors = record
case Byte of
0: (intValue: Integer);
1: (indexes: array [0..2] of int8);
end;
{ TFileFinderTagProperty }
TFileFinderTagProperty = class(TFileProperty)
private
FColors: TFileFinderTagPrimaryColors;
public
constructor Create; override;
function Clone: TFileFinderTagProperty; override;
procedure CloneTo(FileProperty: TFileProperty); override;
class function GetDescription: String; override;
class function GetID: TFilePropertyType; override;
function Equals(p: TObject): Boolean; override;
function Format({%H-}Formatter: IFilePropertyFormatter): String; override;
property Colors: TFileFinderTagPrimaryColors read FColors write FColors;
end;
{$ENDIF}
{ TFileVariantProperty }
TFileVariantProperty = class(TFileProperty)
@ -1206,6 +1241,60 @@ begin
Result:= FComment;
end;
{$IFDEF DARWIN}
{ TFileFinderTagProperty }
constructor TFileFinderTagProperty.Create;
begin
inherited Create;
FColors.intValue:= -1;
end;
function TFileFinderTagProperty.Clone: TFileFinderTagProperty;
begin
Result := TFileFinderTagProperty.Create;
CloneTo(Result);
end;
procedure TFileFinderTagProperty.CloneTo(FileProperty: TFileProperty);
begin
if Assigned(FileProperty) then
begin
inherited CloneTo(FileProperty);
with FileProperty as TFileFinderTagProperty do
begin
FColors := Self.FColors;
end;
end;
end;
class function TFileFinderTagProperty.GetDescription: String;
begin
Result:= '';
end;
class function TFileFinderTagProperty.GetID: TFilePropertyType;
begin
Result := fpMacOSFinderTag;
end;
function TFileFinderTagProperty.Equals(p: TObject): Boolean;
begin
Result:= false;
if not (p is TFileFinderTagProperty) then exit;
if self.FColors.intValue <> TFileFinderTagProperty(p).FColors.intValue then exit;
Result:= true;
end;
function TFileFinderTagProperty.Format(Formatter: IFilePropertyFormatter): String;
begin
Result:= '';
end;
{$ENDIF}
{ TFileVariantProperty }
constructor TFileVariantProperty.Create;

View file

@ -142,7 +142,8 @@ type
FDelete,
FAdd,
FAddSelfExtract,
FPasswordQuery: String;
FPasswordQuery,
FSizeStripChars: String;
FFormMode: Integer;
FFlags: TMultiArcFlags;
FIgnoreString: TStringList;
@ -386,6 +387,7 @@ var
else
Break;
end;
FSizeStripChars:= TrimQuotes(IniFile.ReadString(Section, 'SizeStripChars', EmptyStr));
FFlags:= TMultiArcFlags(IniFile.ReadInteger(Section, 'Flags', 0));
FFormMode:= IniFile.ReadInteger(Section, 'FormMode', 0);
FEnabled:= IniFile.ReadBool(Section, 'Enabled', True);
@ -484,6 +486,8 @@ begin
IniFile.WriteString(Section, 'IgnoreString' + IntToStr(J), '"' + FIgnoreString[J] + '"');
for J:= 0 to FAskHistory.Count - 1 do
IniFile.WriteString(Section, 'AskHistory' + IntToStr(J), FAskHistory[J]);
if FSizeStripChars <> EmptyStr then
IniFile.WriteString(Section, 'SizeStripChars', '"' + FSizeStripChars + '"');
IniFile.WriteInteger(Section, 'Flags', Integer(FFlags));
IniFile.WriteInteger(Section, 'FormMode', FFormMode);
IniFile.WriteBool(Section, 'Enabled', FEnabled);
@ -569,6 +573,7 @@ begin
UpdateSignature(Self.Items[Index].FID);
UpdateSignature(Self.Items[Index].FIDPos);
UpdateSignature(Self.Items[Index].FIDSeekRange);
UpdateSignature(Self.Items[Index].FSizeStripChars);
Result := crc32(Result, @Self.Items[Index].FFlags, sizeof(Self.Items[Index].FFlags));
Result := crc32(Result, @Self.Items[Index].FFormMode, sizeof(Self.Items[Index].FFormMode));
Result := crc32(Result, @Self.Items[Index].FEnabled, sizeof(Self.Items[Index].FEnabled));
@ -797,6 +802,7 @@ begin
Result.FEnabled := Self.FEnabled;
Result.FOutput := Self.FOutput;
Result.FDebug := Self.FDebug;
Result.FSizeStripChars := Self.FSizeStripChars;
Result.FIgnoreString.Assign(Self.FIgnoreString);
Result.FAskHistory.Assign(Self.FAskHistory);
end;