File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 3
3
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
4
* obtain one at http://mozilla.org/MPL/2.0/
5
5
*
6
- * Copyright (C) 2005-2020 , Peter Johnson (gravatar.com/delphidabbler).
6
+ * Copyright (C) 2005-2021 , Peter Johnson (gravatar.com/delphidabbler).
7
7
*
8
8
* Defines a class that manages generation, previewing and saving of a code
9
9
* snippet.
@@ -92,7 +92,8 @@ implementation
92
92
93
93
resourcestring
94
94
// Dialog box title
95
- sSaveDlgTitle = ' Save %0:s Snippet' ;
95
+ sSaveSnippetDlgTitle = ' Save %0:s Snippet' ;
96
+ sSaveCategoryDlgTitle = ' Save %0:s Category' ;
96
97
// Output document title for snippets and categories
97
98
sDocTitle = ' "%0:s" %1:s' ;
98
99
sCategory = ' category' ;
@@ -145,7 +146,12 @@ function TSaveSnippetMgr.GetDlgHelpKeyword: string;
145
146
146
147
function TSaveSnippetMgr.GetDlgTitle : string;
147
148
begin
148
- Result := Format(sSaveDlgTitle, [fView.Description]);
149
+ if Supports(fView, ICategoryView) then
150
+ Result := Format(sSaveCategoryDlgTitle, [fView.Description])
151
+ else if Supports(fView, ISnippetView) then
152
+ Result := Format(sSaveSnippetDlgTitle, [fView.Description])
153
+ else
154
+ Result := ' ' ;
149
155
end ;
150
156
151
157
function TSaveSnippetMgr.GetDocTitle : string;
You can’t perform that action at this time.
0 commit comments