diff --git a/source/main.pas b/source/main.pas index b8cc930b..607d841f 100644 --- a/source/main.pas +++ b/source/main.pas @@ -1016,6 +1016,8 @@ type FGridPasting: Boolean; FHasDonatedDatabaseCheck: TThreeStateBoolean; FFocusedTables: TDBObjectList; + FCaptions: TStringList; + FLastCaptionChange: Cardinal; // Host subtabs backend structures FHostListResults: TDBQueryList; @@ -1650,6 +1652,12 @@ begin end; FHasDonatedDatabaseCheck := nbUnset; btnDonate.Visible := HasDonated(True) <> nbTrue; + FCaptions := Explode(',', + f_('Become a donor of the %s project', [AppName])+','+ + _('Donate')+','+ + _('Send a donation')+','+ + f_('Donate to the %s project', [AppName]) + ); actQueryStopOnErrors.Checked := AppSettings.ReadBool(asStopOnErrorsInBatchMode); actBlobAsText.Checked := AppSettings.ReadBool(asDisplayBLOBsAsText); @@ -11576,6 +11584,18 @@ begin end; +procedure TMainForm.ApplicationEvents1Idle(Sender: TObject; var Done: Boolean); +var + i: Integer; +begin + if FLastCaptionChange < GetTickCount-10000 then begin + Randomize; + i := RandomRange(0, FCaptions.Count); + btnDonate.Caption := FCaptions[i]; + FLastCaptionChange := GetTickCount; + end; +end; + procedure TMainForm.ApplicationDeActivate(Sender: TObject); begin // Prevent completion window from showing up after Alt-Tab. See issue #2640