summaryrefslogtreecommitdiff
path: root/src/gui/fpg_dialogs.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/fpg_dialogs.pas')
-rw-r--r--src/gui/fpg_dialogs.pas22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/fpg_dialogs.pas b/src/gui/fpg_dialogs.pas
index 781c0745..42f4752c 100644
--- a/src/gui/fpg_dialogs.pas
+++ b/src/gui/fpg_dialogs.pas
@@ -579,6 +579,8 @@ end;
constructor TfpgBaseDialog.Create(AOwner: TComponent);
begin
+ // WindowType must be set before inherited or our parent property will be set
+ WindowType:=wtModalForm;
inherited Create(AOwner);
Width := 500;
Height := 400;
@@ -737,13 +739,31 @@ var
result := c;
end;
+ function LookAhead: char;
+ var
+ i: integer;
+ lc: char;
+ begin
+ i := cp+1;
+ if i > length(desc) then
+ lc := #0
+ else
+ lc := desc[i];
+ result := lc;
+ end;
+
procedure NextToken;
begin
token := '';
- while (c <> #0) and (c in [' ','a'..'z','A'..'Z','_','0'..'9']) do
+ while (c <> #0) and (c in [' ', 'a'..'z', 'A'..'Z', '_', '@', '0'..'9']) do
begin
token := token + c;
NextC;
+ if (c = '-') and (LookAhead in [' ', 'a'..'z', 'A'..'Z', '_']) then
+ begin
+ token := token + c;
+ NextC;
+ end;
end;
end;