Skip to content

Commit 485e053

Browse files
committed
Update title of Snippet Information dialogue box
The title of the dialogue box was changed to display the name of the snippet for which information is being displayed.
1 parent ea14d1f commit 485e053

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Src/USaveInfoMgr.pas

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ destructor TSaveInfoMgr.Destroy;
151151
end;
152152

153153
procedure TSaveInfoMgr.DoExecute;
154+
resourcestring
155+
sDlgCaption = 'Save Snippet Information for %s';
154156
var
155157
Encoding: TEncoding; // encoding to use for output file
156158
FileContent: string; // output file content before encoding
@@ -164,6 +166,9 @@ procedure TSaveInfoMgr.DoExecute;
164166
1
165167
);
166168
fSaveDlg.FileName := fSourceFileInfo.DefaultFileName;
169+
fSaveDlg.Title := Format(sDlgCaption, [
170+
(fView as ISnippetView).Snippet.DisplayName]
171+
);
167172
// Display dialog box and save file if user OKs
168173
if fSaveDlg.Execute then
169174
begin
@@ -269,7 +274,6 @@ constructor TSaveInfoMgr.InternalCreate(AView: IView);
269274
DlgHelpKeyword = 'SnippetInfoFileDlg';
270275
resourcestring
271276
sDefFileName = 'SnippetInfo';
272-
sDlgCaption = 'Save Snippet Information';
273277
// descriptions of supported file filter strings
274278
sRTFDesc = 'Rich text file';
275279
sTextDesc = 'Plain text file';
@@ -312,7 +316,6 @@ constructor TSaveInfoMgr.InternalCreate(AView: IView);
312316
fSourceFileInfo.DefaultFileName := sDefFileName;
313317

314318
fSaveDlg := TSaveSourceDlg.Create(nil);
315-
fSaveDlg.Title := sDlgCaption;
316319
fSaveDlg.HelpKeyword := DlgHelpKeyword;
317320
fSaveDlg.CommentStyle := TCommentStyle.csNone;
318321
fSaveDlg.EnableCommentStyles := False;

0 commit comments

Comments
 (0)