mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:39:19 +02:00
ide: add unicode as the first item for the project version info
git-svn-id: trunk@25795 -
This commit is contained in:
parent
08af96e2f0
commit
da350323d4
@ -48,6 +48,30 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
function LanguageCompare(List: TStringList; Index1, Index2: Integer): Integer;
|
||||||
|
var
|
||||||
|
S1, S2: String;
|
||||||
|
begin
|
||||||
|
S1 := List[Index1];
|
||||||
|
S2 := List[Index2];
|
||||||
|
Result := CompareStr(S1, S2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function CharsetCompare(List: TStringList; Index1, Index2: Integer): Integer;
|
||||||
|
var
|
||||||
|
S1, S2: String;
|
||||||
|
begin
|
||||||
|
S1 := List[Index1];
|
||||||
|
S2 := List[Index2];
|
||||||
|
if S1 = 'Unicode' then
|
||||||
|
Result := -1
|
||||||
|
else
|
||||||
|
if S2 = 'Unicode' then
|
||||||
|
Result := 1
|
||||||
|
else
|
||||||
|
Result := CompareStr(S1, S2);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TProjectVersionInfoOptionsFrame }
|
{ TProjectVersionInfoOptionsFrame }
|
||||||
|
|
||||||
procedure TProjectVersionInfoOptionsFrame.UseVersionInfoCheckBoxChange(Sender: TObject);
|
procedure TProjectVersionInfoOptionsFrame.UseVersionInfoCheckBoxChange(Sender: TObject);
|
||||||
@ -68,6 +92,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectVersionInfoOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
procedure TProjectVersionInfoOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||||
|
var
|
||||||
|
Items: TStringList;
|
||||||
begin
|
begin
|
||||||
UseVersionInfoCheckBox.Caption := rsIncludeVersionInfoInExecutable;
|
UseVersionInfoCheckBox.Caption := rsIncludeVersionInfoInExecutable;
|
||||||
VersionInfoGroupBox.Caption := rsVersionNumbering;
|
VersionInfoGroupBox.Caption := rsVersionNumbering;
|
||||||
@ -82,6 +108,19 @@ begin
|
|||||||
OtherInfoGroupBox.Caption := rsOtherInfo;
|
OtherInfoGroupBox.Caption := rsOtherInfo;
|
||||||
StringInfo.Cells[0, 0] := rsKey;
|
StringInfo.Cells[0, 0] := rsKey;
|
||||||
StringInfo.Cells[0, 1] := rsValue;
|
StringInfo.Cells[0, 1] := rsValue;
|
||||||
|
// fill comboboxes
|
||||||
|
Items := TStringList.Create;
|
||||||
|
try
|
||||||
|
Items.Assign(MSLanguages);
|
||||||
|
Items.CustomSort(@LanguageCompare);
|
||||||
|
LanguageSelectionComboBox.Items.Assign(Items);
|
||||||
|
|
||||||
|
Items.Assign(MSCharacterSets);
|
||||||
|
Items.CustomSort(@CharsetCompare);
|
||||||
|
CharacterSetComboBox.Items.Assign(Items);
|
||||||
|
finally
|
||||||
|
Items.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectVersionInfoOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TProjectVersionInfoOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
@ -100,15 +139,11 @@ begin
|
|||||||
|
|
||||||
if FVersionInfo.AutoIncrementBuild then
|
if FVersionInfo.AutoIncrementBuild then
|
||||||
AutomaticallyIncreaseBuildCheckBox.Checked := True;
|
AutomaticallyIncreaseBuildCheckBox.Checked := True;
|
||||||
// ComboBox.sort does not change ItemIndex.[Windows]
|
|
||||||
LanguageSelectionComboBox.Items.Assign(MSLanguages);
|
|
||||||
LanguageSelectionComboBox.Sorted := True;
|
|
||||||
i := MSHexLanguages.IndexOf(FVersionInfo.HexLang);
|
i := MSHexLanguages.IndexOf(FVersionInfo.HexLang);
|
||||||
if i >= 0 then
|
if i >= 0 then
|
||||||
i := LanguageSelectionComboBox.Items.IndexOf(MSLanguages[i]);
|
i := LanguageSelectionComboBox.Items.IndexOf(MSLanguages[i]);
|
||||||
LanguageSelectionComboBox.ItemIndex := i;
|
LanguageSelectionComboBox.ItemIndex := i;
|
||||||
CharacterSetComboBox.Items.Assign(MSCharacterSets);
|
|
||||||
CharacterSetComboBox.Sorted := True;
|
|
||||||
i := MSHexCharacterSets.IndexOf(FVersionInfo.HexCharSet);
|
i := MSHexCharacterSets.IndexOf(FVersionInfo.HexCharSet);
|
||||||
if i >= 0 then
|
if i >= 0 then
|
||||||
i := CharacterSetComboBox.Items.IndexOf(MSCharacterSets[i]);
|
i := CharacterSetComboBox.Items.IndexOf(MSCharacterSets[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user