summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-15 17:03:19 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-15 17:03:19 +0200
commitd2bbe6084afb49e0b9ff840434871fe891df0e8a (patch)
tree683b17537fe3882d14a5d5f87c8af32ab3c3ca21
parentf9a6a96333c06f7314d01aab9b8dc447f4c491a3 (diff)
downloadfpGUI-d2bbe6084afb49e0b9ff840434871fe891df0e8a.tar.xz
New units added for resource strings and other constants.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
-rw-r--r--src/dvHelpers.pas46
-rw-r--r--src/dvconstants.pas28
2 files changed, 74 insertions, 0 deletions
diff --git a/src/dvHelpers.pas b/src/dvHelpers.pas
new file mode 100644
index 00000000..02a35b22
--- /dev/null
+++ b/src/dvHelpers.pas
@@ -0,0 +1,46 @@
+unit dvHelpers;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils;
+
+const
+ OWN_HELP_MARKER = '[DOCVIEWHELP]';
+
+
+function GetOwnHelpFileName: String;
+function FindHelpFile(const AFilename: string): string;
+
+
+implementation
+
+
+function GetOwnHelpFileName: String;
+//var
+// tmpLanguage : String;
+begin
+ //tmpLanguage := getLanguage;
+ //if tmpLanguage = '' then
+ //begin
+ // tmpLanguage := GetEnv(LanguageEnvironmentVar)
+ //end;
+ //
+ //result := FindDefaultLanguageHelpFile('NewView', tmpLanguage);
+
+ { TODO -oGraeme -cown help : Improve own help file location }
+ result := ExtractFilePath(ParamStr(0)) + 'docview.inf';
+end;
+
+// Given a "filename" which may include a path, find it in various paths and extensions
+function FindHelpFile(const AFilename: string): string;
+begin
+ { TODO -ograemeg -csearch files : Implement searching know locations }
+ Result := AFileName;
+end;
+
+
+end.
+
diff --git a/src/dvconstants.pas b/src/dvconstants.pas
new file mode 100644
index 00000000..b9649826
--- /dev/null
+++ b/src/dvconstants.pas
@@ -0,0 +1,28 @@
+unit dvconstants;
+
+{$mode objfpc}{$H+}
+
+interface
+
+
+resourcestring
+ rsDVTitle = 'Documentation Viewer';
+ rsDVSearchingMsg = 'Searching...';
+ rsDVDisplaying = 'Displaying...';
+ rsDVLoadingNotes = 'Loading notes...';
+ rsDVDisplayContents = 'Display contents...';
+ rsDVDisplayingFirstTopic = 'Display first topic...';
+ rsDVDone = 'Done';
+ rsDVNoFile = 'No file';
+ rsDVOpenHelpFile = 'Open Help File';
+ rsDVHelpFiles = 'Help Files';
+ rsDVNoMatchesFound = '(No matches found for ''%s'')';
+ rsDVSearchSyntaxError = 'Error in search syntax: ';
+ rsDVSearchFoundMsg = 'Found %d matches for ';
+ rsDVCouldNotOpen = 'Could not open <%s>';
+
+
+implementation
+
+end.
+