mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:39:44 +02:00
IDE, Backup Options page: store Subdirectory comboboxes '(no subdirectory)' values language independently
(cherry picked from commit 2e5ff7abf6
)
This commit is contained in:
parent
c0e2e8f5c5
commit
d28c00b5e7
@ -149,6 +149,8 @@ begin
|
||||
BakProjSubDirComboBox.Text:='';
|
||||
with BakProjSubDirComboBox.Items do
|
||||
begin
|
||||
// NOTE: dlgBakNoSubDirectory ItemIndex position is assumed to be Items.Count-2
|
||||
// in BackupOptionsFrame.WriteSettings method.
|
||||
BeginUpdate;
|
||||
Clear;
|
||||
Add(dlgBakNoSubDirectory);
|
||||
@ -199,6 +201,8 @@ begin
|
||||
BakOtherSubDirLabel.Caption := dlgEdBSubDir;
|
||||
with BakOtherSubDirComboBox.Items do
|
||||
begin
|
||||
// NOTE: dlgBakNoSubDirectory ItemIndex position is assumed to be Items.Count-2
|
||||
// in BackupOptionsFrame.WriteSettings method.
|
||||
BeginUpdate;
|
||||
Clear;
|
||||
Add(dlgBakNoSubDirectory);
|
||||
@ -275,9 +279,13 @@ begin
|
||||
MaxCounter:=0
|
||||
else
|
||||
MaxCounter:=StrToIntDef(BakProjMaxCounterComboBox.Text,1);
|
||||
SubDirectory:=BakProjSubDirComboBox.Text;
|
||||
if SubDirectory=dlgBakNoSubDirectory then
|
||||
SubDirectory:='';
|
||||
// BakProjSubDirComboBox has two fixed last items: '(no subdirectory)' and 'backup'.
|
||||
// Check if selected item is '(no subdirectory)' in translation-independent manner
|
||||
// (as the caption itself can be changed when the interface language is switched).
|
||||
if BakProjSubDirComboBox.ItemIndex=BakProjSubDirComboBox.Items.Count-2 then
|
||||
SubDirectory:=''
|
||||
else
|
||||
SubDirectory:=BakProjSubDirComboBox.Text;
|
||||
end;
|
||||
with BackupInfoOtherFiles do
|
||||
begin
|
||||
@ -294,7 +302,10 @@ begin
|
||||
MaxCounter:=0
|
||||
else
|
||||
MaxCounter:=StrToIntDef(BakOtherMaxCounterComboBox.Text,1);
|
||||
if BakOtherSubDirComboBox.Text=dlgBakNoSubDirectory then
|
||||
// BakOtherSubDirComboBox has two fixed last items: '(no subdirectory)' and 'backup'.
|
||||
// Check if selected item is '(no subdirectory)' in translation-independent manner
|
||||
// (as the caption itself can be changed when the interface language is switched).
|
||||
if BakOtherSubDirComboBox.ItemIndex=BakOtherSubDirComboBox.Items.Count-2 then
|
||||
SubDirectory:=''
|
||||
else
|
||||
SubDirectory:=BakOtherSubDirComboBox.Text;
|
||||
|
@ -120,6 +120,7 @@
|
||||
<Filename Value="frames/backup_options.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="BackupOptionsFrame"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="Backup_Options"/>
|
||||
</Unit>
|
||||
|
Loading…
Reference in New Issue
Block a user