summaryrefslogtreecommitdiff
path: root/UFileTypeSettings.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-07 20:40:48 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-07 20:40:48 +0200
commita0f1e0e9db4b0edee45018c47a08761916af0ce6 (patch)
treedc9d05f5772442f61ec913631540b24cf67d5e8a /UFileTypeSettings.pas
parentecde167da74c86bc047aaf84c5e548cf65a5da98 (diff)
downloadtuxcmd-0.6.38.tar.xz
Revised UTF-8 filenames supportv0.6.38
Diffstat (limited to 'UFileTypeSettings.pas')
-rw-r--r--UFileTypeSettings.pas16
1 files changed, 8 insertions, 8 deletions
diff --git a/UFileTypeSettings.pas b/UFileTypeSettings.pas
index 3917e43..10fbeae 100644
--- a/UFileTypeSettings.pas
+++ b/UFileTypeSettings.pas
@@ -601,8 +601,8 @@ begin
if Length(Trim(FNameExtEntry.Text)) = 0 then Exit;
if FNameExtListView.Items.Count > 0 then
for i := 0 to FNameExtListView.Items.Count - 1 do
- if ANSIUpperCase(FNameExtListView.Items[i].AsString(0)) = ANSIUpperCase(Trim(FNameExtEntry.Text)) then Exit;
- sx := ANSILowerCase(Trim(FNameExtEntry.Text));
+ if WideUpperCase(FNameExtListView.Items[i].AsString(0)) = WideUpperCase(Trim(FNameExtEntry.Text)) then Exit;
+ sx := WideLowerCase(Trim(FNameExtEntry.Text));
if sx[1] = '.' then Delete(sx, 1, 1);
FNameExtListView.Items.Add.SetValue(0, sx);
s := TFileAssoc(ListView.Selected.AsPointer(2)).Extensions;
@@ -789,10 +789,10 @@ begin
then DefIcon := FolderIconCached
else DefIcon := FileIconCached;
TFileAssoc(ListView.Selected.AsPointer(2)).FileTypeIcon := IconEntry.Text;
- if not FileExists(UTF8ToANSI(IconEntry.Text)) then Icon.CopyFromPixbuf(DefIcon) else
+ if not FileExists(IconEntry.Text) then Icon.CopyFromPixbuf(DefIcon) else
begin
Pixmap := TGDKPixbuf.Create(Self);
- Pixmap.LoadFromFile(UTF8ToANSI(IconEntry.Text));
+ Pixmap.LoadFromFile(IconEntry.Text);
if Pixmap.FPixbuf <> nil then begin
Pixmap.ScaleSimple(ConfRowHeightReal, ConfRowHeightReal);
Icon.SetFromPixbuf(Pixmap);
@@ -802,8 +802,8 @@ begin
end;
ListView.Selected.SetValue(3, Icon.GetPixbuf);
if FUseGnomeIconEntry then
- if FileExists(UTF8ToANSI(IconEntry.Text)) then GnomeIconButton.Filename := UTF8ToANSI(IconEntry.Text)
- else GnomeIconButton.Filename := '';
+ if FileExists(IconEntry.Text) then GnomeIconButton.Filename := IconEntry.Text
+ else GnomeIconButton.Filename := '';
end;
end;
@@ -814,8 +814,8 @@ begin
Dialog := TGTKFileSelectionDialog.CreateWithTitle(Self, LANGBrowseForIcon);
try
Dialog.ShowFileOpButtons := False;
- if FileExists(UTF8ToANSI(IconEntry.Text)) then Dialog.FileName := IconEntry.Text
- else Dialog.FileName := IconPath;
+ if FileExists(IconEntry.Text) then Dialog.FileName := IconEntry.Text
+ else Dialog.FileName := IconPath;
if Byte(Dialog.Run) = 251 then IconEntry.Text := Dialog.FileName;
IconPath := IncludeTrailingPathDelimiter(ExtractFilePath(Dialog.FileName));
finally