summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-09-04 17:15:21 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-09-04 17:15:21 +0200
commitd2a915623045a7e61dee64af59f2548b74305502 (patch)
treec55d4e56409346d4392e9b30ff140f7e0cc92a34 /src
parent81eaad1981cf3949aeaa551ec6e5df60b1dce68a (diff)
downloadfpGUI-d2a915623045a7e61dee64af59f2548b74305502.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_utils.pas6
-rw-r--r--src/corelib/gdi/fpg_utils_impl.inc2
-rw-r--r--src/corelib/x11/fpg_utils_impl.inc2
3 files changed, 8 insertions, 2 deletions
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