tvplanit: Add "Don't ask again" checkbox to VpPrtFmt editor save prompt by using a TTaskDialog. Update resource strings and translations.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8540 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-12 11:33:16 +00:00
parent 521c9e0d90
commit 03e1ff9059
25 changed files with 479 additions and 176 deletions

View File

@ -19,8 +19,9 @@
<i18n>
<EnableI18N Value="True"/>
<OutDir Value="..\..\languages"/>
<ExcludedIdentifiers Count="1">
<ExcludedIdentifiers Count="2">
<Item1 Value="tmainform.cbaddressbuilder.text"/>
<Item2 Value="tmainform.titlelbl.caption"/>
</ExcludedIdentifiers>
</i18n>
<BuildModes Count="1">

View File

@ -58,7 +58,7 @@ object MainForm: TMainForm
Height = 548
Top = 48
Width = 834
PageIndex = 0
PageIndex = 4
Align = alClient
TabOrder = 1
TabStop = True
@ -697,6 +697,20 @@ object MainForm: TMainForm
OnChange = CbApplyCategoryInfosChange
TabOrder = 9
end
object CbShowSavePrompt: TCheckBox
AnchorSideLeft.Control = CbAllowInplaceEditing
AnchorSideTop.Control = CbApplyCategoryInfos
AnchorSideTop.Side = asrBottom
Left = 316
Height = 19
Top = 213
Width = 170
BorderSpacing.Top = 16
Caption = 'Prompt to save print formats'
Checked = True
State = cbChecked
TabOrder = 10
end
end
end
end
@ -1303,11 +1317,11 @@ object MainForm: TMainForm
Caption = '-'
end
object MnuEditPrintFormats: TMenuItem
Caption = 'Edit print formats...'
Caption = 'Edit print templates...'
OnClick = MnuEditPrintFormatsClick
end
object MnuLoadPrintFormats: TMenuItem
Caption = 'Load print formats...'
Caption = 'Load print templates from file...'
OnClick = MnuLoadPrintFormatsClick
end
object MenuItem3: TMenuItem

View File

@ -22,11 +22,12 @@
{"hash":216343376,"name":"tmainform.cbdragdroptransparent.caption","sourcebytes":[84,114,97,110,115,112,97,114,101,110,116,32,100,114,97,103,32,97,110,100,32,100,114,111,112],"value":"Transparent drag and drop"},
{"hash":17060163,"name":"tmainform.cbshoweventhints.caption","sourcebytes":[83,104,111,119,32,101,118,101,110,116,32,97,110,100,32,99,111,110,116,97,99,116,32,104,105,110,116,115],"value":"Show event and contact hints"},
{"hash":245274983,"name":"tmainform.cbapplycategoryinfos.caption","sourcebytes":[65,112,112,108,121,32,99,97,116,101,103,111,114,121,32,99,111,108,111,114,115,32,116,111,32,119,101,101,107,32,97,110,100,32,109,111,110,116,104,32,118,105,101,119],"value":"Apply category colors to week and month view"},
{"hash":151956947,"name":"tmainform.cbshowsaveprompt.caption","sourcebytes":[80,114,111,109,112,116,32,116,111,32,115,97,118,101,32,112,114,105,110,116,32,102,111,114,109,97,116,115],"value":"Prompt to save print formats"},
{"hash":315429,"name":"tmainform.menuitem1.caption","sourcebytes":[70,105,108,101],"value":"File"},
{"hash":161391310,"name":"tmainform.mnuprintpreview.caption","sourcebytes":[80,114,105,110,116,32,112,114,101,118,105,101,119,46,46,46],"value":"Print preview..."},
{"hash":151352958,"name":"tmainform.mnuprint.caption","sourcebytes":[80,114,105,110,116,46,46,46],"value":"Print..."},
{"hash":109668078,"name":"tmainform.mnueditprintformats.caption","sourcebytes":[69,100,105,116,32,112,114,105,110,116,32,102,111,114,109,97,116,115,46,46,46],"value":"Edit print formats..."},
{"hash":25869902,"name":"tmainform.mnuloadprintformats.caption","sourcebytes":[76,111,97,100,32,112,114,105,110,116,32,102,111,114,109,97,116,115,46,46,46],"value":"Load print formats..."},
{"hash":137712942,"name":"tmainform.mnueditprintformats.caption","sourcebytes":[69,100,105,116,32,112,114,105,110,116,32,116,101,109,112,108,97,116,101,115,46,46,46],"value":"Edit print templates..."},
{"hash":252908494,"name":"tmainform.mnuloadprintformats.caption","sourcebytes":[76,111,97,100,32,112,114,105,110,116,32,116,101,109,112,108,97,116,101,115,32,102,114,111,109,32,102,105,108,101,46,46,46],"value":"Load print templates from file..."},
{"hash":363524,"name":"tmainform.mnuquit.caption","sourcebytes":[81,117,105,116],"value":"Quit"},
{"hash":184026309,"name":"tmainform.mnumaintenance.caption","sourcebytes":[77,97,105,110,116,101,110,97,110,99,101],"value":"Maintenance"},
{"hash":174903555,"name":"tmainform.mnuresources.caption","sourcebytes":[82,101,115,111,117,114,99,101,115],"value":"Resources"},

View File

@ -35,6 +35,7 @@ type
CbDragDropTransparent: TCheckBox;
CbShowEventHints: TCheckBox;
CbApplyCategoryInfos: TCheckBox;
CbShowSavePrompt: TCheckBox;
lblOtherResources: TLabel;
lblResources: TLabel;
lbOtherResources: TCheckListBox;
@ -723,7 +724,9 @@ end;
procedure TMainForm.MnuEditPrintFormatsClick(Sender: TObject);
begin
VpPrintFormatEditDialog1.DrawingStyle := VpWeekView1.DrawingStyle;
VpPrintFormatEditDialog1.ShowSavePrompt := CbShowSavePrompt.Checked;
VpPrintFormatEditDialog1.Execute;
CbShowSavePrompt.Checked := VpPrintFormatEditDialog1.ShowSavePrompt;
end;
procedure TMainForm.MnuLoadPrintFormatsClick(Sender: TObject);
@ -1006,6 +1009,9 @@ begin
CbApplyCategoryInfos.Checked := ini.ReadBool('Settings', 'ApplyCategoryInfos',
CbApplyCategoryInfos.Checked);
CbApplyCategoryInfosChange(nil);
CbShowSavePrompt.Checked := ini.ReadBool('Settings', 'ShowSavePrompt',
CbShowSaveprompt.Checked);
FResID := ini.ReadInteger('Data', 'ResourceID', -1);
finally
@ -1062,6 +1068,7 @@ begin
ini.WriteBool('Settings', 'DragAndDropTransparent', CbDragDropTransparent.Checked);
ini.WriteBool('Settings', 'ShowEventHints', CbShowEventHints.Checked);
ini.WriteBool('Settings', 'ApplyCategoryInfos', CbApplyCategoryInfos.Checked);
ini.WriteBool('Settings', 'ShowSavePrompt', CbShowSavePrompt.Checked);
ini.WriteInteger('Data', 'ResourceID', VpControlLink1.Datastore.ResourceID);
finally