From d2a915623045a7e61dee64af59f2548b74305502 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 4 Sep 2010 17:15:21 +0200 Subject: fpg_utils: Added a new function that returns a config directory for fpGUI framework itself. This will be used by the File Dialog and Font Select dialog. --- src/corelib/fpg_utils.pas | 6 ++++++ src/corelib/gdi/fpg_utils_impl.inc | 2 +- src/corelib/x11/fpg_utils_impl.inc | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 78848e40..8e866922 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -41,6 +41,7 @@ function fpgAppendPathDelim(const Path: TfpgString): TfpgString; function fpgHasSubDirs(const Dir: TfpgString; AShowHidden: Boolean): Boolean; function fpgAllFilesMask: TfpgString; function fpgConvertLineEndings(const s: TfpgString): TfpgString; +function fpgGetToolkitConfigDir: TfpgString; { This is so that when we support LTR and RTL languages, the colon will be added at the correct place. } function fpgAddColon(const AText: TfpgString): TfpgString; @@ -249,6 +250,11 @@ begin Inc(i); end; +function fpgGetToolkitConfigDir: TfpgString; +begin + Result := fpgTrimR(fpgGetAppConfigDir(False), ApplicationName, True) + FPG_CONFIG_DIR; +end; + function fpgAddColon(const AText: TfpgString): TfpgString; begin { TODO : Check language direction and add colon at appropriate end. This is very crude! } diff --git a/src/corelib/gdi/fpg_utils_impl.inc b/src/corelib/gdi/fpg_utils_impl.inc index e5125312..ab4761ae 100644 --- a/src/corelib/gdi/fpg_utils_impl.inc +++ b/src/corelib/gdi/fpg_utils_impl.inc @@ -1,7 +1,7 @@ {%mainunit fpg_utils.pas} uses - Shellapi, Windows; + Shellapi, Windows, fpg_constants, fpg_stringutils; // GDI specific implementations of encoding functions diff --git a/src/corelib/x11/fpg_utils_impl.inc b/src/corelib/x11/fpg_utils_impl.inc index 908f411a..753b0ea1 100644 --- a/src/corelib/x11/fpg_utils_impl.inc +++ b/src/corelib/x11/fpg_utils_impl.inc @@ -1,7 +1,7 @@ {%mainunit fpg_utils.pas} uses - Unix, BaseUnix; + Unix, BaseUnix, fpg_constants, fpg_stringutils; // X11 specific filesystem implementations of encoding functions -- cgit v1.2.3-70-g09d2