Add an "Environment" label on the about dialog, showing Windows version, Windows Store package name, or Wine

This commit is contained in:
Ansgar Becker
2018-02-03 16:00:38 +01:00
parent 0736ed8ffc
commit d58e30d0eb
3 changed files with 27 additions and 3 deletions

View File

@ -3755,6 +3755,9 @@ msgstr "None"
msgid "Compiled on:" msgid "Compiled on:"
msgstr "Compiled on:" msgstr "Compiled on:"
msgid "Environment:"
msgstr "Environment:"
#: bineditor.pas:175 texteditor.pas:259 #: bineditor.pas:175 texteditor.pas:259
msgid "Apply modifications?" msgid "Apply modifications?"
msgstr "Apply modifications?" msgstr "Apply modifications?"

View File

@ -49,7 +49,7 @@ object AboutBox: TAboutBox
end end
object lblAppCompiled: TLabel object lblAppCompiled: TLabel
Left = 117 Left = 117
Top = 60 Top = 62
Width = 72 Width = 72
Height = 13 Height = 13
Caption = 'lblAppCompiled' Caption = 'lblAppCompiled'
@ -58,7 +58,7 @@ object AboutBox: TAboutBox
end end
object lblAppWebpage: TLabel object lblAppWebpage: TLabel
Left = 117 Left = 117
Top = 78 Top = 100
Width = 75 Width = 75
Height = 13 Height = 13
Cursor = crHandPoint Cursor = crHandPoint
@ -1381,7 +1381,7 @@ object AboutBox: TAboutBox
end end
object lblCredits: TLabel object lblCredits: TLabel
Left = 117 Left = 117
Top = 97 Top = 119
Width = 34 Width = 34
Height = 13 Height = 13
Cursor = crHandPoint Cursor = crHandPoint
@ -1398,6 +1398,14 @@ object AboutBox: TAboutBox
OnClick = lblCreditsClick OnClick = lblCreditsClick
OnMouseMove = MouseOver OnMouseMove = MouseOver
end end
object lblEnvironment: TLabel
Left = 117
Top = 81
Width = 70
Height = 13
Caption = 'lblEnvironment'
PopupMenu = popupLabels
end
object btnClose: TButton object btnClose: TButton
Left = 373 Left = 373
Top = 282 Top = 282

View File

@ -26,6 +26,7 @@ type
lblCredits: TLabel; lblCredits: TLabel;
popupLabels: TPopupMenu; popupLabels: TPopupMenu;
menuCopyLabel: TMenuItem; menuCopyLabel: TMenuItem;
lblEnvironment: TLabel;
procedure OpenURL(Sender: TObject); procedure OpenURL(Sender: TObject);
procedure MouseOver(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure MouseOver(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
@ -141,6 +142,18 @@ begin
lblAppWebpage.Caption := APPDOMAIN; lblAppWebpage.Caption := APPDOMAIN;
lblAppWebpage.Hint := APPDOMAIN+'?place='+EncodeURLParam(lblAppWebpage.Name); lblAppWebpage.Hint := APPDOMAIN+'?place='+EncodeURLParam(lblAppWebpage.Name);
ImageHeidisql.Hint := APPDOMAIN+'?place='+EncodeURLParam(ImageHeidisql.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; Screen.Cursor := crDefault;
end; end;