diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-25 18:28:30 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-25 18:28:30 +0100 |
| commit | 2e39205afb249626b24b1af2251297ff039a60ca (patch) | |
| tree | 5fc31d531365120850be5aa3039f0c52f29a81c6 /UCoreUtils.pas | |
| parent | 52d72cf25a6bcff19e4a488102e3b7137bde0000 (diff) | |
| download | tuxcmd-2e39205afb249626b24b1af2251297ff039a60ca.tar.xz | |
Sanitize Overwrite and DirDelete dialog response values
Also respect localized button accelerators
Diffstat (limited to 'UCoreUtils.pas')
| -rw-r--r-- | UCoreUtils.pas | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas index faf6eb5..c4e71a7 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -67,6 +67,8 @@ function MakeString(const Separator: string; var SubStrings: TOpenStringArray): procedure CopyArray(var src: TOpenStringArray; var dst: TOpenStringArray); procedure DeleteFromArray(Index: integer; var SubStrings: TOpenStringArray); +function ExtractAccelerator(const LabelText: string): string; + function ProcessPattern(Engine: TPanelEngine; Pattern, APath, FileName: string; const Directory: boolean): string; // Processess pattern with FileName located in APath and return destination path+filename @@ -975,6 +977,14 @@ begin end; (********************************************************************************************************************************) +function ExtractAccelerator(const LabelText: string): string; +begin + Result := ''; + if (Pos('_', LabelText) > 0) and (Pos('_', LabelText) < Length(LabelText)) then + Result := Copy(LabelText, Pos('_', LabelText) + 1, 1); +end; + +(********************************************************************************************************************************) function GetStrSize(s: string): Int64; var i: integer; x: Double; |
