summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-13 17:11:04 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-13 17:11:04 +0200
commitae9cfcea8937917c59a58f2ecd4f4235ad70a8f0 (patch)
tree5d87e641492730a2925ec6bd17dd5d92168e2eea
parentd6402c7761d7ce5e24a425162331e5ed89410b41 (diff)
downloadfpGUI-ae9cfcea8937917c59a58f2ecd4f4235ad70a8f0.tar.xz
Message Dialog buttons now use translated text.
Initializing the cMsgDlgBtnText when it was declared is too early and the translated strings have not yet been loaded. We we update the array a bit later to make sure it is correct.
-rw-r--r--src/corelib/fpg_main.pas14
-rw-r--r--src/corelib/fpg_widget.pas2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 871efe74..64c224d4 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -1158,6 +1158,20 @@ begin
SetLength(FalseBoolStrs,1);
TrueBoolStrs[0] := rsTrue;
FalseBoolStrs[0] := rsFalse;
+
+ // Dialog box button captions
+ cMsgDlgBtnText[mbOK] := rsOK;
+ cMsgDlgBtnText[mbCancel] := rsCancel;
+ cMsgDlgBtnText[mbYes] := rsYes;
+ cMsgDlgBtnText[mbNo] := rsNo;
+ cMsgDlgBtnText[mbAbort] := rsAbort;
+ cMsgDlgBtnText[mbRetry] := rsRetry;
+ cMsgDlgBtnText[mbIgnore] := rsIgnore;
+ cMsgDlgBtnText[mbAll] := rsAll;
+ cMsgDlgBtnText[mbNoToAll] := rsNoToAll;
+ cMsgDlgBtnText[mbYesToAll] := rsYesToAll;
+ cMsgDlgBtnText[mbHelp] := rsHelp;
+ cMsgDlgBtnText[mbClose] := rsClose;
end;
procedure TfpgApplication.SetHintPause(const AValue: Integer);
diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas
index f0daec81..4a146ada 100644
--- a/src/corelib/fpg_widget.pas
+++ b/src/corelib/fpg_widget.pas
@@ -429,7 +429,7 @@ begin
writeln('TfpgWidget.Destroy [', Classname, '.', Name, ']');
{$ENDIF}
HandleHide;
- inherited;
+ inherited Destroy;
end;
procedure TfpgWidget.AfterConstruction;