summaryrefslogtreecommitdiff
path: root/docview
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-05-23 23:20:17 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-05-23 23:20:17 +0200
commitf7475e311deb88ce5bd00778812dc831b2b41302 (patch)
tree6f59612dcca895d1e209732111eb331ca8fb31cd /docview
parent6e214f72923e2f10d0f8af78af1e278305e3e814 (diff)
downloadfpGUI-f7475e311deb88ce5bd00778812dc831b2b41302.tar.xz
DocView: New 'Open Special' menu option to open environment variables.
Environment variables can point to directories containing files or directly pointing to files.
Diffstat (limited to 'docview')
-rw-r--r--docview/src/frm_main.pas13
1 files changed, 13 insertions, 0 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index 0b35732e..c00b9a94 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -99,6 +99,7 @@ type
procedure MainFormDestroy(Sender: TObject);
procedure miFileQuitClicked(Sender: TObject);
procedure miFileOpenClicked(Sender: TObject);
+ procedure miFileOpenSpecialClicked(Sender: TObject);
procedure miFileCloseClicked(Sender: TObject);
procedure miConfigureClicked(Sender: TObject);
procedure miHelpProdInfoClicked(Sender: TObject);
@@ -360,6 +361,17 @@ begin
FileOpen;
end;
+procedure TMainForm.miFileOpenSpecialClicked(Sender: TObject);
+var
+ s: TfpgString;
+begin
+ if fpgInputQuery('Open Special...', 'Enter environment variable to open', s) then
+ begin
+ if s <> '' then
+ OpenFile(s, '', True);
+ end;
+end;
+
procedure TMainForm.miFileCloseClicked(Sender: TObject);
begin
CloseFile;
@@ -2197,6 +2209,7 @@ begin
Name := 'miFile';
SetPosition(292, 96, 132, 20);
AddMenuItem('Open...', '', @miFileOpenClicked);
+ AddMenuItem('Open Special...', '', @miFileOpenSpecialClicked);
AddMenuItem('Save current Topic to IPF...', '', @miFileSaveTopicAsIPF);
AddMenuItem('Close', '', @miFileCloseClicked);
AddMenuitem('-', '', nil);