summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fpg_dialogs.pas40
-rw-r--r--src/gui/inputintegerdialog.inc4
2 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/fpg_dialogs.pas b/src/gui/fpg_dialogs.pas
index d1271bf9..781c0745 100644
--- a/src/gui/fpg_dialogs.pas
+++ b/src/gui/fpg_dialogs.pas
@@ -58,10 +58,10 @@ uses
type
TfpgMsgDlgType = (mtAbout, mtWarning, mtError, mtInformation, mtConfirmation,
mtCustom);
-
+
TfpgMsgDlgBtn = (mbNoButton, mbOK, mbCancel, mbYes, mbNo, mbAbort,
mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose);
-
+
TfpgMsgDlgButtons = set of TfpgMsgDlgBtn;
const
@@ -104,7 +104,7 @@ type
property CentreText: Boolean read FCentreText write FCentreText default False;
property FontDesc: string read GetFontDesc write SetFontDesc;
end;
-
+
TfpgBaseDialog = class(TfpgForm)
protected
@@ -152,8 +152,8 @@ type
constructor Create(AOwner: TComponent); override;
procedure SetSampleText(AText: string);
end;
-
-
+
+
TfpgFileDialog = class(TfpgBaseDialog)
private
chlDir: TfpgComboBox;
@@ -241,7 +241,7 @@ function SelectDirDialog(const AStartDir: TfpgString = ''): TfpgString;
function fpgShowCharMap: TfpgString;
function fpgSelectColorDialog(APresetColor: TfpgColor = clBlack): TfpgColor;
function fpgInputQuery(const ACaption, APrompt: TfpgString; var Value: TfpgString): Boolean;
-function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; MaxValue: Integer; MinValue: Integer): Boolean;
+function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; const MaxValue: Integer; const MinValue: Integer = 0): Boolean;
implementation
@@ -255,8 +255,8 @@ uses
{$ENDIF}
,DateUtils
;
-
-
+
+
procedure WrapText(const AText: String; ALines: TStrings; AFont: TfpgFont;
const ALineWidth: Integer; out AWidth: Integer);
var
@@ -398,7 +398,7 @@ begin
dres := dlg.RunOpenFile
else
dres := dlg.RunSaveFile;
-
+
if dres then
Result := dlg.FileName
else
@@ -534,7 +534,7 @@ var
outw: integer;
begin
WrapText(AMessage, FLines, FFont, FMaxLineWidth, outw);
-
+
// dialog width with 10 pixel border on both sides
Width := outw + 2*10;
@@ -746,7 +746,7 @@ var
NextC;
end;
end;
-
+
procedure ProcessAliasFont;
var
i: integer;
@@ -787,7 +787,7 @@ begin
NextToken;
lbFaces.FocusItem := lbFaces.Items.IndexOf(token);
-
+
if c = '-' then
begin
NextC;
@@ -848,7 +848,7 @@ begin
MinHeight := Height;
FSampleText := 'The quick brown fox jumps over the lazy dog. 0123456789 [oO0,ilLI]';
FMode := 1; // normal fonts
-
+
btnCancel.Left := Width - FDefaultButtonWidth - FSpacing;
btnOK.Left := btnCancel.Left - FDefaultButtonWidth - FSpacing;
@@ -1002,7 +1002,7 @@ begin
Exit; //==>
if AText = '' then
Exit; //==>
-
+
FSampleText := AText;
memSample.Text := FSampleText;
end;
@@ -1173,7 +1173,7 @@ begin
end;
{ Create lower Panel details }
-
+
pnlFileInfo := TfpgPanel.Create(self);
with pnlFileInfo do
begin
@@ -1196,7 +1196,7 @@ begin
OnChange := @edFilenameChanged;
OnKeyPress := @edFilenameKeyPressed;
end;
-
+
{ Filter section }
chlFilter := TfpgComboBox.Create(self);
@@ -1400,7 +1400,7 @@ begin
ExcludeTrailingPathDelimiter(grid.FileList.DirectoryName))
else
fsel := '';
-
+
grid.FileList.FileMask := GetFileFilter;
grid.FileList.ShowHidden := ShowHidden;
@@ -1409,7 +1409,7 @@ begin
ShowMessage(Format(rsErrCouldNotOpenDir, [ADir]), rsError);
Exit; //==>
end;
-
+
grid.FileList.Sort(soFileName);
// we don't want chlDir to call DirChange while populating items
@@ -1422,7 +1422,7 @@ begin
HighlightFile(fsel)
else
grid.FocusRow := 0;
-
+
grid.Update;
grid.SetFocus;
@@ -1585,7 +1585,7 @@ begin
if not HighlightFile(fname) then
edFilename.Text := fname;
-
+
WindowTitle := rsOpenAFile;
btnOK.ImageName := 'stdimg.open'; // Do NOT localize
btnOK.Text := rsOpen;
diff --git a/src/gui/inputintegerdialog.inc b/src/gui/inputintegerdialog.inc
index 0c540b9b..237fb549 100644
--- a/src/gui/inputintegerdialog.inc
+++ b/src/gui/inputintegerdialog.inc
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -42,7 +42,7 @@ type
{$IFDEF read_implementation}
-function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; MaxValue: Integer; MinValue: Integer= 0): Boolean;
+function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; const MaxValue: Integer; const MinValue: Integer): Boolean;
var
dlg: TfpgIntegerDialog;
begin