Skip to content

Commit

Permalink
Add an "Environment" label on the about dialog, showing Windows versi…
Browse files Browse the repository at this point in the history
…on, Windows Store package name, or Wine
  • Loading branch information
ansgarbecker committed Feb 3, 2018
1 parent 0736ed8 commit d58e30d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
3 changes: 3 additions & 0 deletions out/locale/en/LC_MESSAGES/default.po
Expand Up @@ -3755,6 +3755,9 @@ msgstr "None"
msgid "Compiled on:"
msgstr "Compiled on:"

msgid "Environment:"
msgstr "Environment:"

#: bineditor.pas:175 texteditor.pas:259
msgid "Apply modifications?"
msgstr "Apply modifications?"
Expand Down
14 changes: 11 additions & 3 deletions source/about.dfm
Expand Up @@ -49,7 +49,7 @@ object AboutBox: TAboutBox
end
object lblAppCompiled: TLabel
Left = 117
Top = 60
Top = 62
Width = 72
Height = 13
Caption = 'lblAppCompiled'
Expand All @@ -58,7 +58,7 @@ object AboutBox: TAboutBox
end
object lblAppWebpage: TLabel
Left = 117
Top = 78
Top = 100
Width = 75
Height = 13
Cursor = crHandPoint
Expand Down Expand Up @@ -1381,7 +1381,7 @@ object AboutBox: TAboutBox
end
object lblCredits: TLabel
Left = 117
Top = 97
Top = 119
Width = 34
Height = 13
Cursor = crHandPoint
Expand All @@ -1398,6 +1398,14 @@ object AboutBox: TAboutBox
OnClick = lblCreditsClick
OnMouseMove = MouseOver
end
object lblEnvironment: TLabel
Left = 117
Top = 81
Width = 70
Height = 13
Caption = 'lblEnvironment'
PopupMenu = popupLabels
end
object btnClose: TButton
Left = 373
Top = 282
Expand Down
13 changes: 13 additions & 0 deletions source/about.pas
Expand Up @@ -26,6 +26,7 @@ TAboutBox = class(TForm)
lblCredits: TLabel;
popupLabels: TPopupMenu;
menuCopyLabel: TMenuItem;
lblEnvironment: TLabel;
procedure OpenURL(Sender: TObject);
procedure MouseOver(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure FormShow(Sender: TObject);
Expand Down Expand Up @@ -141,6 +142,18 @@ procedure TAboutBox.FormShow(Sender: TObject);
lblAppWebpage.Caption := APPDOMAIN;
lblAppWebpage.Hint := APPDOMAIN+'?place='+EncodeURLParam(lblAppWebpage.Name);
ImageHeidisql.Hint := APPDOMAIN+'?place='+EncodeURLParam(ImageHeidisql.Name);
lblEnvironment.Caption := _('Environment:');
if RunningAsUwp then begin
lblEnvironment.Caption := lblEnvironment.Caption +
' Windows v'+IntToStr(Win32MajorVersion)+'.'+IntToStr(Win32MinorVersion) +
', Store Package ' + GetUwpFullName;
end else if MainForm.IsWine then begin
lblEnvironment.Caption := lblEnvironment.Caption +
' Linux/Wine';
end else begin
lblEnvironment.Caption := lblEnvironment.Caption +
' Windows v'+IntToStr(Win32MajorVersion)+'.'+IntToStr(Win32MinorVersion);
end;

Screen.Cursor := crDefault;
end;
Expand Down

0 comments on commit d58e30d

Please sign in to comment.