Permalink
Browse files

Issue #60: Disable relevant controls in preferences dialog for applic…

…ation update checks, if running as UWP
  • Loading branch information...
ansgarbecker committed Feb 6, 2018
1 parent f63fab4 commit 3c16564271e5985165b1e82c79cca0de03a9b234
Showing with 15 additions and 7 deletions.
  1. +15 −7 source/options.pas
@@ -271,9 +271,11 @@ procedure Toptionsform.Apply(Sender: TObject);
AppSettings.WriteString(asDataFontName, comboDataFontName.Text);
AppSettings.WriteInt(asDataFontSize, updownDataFontSize.Position);
AppSettings.WriteBool(asLogToFile, chkLogToFile.Checked);
AppSettings.WriteBool(asUpdatecheck, chkUpdatecheck.Checked);
AppSettings.WriteBool(asUpdatecheckBuilds, chkUpdatecheckBuilds.Checked);
AppSettings.WriteInt(asUpdatecheckInterval, updownUpdatecheckInterval.Position);
if not RunningAsUwp then begin
AppSettings.WriteBool(asUpdatecheck, chkUpdatecheck.Checked);
AppSettings.WriteBool(asUpdatecheckBuilds, chkUpdatecheckBuilds.Checked);
AppSettings.WriteInt(asUpdatecheckInterval, updownUpdatecheckInterval.Position);
end;
AppSettings.WriteBool(asDoUsageStatistics, chkDoStatistics.Checked);
AppSettings.WriteBool(asDisplayBars, chkColorBars.Checked);
AppSettings.WriteInt(asBarColor, cboxColorBars.Selected);
@@ -456,10 +458,16 @@ procedure Toptionsform.FormShow(Sender: TObject);
chkAutoReconnect.Checked := AppSettings.ReadBool(asAutoReconnect);;
chkAllowMultiInstances.Checked := AppSettings.ReadBool(asAllowMultipleInstances);
chkRestoreLastDB.Checked := AppSettings.ReadBool(asRestoreLastUsedDB);
chkUpdatecheck.Checked := AppSettings.ReadBool(asUpdatecheck);
chkUpdatecheckBuilds.Checked := AppSettings.ReadBool(asUpdatecheckBuilds);
updownUpdatecheckInterval.Position := AppSettings.ReadInt(asUpdatecheckInterval);
chkUpdatecheckClick(Sender);
if RunningAsUwp then begin
chkUpdatecheck.Enabled := False;
chkUpdatecheckBuilds.Enabled := False;
updownUpdatecheckInterval.Enabled := False;
end else begin
chkUpdatecheck.Checked := AppSettings.ReadBool(asUpdatecheck);
chkUpdatecheckBuilds.Checked := AppSettings.ReadBool(asUpdatecheckBuilds);
updownUpdatecheckInterval.Position := AppSettings.ReadInt(asUpdatecheckInterval);
chkUpdatecheckClick(Sender);
end;
chkDoStatistics.Checked := AppSettings.ReadBool(asDoUsageStatistics);
chkColorBars.Checked := AppSettings.ReadBool(asDisplayBars);
cboxColorBars.Selected := AppSettings.ReadInt(asBarColor);

0 comments on commit 3c16564

Please sign in to comment.