diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-23 09:35:21 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-23 09:35:21 +0200 |
commit | fd7913901deefb8204c386e01ab6b18b2cac6874 (patch) | |
tree | b1ba9652672362b83c1da9fbd9b72bc780754a3b | |
parent | 540e3d91366a97c817775f2b99ccb41b9f00497d (diff) | |
download | fpGUI-fd7913901deefb8204c386e01ab6b18b2cac6874.tar.xz |
Use fpGUI wrapper functions instead of RTL functions directly.
fpGUI's wrapper functions handle unicode conversions from OS automatically.
-rw-r--r-- | docview/src/HelpFile.pas | 3 | ||||
-rw-r--r-- | docview/src/frm_main.pas | 2 | ||||
-rw-r--r-- | src/corelib/fpg_base.pas | 2 | ||||
-rw-r--r-- | src/gui/fpg_dialogs.pas | 6 |
4 files changed, 7 insertions, 6 deletions
diff --git a/docview/src/HelpFile.pas b/docview/src/HelpFile.pas index a3801aa5..4cd36edc 100644 --- a/docview/src/HelpFile.pas +++ b/docview/src/HelpFile.pas @@ -186,6 +186,7 @@ uses // ACLFileIOUtility, // ACLLanguageUnit; fpg_main + ,fpg_utils ,nvUtilities ,ACLStringUtility ; @@ -1219,7 +1220,7 @@ var fstream: TFileStream; Ext: string; begin - Ext := ExtractFileExt( Filename ); + Ext := fpgExtractFileExt( Filename ); Result := ''; if SameText( Ext, '.inf' ) diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index 4defc759..8a3aa84a 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -1034,7 +1034,7 @@ begin if dlg.RunOpenFile then begin - Settings.LastOpenDirectory := ExtractFilePath(dlg.Filename); + Settings.LastOpenDirectory := fpgExtractFilePath(dlg.Filename); OpenFile(dlg.Filename, '', true); end; { TODO -oGraeme : Add support for multiple files. } diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index 199004ba..b9bc394b 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -2415,7 +2415,7 @@ var begin e := TFileEntry.Create; e.Name := sr.Name; - e.Extension := ExtractFileExt(e.Name); + e.Extension := fpgExtractFileExt(e.Name); e.Size := sr.Size; // e.Attributes := sr.Attr; // this is incorrect and needs to improve! e.ModTime := FileDateToDateTime(sr.Time); diff --git a/src/gui/fpg_dialogs.pas b/src/gui/fpg_dialogs.pas index 73c668c3..25f01da9 100644 --- a/src/gui/fpg_dialogs.pas +++ b/src/gui/fpg_dialogs.pas @@ -1369,7 +1369,7 @@ begin if (i >= 0) and (i < FFilterList.Count) then Result := FFilterList[i] else - Result := '*'; + Result := AllFilesMask; end; function TfpgFileDialog.RunOpenFile: boolean; @@ -1378,12 +1378,12 @@ var fname: string; begin FOpenMode := True; - sdir := ExtractFileDir(FileName); + sdir := fpgExtractFileDir(FileName); if sdir = '' then sdir := '.'; SetCurrentDirectory(sdir); - fname := ExtractFileName(FileName); + fname := fpgExtractFileName(FileName); if not HighlightFile(fname) then edFilename.Text := fname; |