Ask the user at application startup if statistic calls shall be activated. Otherwise that would be used by no one until a final release shows a checkbox for this feature in the installer.

This commit is contained in:
Ansgar Becker
2009-06-20 22:41:10 +00:00
parent ddbee4c536
commit 2d290595b5

View File

@ -1411,7 +1411,7 @@ var
DefaultLastrunDate, LastSession, StatsURL: String; DefaultLastrunDate, LastSession, StatsURL: String;
frm : TfrmUpdateCheck; frm : TfrmUpdateCheck;
dlgResult: Integer; dlgResult: Integer;
Connected, CommandLineMode: Boolean; Connected, CommandLineMode, DecideForStatistic: Boolean;
ConnForm: TConnForm; ConnForm: TConnForm;
StatsCall: TDownloadUrl2; StatsCall: TDownloadUrl2;
SessionNames: TStringlist; SessionNames: TStringlist;
@ -1473,6 +1473,16 @@ begin
end; end;
end; end;
// Ask if we shall activate statistic calls. Would be used by noone otherwise.
OpenRegistry;
if not Mainreg.ValueExists(REGNAME_DO_STATISTICS) then begin
DecideForStatistic := MessageDlg(APPNAME + ' has a new statistics feature: If activated, server and client versions '+
'are reported once per month and displayed on heidisql.com.'+CRLF+CRLF+'Activate this feature?',
mtConfirmation, [mbYes, mbNo], 0) = mrYes;
Mainreg.WriteBool(REGNAME_DO_STATISTICS, DecideForStatistic);
end;
Connected := False; Connected := False;
// Check commandline if parameters were passed. Otherwise show connections windows // Check commandline if parameters were passed. Otherwise show connections windows