Skip to content
Permalink
Browse files

Tweak update check dialog, closes #784

* make dialog resizable
* restore previous dialog size
* use fixed pitch font in build notes
  • Loading branch information
ansgarbecker committed Jan 30, 2020
1 parent 80542d1 commit 19391e0d3fd13487de6c68518e85a484652b1572
Showing with 45 additions and 25 deletions.
  1. +5 −2 source/apphelpers.pas
  2. +30 −23 source/updatecheck.dfm
  3. +10 −0 source/updatecheck.pas
@@ -165,8 +165,9 @@ TQueryThread = class(TThread)

asCSVImportSeparator, asCSVImportEncloser, asCSVImportTerminator, asCSVImportFieldEscaper, asCSVImportWindowWidth, asCSVImportWindowHeight,
asCSVImportFilename, asCSVImportFieldsEnclosedOptionally, asCSVImportIgnoreLines, asCSVImportLowPriority, asCSVImportLocalNumbers,
asCSVImportDuplicateHandling, asCSVImportParseMethod, asUpdatecheck, asUpdatecheckBuilds,
asUpdatecheckInterval, asUpdatecheckLastrun, asTableToolsWindowWidth, asTableToolsWindowHeight, asTableToolsTreeWidth,
asCSVImportDuplicateHandling, asCSVImportParseMethod,
asUpdatecheck, asUpdatecheckBuilds, asUpdatecheckInterval, asUpdatecheckLastrun, asUpdateCheckWindowWidth, asUpdateCheckWindowHeight,
asTableToolsWindowWidth, asTableToolsWindowHeight, asTableToolsTreeWidth,
asTableToolsFindText, asTableToolsDatatype, asTableToolsFindCaseSensitive, asTableToolsFindMatchType, asFileImportWindowWidth, asFileImportWindowHeight,
asEditVarWindowWidth, asEditVarWindowHeight, asUsermanagerWindowWidth, asUsermanagerWindowHeight, asUsermanagerListWidth,
asSelectDBOWindowWidth, asSelectDBOWindowHeight,
@@ -3588,6 +3589,8 @@ constructor TAppSettings.Create;
InitSetting(asUpdatecheckBuilds, 'UpdatecheckBuilds', 0, False);
InitSetting(asUpdatecheckInterval, 'UpdatecheckInterval', 3);
InitSetting(asUpdatecheckLastrun, 'UpdatecheckLastrun', 0, False, '2000-01-01');
InitSetting(asUpdateCheckWindowWidth, 'UpdateCheckWindowWidth', 400);
InitSetting(asUpdateCheckWindowHeight, 'UpdateCheckWindowHeight', 460);
InitSetting(asTableToolsWindowWidth, 'TableTools_WindowWidth', 800);
InitSetting(asTableToolsWindowHeight, 'TableTools_WindowHeight', 420);
InitSetting(asTableToolsTreeWidth, 'TableTools_TreeWidth', 300);
@@ -1,10 +1,9 @@
object frmUpdateCheck: TfrmUpdateCheck
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Check for updates ...'
ClientHeight = 425
ClientWidth = 384
ClientHeight = 415
ClientWidth = 374
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -14,16 +13,17 @@ object frmUpdateCheck: TfrmUpdateCheck
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
DesignSize = (
384
425)
374
415)
PixelsPerInch = 96
TextHeight = 13
object lblStatus: TLabel
Left = 8
Top = 385
Width = 256
Top = 375
Width = 246
Height = 38
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
@@ -1104,8 +1104,8 @@ object frmUpdateCheck: TfrmUpdateCheck
0000000006120B345A43D7E6DDFFFFFF00FF}
end
object btnCancel: TButton
Left = 270
Top = 392
Left = 260
Top = 382
Width = 106
Height = 25
Anchors = [akRight, akBottom]
@@ -1118,18 +1118,18 @@ object frmUpdateCheck: TfrmUpdateCheck
object groupBuild: TGroupBox
Left = 8
Top = 192
Width = 368
Height = 193
Width = 358
Height = 183
Anchors = [akLeft, akTop, akRight, akBottom]
Caption = 'Nightly build'
TabOrder = 1
DesignSize = (
368
193)
358
183)
object btnBuild: TButton
Left = 6
Top = 161
Width = 355
Top = 151
Width = 345
Height = 25
Anchors = [akLeft, akRight, akBottom]
Caption = 'Download nightly build'
@@ -1141,22 +1141,29 @@ object frmUpdateCheck: TfrmUpdateCheck
object memoBuild: TMemo
Left = 6
Top = 16
Width = 355
Height = 113
Width = 345
Height = 103
Anchors = [akLeft, akTop, akRight, akBottom]
BorderStyle = bsNone
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Courier New'
Font.Style = []
Lines.Strings = (
'memoBuild')
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 1
end
object btnChangelog: TButton
Left = 6
Top = 130
Width = 355
Top = 120
Width = 345
Height = 25
Anchors = [akLeft, akRight, akBottom]
Caption = 'View changelog'
TabOrder = 2
OnClick = btnChangelogClick
@@ -1165,19 +1172,19 @@ object frmUpdateCheck: TfrmUpdateCheck
object groupRelease: TGroupBox
Left = 8
Top = 76
Width = 368
Width = 358
Height = 110
Anchors = [akLeft, akTop, akRight]
Caption = 'Official release'
Enabled = False
TabOrder = 2
DesignSize = (
368
358
110)
object btnRelease: TButton
Left = 6
Top = 78
Width = 355
Width = 345
Height = 25
Anchors = [akLeft, akRight, akBottom]
Caption = 'Download new release'
@@ -1188,7 +1195,7 @@ object frmUpdateCheck: TfrmUpdateCheck
object memoRelease: TMemo
Left = 6
Top = 16
Width = 355
Width = 345
Height = 60
Anchors = [akLeft, akTop, akRight, akBottom]
BorderStyle = bsNone
@@ -23,6 +23,7 @@ TfrmUpdateCheck = class(TExtForm)
procedure btnReleaseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnChangelogClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
ReleaseURL, BuildURL : String;
@@ -53,6 +54,15 @@ procedure TfrmUpdateCheck.FormCreate(Sender: TObject);
// Should be false by default. Callers can set this to True after Create()
imgDonate.OnClick := MainForm.DonateClick;
imgDonate.Visible := MainForm.HasDonated(False) = nbFalse;
HasSizeGrip := True;
Width := AppSettings.ReadInt(asUpdateCheckWindowWidth);
Height := AppSettings.ReadInt(asUpdateCheckWindowHeight);
end;

procedure TfrmUpdateCheck.FormDestroy(Sender: TObject);
begin
AppSettings.WriteInt(asUpdateCheckWindowWidth, Width);
AppSettings.WriteInt(asUpdateCheckWindowHeight, Height);
end;

{**

0 comments on commit 19391e0

Please sign in to comment.
You can’t perform that action at this time.