summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-01-30 13:36:39 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-01-30 13:36:39 +0000
commit4c590ac929e9df181a336701f870f4906297d8c4 (patch)
tree18b2784bd9c28e062a5aa2c3921a161cbdfde45c /src
parent5cafb41e20578ccbd15489c876e986f01b8f4fc6 (diff)
downloadfpGUI-4c590ac929e9df181a336701f870f4906297d8c4.tar.xz
* Removed a potential AV error in hintwindow handling.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_main.pas15
-rw-r--r--src/corelib/lang_afrikaans.inc2
-rw-r--r--src/corelib/lang_english.inc2
-rw-r--r--src/corelib/lang_french.inc2
-rw-r--r--src/corelib/lang_german.inc2
-rw-r--r--src/corelib/lang_italian.inc2
-rw-r--r--src/corelib/lang_portuguese.inc2
-rw-r--r--src/corelib/lang_russian.inc2
-rw-r--r--src/corelib/lang_spanish.inc2
9 files changed, 19 insertions, 12 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 98dc2033..883c56c7 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -231,6 +231,7 @@ type
procedure InternalMsgHintTimer(var msg: TfpgMessageRec); message FPGM_HINTTIMER;
procedure CreateHintWindow;
procedure HintTimerFired(Sender: TObject);
+ procedure SetShowHint(const AValue: boolean);
protected
FDisplayParams: string;
FScreenWidth: integer;
@@ -261,7 +262,7 @@ type
property HintWindow: TfpgWindow read FHintWindow;
property ScreenWidth: integer read FScreenWidth;
property ScreenHeight: integer read FScreenHeight;
- property ShowHint: boolean read FShowHint write FShowHint default True;
+ property ShowHint: boolean read FShowHint write SetShowHint default True;
property StopOnException: Boolean read FStopOnException write FStopOnException;
property OnException: TExceptionEvent read FOnException write FOnException;
end;
@@ -382,10 +383,8 @@ uses
math,
fpg_imgfmt_bmp,
fpg_stdimages,
- fpg_extinterpolation, // only so that it get auto compiled
fpg_translations,
fpg_constants,
- fpg_stringutils,
fpg_widget,
fpg_dialogs,
fpg_hint,
@@ -1073,12 +1072,20 @@ procedure TfpgApplication.HintTimerFired(Sender: TObject);
var
w: TfpgWidget;
begin
+ w := nil;
// writeln('HintTimerFired...');
w := TfpgWidget(FHintWidget);
- ActivateHint(w.WindowToScreen(w, FHintPos), w.Hint);
+ if Assigned(w) then
+ ActivateHint(w.WindowToScreen(w, FHintPos), w.Hint);
FHintTimer.Enabled := False;
end;
+procedure TfpgApplication.SetShowHint(const AValue: boolean);
+begin
+//writeln('>> SetShowHint to :', AValue);
+ FShowHint := AValue;
+end;
+
procedure TfpgApplication.FreeFontRes(afontres: TfpgFontResource);
var
n: integer;
diff --git a/src/corelib/lang_afrikaans.inc b/src/corelib/lang_afrikaans.inc
index 85d34706..31143574 100644
--- a/src/corelib/lang_afrikaans.inc
+++ b/src/corelib/lang_afrikaans.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Afrikaans';
diff --git a/src/corelib/lang_english.inc b/src/corelib/lang_english.inc
index 43b88227..987ad778 100644
--- a/src/corelib/lang_english.inc
+++ b/src/corelib/lang_english.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'English';
diff --git a/src/corelib/lang_french.inc b/src/corelib/lang_french.inc
index bd733e51..fba66585 100644
--- a/src/corelib/lang_french.inc
+++ b/src/corelib/lang_french.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Français';
diff --git a/src/corelib/lang_german.inc b/src/corelib/lang_german.inc
index 5e787174..311aed28 100644
--- a/src/corelib/lang_german.inc
+++ b/src/corelib/lang_german.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Deutsch';
diff --git a/src/corelib/lang_italian.inc b/src/corelib/lang_italian.inc
index 7b1c74c4..f6bee689 100644
--- a/src/corelib/lang_italian.inc
+++ b/src/corelib/lang_italian.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Italiano';
diff --git a/src/corelib/lang_portuguese.inc b/src/corelib/lang_portuguese.inc
index 60486c2f..4af94670 100644
--- a/src/corelib/lang_portuguese.inc
+++ b/src/corelib/lang_portuguese.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Português';
diff --git a/src/corelib/lang_russian.inc b/src/corelib/lang_russian.inc
index f5bbba55..eff8b93d 100644
--- a/src/corelib/lang_russian.inc
+++ b/src/corelib/lang_russian.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Русский';
diff --git a/src/corelib/lang_spanish.inc b/src/corelib/lang_spanish.inc
index e6177e71..4b1d9355 100644
--- a/src/corelib/lang_spanish.inc
+++ b/src/corelib/lang_spanish.inc
@@ -1,4 +1,4 @@
-{%mainunit gfx_constants.pas}
+{%mainunit fpg_constants.pas}
rsLanguage = 'Español';