Bug 13336 fixed: In SciNotes it was not possible to complete brackets only at eol
[scilab.git] / scilab / modules / scinotes / etc / XConfiguration-scinotes.xsl
1 <?xml version='1.0' encoding='utf-8'?>
2
3 <xsl:stylesheet version ="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4     <xsl:template match="scinotes-preferences">
5         <Title text="_(Editor)">
6             <VBox>
7                 <HBox>
8                     <Checkbox checked="{@scinotes}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Use Scinotes)">
9                         <actionPerformed choose="scinotes">
10                             <xsl:call-template name="context"/>
11                         </actionPerformed>
12                     </Checkbox>
13                     <Glue/>
14                 </HBox>
15                 
16                 <xsl:variable name="enable">
17                     <xsl:choose>
18                         <xsl:when test="@scinotes='true'">
19                             <xsl:text>false</xsl:text>
20                         </xsl:when>
21                         <xsl:otherwise>
22                             <xsl:text>true</xsl:text>
23                         </xsl:otherwise>
24                     </xsl:choose>
25                 </xsl:variable>
26                 
27                 <Grid>
28                     <Radiobutton value="{@external-cmd}" expected-value="true" listener="ActionListener" text="_(External editor: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{$enable}">
29                         <actionPerformed choose="external-cmd">
30                             <xsl:call-template name="context"/>
31                         </actionPerformed>
32                     </Radiobutton>
33                     <FileSelector gridx="2" gridy="1" weightx="1" anchor="above_baseline"
34                         listener="EntryListener"
35                         href="{@cmd}"
36                         dir-selection="false"
37                         check-entry="false">
38                         <xsl:attribute name="enable">
39                             <xsl:if test="@scinotes='false' and @external-cmd='true'">
40                                 <xsl:text>true</xsl:text>
41                             </xsl:if>
42                         </xsl:attribute>
43                         <entryChanged choose="cmd">
44                             <xsl:call-template name="context"/>
45                         </entryChanged>
46                     </FileSelector>
47                     <Label gridx="2" gridy="2" text="_((Don't forget to quote path containing white spaces))">
48                         <xsl:attribute name="enable">
49                             <xsl:if test="@scinotes='false' and @external-cmd='true'">
50                                 <xsl:text>true</xsl:text>
51                             </xsl:if>
52                         </xsl:attribute>
53                     </Label>
54                     <Panel height="5" gridx="1" gridy="3">
55                         <VSpace height="5"/>
56                     </Panel>
57                     <Radiobutton value="{@external-cmd}" expected-value="false" listener="ActionListener" text="_(Scilab command: )" gridx="1" gridy="4" fill="none" weightx="0" anchor="west" enable="{$enable}">
58                         <actionPerformed choose="external-cmd">
59                             <xsl:call-template name="context"/>
60                         </actionPerformed>
61                     </Radiobutton>
62                     <Entry gridx="2" gridy="4" weightx="1" anchor="above_baseline"
63                  listener="EntryListener"
64                  text="{@macro}">
65                         <xsl:attribute name="enable">
66                             <xsl:if test="@scinotes='false' and @external-cmd='false'">
67                                 <xsl:text>true</xsl:text>
68                             </xsl:if>
69                         </xsl:attribute>
70                         <entryChanged choose="macro">
71                             <xsl:call-template name="context"/>
72                         </entryChanged>
73                     </Entry>
74                 </Grid>
75             </VBox>
76         </Title>
77         <VSpace height="10"/>
78         <Title text="_(Scinotes General settings)">
79             <Grid>
80                 <Panel gridx="1" gridy="1" gridwidth="3">
81                     <xsl:call-template name="BooleanCheckBox">
82                         <xsl:with-param name="attr-name" select="'restart-reopen'"/>
83                         <xsl:with-param name="text" select="'_(Restore previous session on start-up)'"/>
84                     </xsl:call-template>
85                 </Panel>
86                 
87                 <Panel gridx="1" gridy="2" gridwidth="3">
88                     <xsl:call-template name="BooleanCheckBox">
89                         <xsl:with-param name="attr-name" select="'add-line-termination'"/>
90                         <xsl:with-param name="text" select="'_(Add carriage return at the end of the file.)'"/>
91                     </xsl:call-template>
92                 </Panel>
93                 
94                 <Label gridx="1" gridy="3" weightx="0" text="_(Number of recently opened files to display: )"/>
95                 <Panel gridx="2" gridy="3" gridheight="2" fill="both"/>
96                 <NumericalSpinner gridx="3"
97                           gridy="3"
98                           weightx="0"
99                           min-value = "0"
100                           increment = "1"
101                           length = "4"
102                           listener = "ActionListener"
103                           value = "{@number-of-recently-open}">
104                     <actionPerformed choose="number-of-recently-open">
105                         <xsl:call-template name="context"/>
106                     </actionPerformed>
107                 </NumericalSpinner>
108                 
109                 <Label gridx="1" gridy="4" weightx="0" text="_(Default file encoding: )"/>
110                 
111                 <Panel gridx="3" gridy="4">
112                     <xsl:call-template name="Select">
113                         <xsl:with-param name="among">
114                             <option encoding="utf-8"/>
115                             <option encoding="iso-8859-1"/>
116                             <option encoding="windows-1252"/>
117                         </xsl:with-param>
118                     </xsl:call-template>
119                 </Panel>
120                 
121                 <Label gridx="1" gridy="5" weightx="0" text="_(Default End-Of-Line: )"/>
122                 
123                 <Select gridx="3" gridy="5" listener="ActionListener">
124                     <actionPerformed choose="eol">
125                         <xsl:call-template name="context"/>
126                     </actionPerformed>
127                     <xsl:variable name="eol">
128                         <xsl:choose>
129                             <xsl:when test="@eol=''">
130                                 <xsl:choose>
131                                     <xsl:when test="$OS='Windows'">
132                                         <xsl:text>Windows (CR+LF)</xsl:text>
133                                     </xsl:when>
134                                     <xsl:otherwise>
135                                         <xsl:text>Unix (LF)</xsl:text>
136                                     </xsl:otherwise>
137                                 </xsl:choose>
138                             </xsl:when>
139                             <xsl:otherwise>
140                                 <xsl:value-of select="@eol"/>
141                             </xsl:otherwise>
142                         </xsl:choose>
143                     </xsl:variable>
144                     <option value="Unix (LF)">
145                         <xsl:if test="$eol='Unix (LF)'">
146                             <xsl:attribute name="selected">selected</xsl:attribute>
147                         </xsl:if>
148                     </option>
149                     <option value="Windows (CR+LF)">
150                         <xsl:if test="$eol='Windows (CR+LF)'">
151                             <xsl:attribute name="selected">selected</xsl:attribute>
152                         </xsl:if>
153                     </option>
154                 </Select>
155             </Grid>
156         </Title>
157         <VSpace height="10"/>
158         <Title text="_(Completion)">
159             <Checkbox checked="{@complete-at-eol}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Auto-complete brackets when cursor is at the end of a line)">
160               <actionPerformed choose="complete-at-eol">
161                 <xsl:call-template name="context"/>
162               </actionPerformed>
163             </Checkbox>
164         </Title>
165     </xsl:template>
166     
167     
168     <xsl:template match="scinotes-display">
169         <Title text="_(General display options)">
170             <Grid>
171                 <Checkbox checked="{@highlight-current-line}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight current line: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
172                     <actionPerformed choose="highlight-current-line">
173                         <xsl:call-template name="context"/>
174                     </actionPerformed>
175                 </Checkbox>
176                 <Panel gridx="2" gridy="1" weightx="1"/>
177                 <Panel gridx="3" gridy="1" weightx="1"/>
178                 <Color color="{@current-line-color}" listener="ActionListener" gridx="4" gridy="1" weightx="0" enable="{@highlight-current-line}">
179                     <actionPerformed choose="current-line-color">
180                         <xsl:call-template name="context"/>
181                     </actionPerformed>
182                 </Color>
183                 
184                 <Checkbox checked="{@show-line-numbers}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Show line numbers: )" gridx="1" gridy="2" fill="none" weightx="0" anchor="west">
185                     <actionPerformed choose="show-line-numbers">
186                         <xsl:call-template name="context"/>
187                     </actionPerformed>
188                 </Checkbox>
189                 
190                 <Radiobutton value="{@whereami}" expected-value="true" listener="ActionListener" text="_(Local numbering)" gridx="2" gridy="2" fill="none" weightx="0" anchor="west" enable="{@show-line-numbers}">
191                     <actionPerformed choose="whereami">
192                         <xsl:call-template name="context"/>
193                     </actionPerformed>
194                 </Radiobutton>
195                 
196                 <Radiobutton value="{@whereami}" expected-value="false" listener="ActionListener" text="_(Normal)" gridx="3" gridy="2" gridwidth="2" fill="none" weightx="0" anchor="west" enable="{@show-line-numbers}">
197                     <actionPerformed choose="whereami">
198                         <xsl:call-template name="context"/>
199                     </actionPerformed>
200                 </Radiobutton>
201                 
202                 <Checkbox checked="{@wrap-lines}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Wrap lines)" gridx="1" gridy="3" fill="none" weightx="0" anchor="west">
203                     <actionPerformed choose="wrap-lines">
204                         <xsl:call-template name="context"/>
205                     </actionPerformed>
206                 </Checkbox>
207                 
208                 <Label text="_(Background color: )" gridx="1" gridy="4" weightx="0"/>
209                 <Color color="{@background-color}" listener="ActionListener" gridx="2" gridy="4" fill="none" weightx="0" anchor="west">
210                     <actionPerformed choose="background-color">
211                         <xsl:call-template name="context"/>
212                     </actionPerformed>
213                 </Color>
214                 
215                 <Label text="_(Cursor color: )" gridx="3" gridy="4" weightx="0"/>
216                 <Color color="{@caret-color}" listener="ActionListener" gridx="4" gridy="4" weightx="0" fill="none" anchor="east">
217                     <actionPerformed choose="caret-color">
218                         <xsl:call-template name="context"/>
219                     </actionPerformed>
220                 </Color>
221             </Grid>
222         </Title>
223         
224         <VSpace height="10"/>
225         
226         <Title text="_(Keywords)">
227             <Grid>
228                 <Checkbox checked="{@keywords-colorization}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable keywords colorization)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
229                     <actionPerformed choose="keywords-colorization">
230                         <xsl:call-template name="context"/>
231                     </actionPerformed>
232                 </Checkbox>
233                 
234                 <Panel gridx="2" gridy="1" weightx="1"/>
235                 <Link gridx="3" gridy="1" weightx="0" listener="MouseListener" text="_(Set syntax Colors)" enable="{@keywords-colorization}">
236                     <mouseClicked set="path" value="colors" context="/" enable="{@keywords-colorization}"/>
237                 </Link>
238                 <Checkbox checked="{@highlight-brackets}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight corresponding brackets)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west">
239                     <actionPerformed choose="highlight-brackets">
240                         <xsl:call-template name="context"/>
241                     </actionPerformed>
242                 </Checkbox>
243                 <Grid gridx="1" gridy="3" gridwidth="3" ipadx="10">
244                     <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-brackets}"/>
245                     <Color color="{@brackets-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-brackets}">
246                         <actionPerformed choose="brackets-color">
247                             <xsl:call-template name="context"/>
248                         </actionPerformed>
249                     </Color>
250                     <Panel gridx="3" gridy="1" weightx="1"/>
251                     <Checkbox checked="{@brackets-onmouseover}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight on mouse over)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west" enable="{@highlight-brackets}">
252                         <actionPerformed choose="brackets-onmouseover">
253                             <xsl:call-template name="context"/>
254                         </actionPerformed>
255                     </Checkbox>
256                     <Panel gridx="5" gridy="1" weightx="1"/>
257                     <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-brackets}"/>
258                     <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-brackets}">
259                         <xsl:variable name="bh" select="@brackets-highlightment"/>
260                         <actionPerformed choose="brackets-highlightment">
261                             <xsl:call-template name="context"/>
262                         </actionPerformed>
263                         <option value="_(Filled)" key="Filled">
264                             <xsl:if test="'Filled'=$bh">
265                                 <xsl:attribute name="selected">selected</xsl:attribute>
266                             </xsl:if>
267                         </option>
268                         <option value="_(Framed)" key="Framed">
269                             <xsl:if test="'Framed'=$bh">
270                                 <xsl:attribute name="selected">selected</xsl:attribute>
271                             </xsl:if>
272                         </option>
273                         <option value="_(Underlined)" key="Underlined">
274                             <xsl:if test="'Underlined'=$bh">
275                                 <xsl:attribute name="selected">selected</xsl:attribute>
276                             </xsl:if>
277                         </option>
278                     </Select>
279                 </Grid>
280                 
281                 <Checkbox checked="{@highlight-keywords}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight corresponding keywords (e.g. if ... end))" gridx="1" gridy="4" fill="none" weightx="0" anchor="west">
282                     <actionPerformed choose="highlight-keywords">
283                         <xsl:call-template name="context"/>
284                     </actionPerformed>
285                 </Checkbox>
286                 
287                 <Grid gridx="1" gridy="5" gridwidth="3" ipadx="10">
288                     <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-keywords}"/>
289                     <Color color="{@keywords-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-keywords}">
290                         <actionPerformed choose="keywords-color">
291                             <xsl:call-template name="context"/>
292                         </actionPerformed>
293                     </Color>
294                     <Panel gridx="3" gridy="1" weightx="1"/>
295                     <Checkbox checked="{@keywords-onmouseover}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight on mouse over)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west" enable="{@highlight-keywords}">
296                         <actionPerformed choose="keywords-onmouseover">
297                             <xsl:call-template name="context"/>
298                         </actionPerformed>
299                     </Checkbox>
300                     <Panel gridx="5" gridy="1" weightx="1"/>
301                     <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-keywords}"/>
302                     <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-keywords}">
303                         <xsl:variable name="kh" select="@keywords-highlightment"/>
304                         <actionPerformed choose="keywords-highlightment">
305                             <xsl:call-template name="context"/>
306                         </actionPerformed>
307                         <option value="_(Filled)" key="Filled">
308                             <xsl:if test="'Filled'=$kh">
309                                 <xsl:attribute name="selected">selected</xsl:attribute>
310                             </xsl:if>
311                         </option>
312                         <option value="_(Framed)" key="Framed">
313                             <xsl:if test="'Framed'=$kh">
314                                 <xsl:attribute name="selected">selected</xsl:attribute>
315                             </xsl:if>
316                         </option>
317                     </Select>
318                 </Grid>
319             </Grid>
320         </Title>
321         
322         <VSpace height="10"/>
323         
324         <Title text="_(Tabulation and Indentation)">
325             <Grid>
326                 <Label text="_(Tabulation size: )" gridx="1" gridy="1" weightx="0"/>
327                 <NumericalSpinner gridx="2"
328                           gridy="1"
329                           weightx="0"
330                           min-value = "0"
331                           increment = "1"
332                           length = "3"
333                           listener = "ActionListener"
334                           value = "{@tab-size}">
335                     <actionPerformed choose="tab-size">
336                         <xsl:call-template name="context"/>
337                     </actionPerformed>
338                 </NumericalSpinner>
339                 
340                 <Panel gridx="3" gridy="1" weightx="1"/>
341                 
342                 <Checkbox checked="{@use-spaces}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Use space)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west">
343                     <actionPerformed choose="use-spaces">
344                         <xsl:call-template name="context"/>
345                     </actionPerformed>
346                 </Checkbox>
347                 
348                 <xsl:variable name="enable">
349                     <xsl:choose>
350                         <xsl:when test="@use-spaces='true'">
351                             <xsl:text>false</xsl:text>
352                         </xsl:when>
353                         <xsl:otherwise>
354                             <xsl:text>true</xsl:text>
355                         </xsl:otherwise>
356                     </xsl:choose>
357                 </xsl:variable>
358                 
359                 <Label text="_(Representation: )" gridx="1" gridy="2" weightx="0" enable="{$enable}"/>
360                 
361                 <Radiobutton value="{@tab-representation}" expected-value="chevrons" listener="ActionListener" text="_(Chevrons)" gridx="2" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
362                     <actionPerformed choose="tab-representation">
363                         <xsl:call-template name="context"/>
364                     </actionPerformed>
365                 </Radiobutton>
366                 
367                 <Radiobutton value="{@tab-representation}" expected-value="hrule" listener="ActionListener" text="_(Horizontal rule)" gridx="3" gridy="2" fill="none" weightx="0" anchor="center" enable="{$enable}">
368                     <actionPerformed choose="tab-representation">
369                         <xsl:call-template name="context"/>
370                     </actionPerformed>
371                 </Radiobutton>
372                 
373                 <Radiobutton value="{@tab-representation}" expected-value="vrule" listener="ActionListener" text="_(Vertical rule)" gridx="4" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
374                     <actionPerformed choose="tab-representation">
375                         <xsl:call-template name="context"/>
376                     </actionPerformed>
377                 </Radiobutton>
378                 
379                 <Checkbox checked="{@automatic-indent}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable auto indentation)" gridx="1" gridy="3" fill="none" weightx="0" anchor="west">
380                     <actionPerformed choose="automatic-indent">
381                         <xsl:call-template name="context"/>
382                     </actionPerformed>
383                 </Checkbox>
384                 
385                 <Label gridy="4" text="_(Indent size: )" enable="{@automatic-indent}"/>
386                 
387                 <NumericalSpinner gridx="2"
388                           gridy="4"
389                           weightx="0"
390                           min-value = "0"
391                           increment = "1"
392                           length = "3"
393                           enable="{@automatic-indent}"
394                           listener = "ActionListener"
395                           value = "{@indent-size}">
396                     <actionPerformed choose="indent-size">
397                         <xsl:call-template name="context"/>
398                     </actionPerformed>
399                 </NumericalSpinner>
400             </Grid>
401         </Title>
402     </xsl:template>
403     
404     
405     
406     <xsl:template match="scinotes-autosave">
407         <Checkbox checked="{@enable}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable autosave in Scinotes)">
408             <actionPerformed choose="enable">
409                 <xsl:call-template name="context"/>
410             </actionPerformed>
411         </Checkbox>
412         
413         <VSpace height="10"/>
414         
415         <Title text="_(Save options)">
416             <Grid>
417                 <Label gridx="1" gridy="1" weightx="0" anchor="west" text="_(Save every )" enable="{@enable}"/>
418                 <NumericalSpinner gridx="2"
419                           gridy="1"
420                           weightx="0"
421                           min-value = "1"
422                           increment = "1"
423                           length = "4"
424                           listener = "ActionListener"
425                           enable = "{@enable}"
426                           value = "{@save-every}">
427                     <actionPerformed choose="save-every">
428                         <xsl:call-template name="context"/>
429                     </actionPerformed>
430                 </NumericalSpinner>
431                 
432                 <Label gridx="3" gridy="1" weightx="0" anchor="west" text="_( minutes )" enable="{@enable}"/>
433                 
434                 <Panel gridx="4" gridy="1" gridheight="1" fill="both"/>
435             </Grid>
436         </Title>
437         
438         <VSpace height="10"/>
439         
440         <Title text="_(Close options)">
441             <Checkbox checked="{@automatic-delete}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Delete automatically saved files)" enable="{@enable}">
442                 
443                 <actionPerformed choose="automatic-delete">
444                     <xsl:call-template name="context"/>
445                 </actionPerformed>
446             </Checkbox>
447         </Title>
448         
449         <VSpace height="10"/>
450         
451         <Title text="_(Filename)">
452             <Grid>
453                 <Radiobutton value="{@append-filename}" expected-value="true" listener="ActionListener" text="_(Append filename with: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{@enable}">
454                     <actionPerformed choose="append-filename">
455                         <xsl:call-template name="context"/>
456                     </actionPerformed>
457                 </Radiobutton>
458                 <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
459                 <Entry gridx="3" gridy="1" weightx="1" anchor="above_baseline"
460                listener="EntryListener"
461                text="{@append-with}">
462                     <xsl:attribute name="enable">
463                         <xsl:if test="@enable='true' and @append-filename='true'">
464                             <xsl:text>true</xsl:text>
465                         </xsl:if>
466                     </xsl:attribute>
467                     <entryChanged choose="append-with">
468                         <xsl:call-template name="context"/>
469                     </entryChanged>
470                 </Entry>
471                 <Label gridx="3" gridy="2" text="_((%date can be used to be replaced by the current date))">
472                     <xsl:attribute name="enable">
473                         <xsl:if test="@enable='true' and @append-filename='true'">
474                             <xsl:text>true</xsl:text>
475                         </xsl:if>
476                     </xsl:attribute>
477                 </Label>
478                 
479                 <Radiobutton value="{@append-filename}" expected-value="false" listener="ActionListener" text="_(Replace extension with: )" gridx="1" gridy="3" fill="none" weightx="0" anchor="west" enable="{@enable}">
480                     <actionPerformed choose="append-filename">
481                         <xsl:call-template name="context"/>
482                     </actionPerformed>
483                 </Radiobutton>
484                 
485                 <Entry gridx="3" gridy="3" weightx="1" anchor="above_baseline"
486                listener="EntryListener"
487                text="{@replace-with}">
488                     <xsl:attribute name="enable">
489                         <xsl:if test="@enable='true' and @append-filename='false'">
490                             <xsl:text>true</xsl:text>
491                         </xsl:if>
492                     </xsl:attribute>
493                     <entryChanged choose="replace-with">
494                         <xsl:call-template name="context"/>
495                     </entryChanged>
496                 </Entry>
497             </Grid>
498         </Title>
499         
500         <VSpace height="10"/>
501         
502         <Title text="_(Location)">
503             <Grid>
504                 <Radiobutton value="{@source-flag}" expected-value="true" listener="ActionListener" text="_(Source file directory)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{@enable}">
505                     <actionPerformed choose="source-flag">
506                         <xsl:call-template name="context"/>
507                     </actionPerformed>
508                 </Radiobutton>
509                 
510                 <Radiobutton value="{@source-flag}" expected-value="false" listener="ActionListener" text="_(Single directory)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west" enable="{@enable}">
511                     <actionPerformed choose="source-flag">
512                         <xsl:call-template name="context"/>
513                     </actionPerformed>
514                 </Radiobutton>
515                 
516                 <Panel gridx="2" gridy="2" gridheight="1" fill="both"/>
517                 
518                 <FileSelector gridx="3" gridy="2" href="{@single-directory}" mask="*"
519                       desc="_(Choose an autosave directory)"
520                       dir-selection = "true"
521                       check-entry = "false"
522                       listener="EntryListener">
523                     <xsl:attribute name="enable">
524                         <xsl:if test="@enable='true' and @source-flag='false'">
525                             <xsl:text>true</xsl:text>
526                         </xsl:if>
527                     </xsl:attribute>
528                     <entryChanged choose="single-directory">
529                         <xsl:call-template name="context"/>
530                     </entryChanged>
531                 </FileSelector>
532             </Grid>
533         </Title>
534     </xsl:template>
535     
536     <xsl:template match="scinotes-header">
537         <Title text="_(Default header)">
538             <Grid>
539                 <Checkbox checked="{@enable}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Add a default header to new file)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
540                     <actionPerformed choose="enable">
541                         <xsl:call-template name="context"/>
542                     </actionPerformed>
543                 </Checkbox>
544                 
545                 <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
546                 
547                 <TextArea gridx="1" gridy="2" weightx="1" gridwidth="2" weighty="0" anchor="west"
548                   editable="true"
549                   rows="15"
550                   scroll="true"
551                   listener="EntryListener"
552                   enable="{@enable}">
553                     <xsl:attribute name="text">
554                         <xsl:value-of select="string(child::node()[1])" disable-output-escaping="yes"/>
555                     </xsl:attribute>
556                     <entryChanged choose-child="1">
557                         <xsl:call-template name="context"/>
558                     </entryChanged>
559                 </TextArea>
560             </Grid>
561         </Title>
562     </xsl:template>
563 </xsl:stylesheet>