127b3114d72fde2da1a567ce160e17308eede7cf
[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     </xsl:template>
158     
159     
160     
161     <xsl:template match="scinotes-display">
162         <Title text="_(General display options)">
163             <Grid>
164                 <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">
165                     <actionPerformed choose="highlight-current-line">
166                         <xsl:call-template name="context"/>
167                     </actionPerformed>
168                 </Checkbox>
169                 <Panel gridx="2" gridy="1" weightx="1"/>
170                 <Panel gridx="3" gridy="1" weightx="1"/>
171                 <Color color="{@current-line-color}" listener="ActionListener" gridx="4" gridy="1" weightx="0" enable="{@highlight-current-line}">
172                     <actionPerformed choose="current-line-color">
173                         <xsl:call-template name="context"/>
174                     </actionPerformed>
175                 </Color>
176                 
177                 <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">
178                     <actionPerformed choose="show-line-numbers">
179                         <xsl:call-template name="context"/>
180                     </actionPerformed>
181                 </Checkbox>
182                 
183                 <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}">
184                     <actionPerformed choose="whereami">
185                         <xsl:call-template name="context"/>
186                     </actionPerformed>
187                 </Radiobutton>
188                 
189                 <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}">
190                     <actionPerformed choose="whereami">
191                         <xsl:call-template name="context"/>
192                     </actionPerformed>
193                 </Radiobutton>
194                 
195                 <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">
196                     <actionPerformed choose="wrap-lines">
197                         <xsl:call-template name="context"/>
198                     </actionPerformed>
199                 </Checkbox>
200                 
201                 <Label text="_(Background color: )" gridx="1" gridy="4" weightx="0"/>
202                 <Color color="{@background-color}" listener="ActionListener" gridx="2" gridy="4" fill="none" weightx="0" anchor="west">
203                     <actionPerformed choose="background-color">
204                         <xsl:call-template name="context"/>
205                     </actionPerformed>
206                 </Color>
207                 
208                 <Label text="_(Cursor color: )" gridx="3" gridy="4" weightx="0"/>
209                 <Color color="{@caret-color}" listener="ActionListener" gridx="4" gridy="4" weightx="0" fill="none" anchor="east">
210                     <actionPerformed choose="caret-color">
211                         <xsl:call-template name="context"/>
212                     </actionPerformed>
213                 </Color>
214             </Grid>
215         </Title>
216         
217         <VSpace height="10"/>
218         
219         <Title text="_(Keywords)">
220             <Grid>
221                 <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">
222                     <actionPerformed choose="keywords-colorization">
223                         <xsl:call-template name="context"/>
224                     </actionPerformed>
225                 </Checkbox>
226                 
227                 <Panel gridx="2" gridy="1" weightx="1"/>
228                 <Link gridx="3" gridy="1" weightx="0" listener="MouseListener" text="_(Set syntax Colors)" enable="{@keywords-colorization}">
229                     <mouseClicked set="path" value="colors" context="/" enable="{@keywords-colorization}"/>
230                 </Link>
231                 <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">
232                     <actionPerformed choose="highlight-brackets">
233                         <xsl:call-template name="context"/>
234                     </actionPerformed>
235                 </Checkbox>
236                 <Grid gridx="1" gridy="3" gridwidth="3" ipadx="10">
237                     <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-brackets}"/>
238                     <Color color="{@brackets-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-brackets}">
239                         <actionPerformed choose="brackets-color">
240                             <xsl:call-template name="context"/>
241                         </actionPerformed>
242                     </Color>
243                     <Panel gridx="3" gridy="1" weightx="1"/>
244                     <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}">
245                         <actionPerformed choose="brackets-onmouseover">
246                             <xsl:call-template name="context"/>
247                         </actionPerformed>
248                     </Checkbox>
249                     <Panel gridx="5" gridy="1" weightx="1"/>
250                     <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-brackets}"/>
251                     <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-brackets}">
252                         <xsl:variable name="bh" select="@brackets-highlightment"/>
253                         <actionPerformed choose="brackets-highlightment">
254                             <xsl:call-template name="context"/>
255                         </actionPerformed>
256                         <option value="_(Filled)" key="Filled">
257                             <xsl:if test="'Filled'=$bh">
258                                 <xsl:attribute name="selected">selected</xsl:attribute>
259                             </xsl:if>
260                         </option>
261                         <option value="_(Framed)" key="Framed">
262                             <xsl:if test="'Framed'=$bh">
263                                 <xsl:attribute name="selected">selected</xsl:attribute>
264                             </xsl:if>
265                         </option>
266                         <option value="_(Underlined)" key="Underlined">
267                             <xsl:if test="'Underlined'=$bh">
268                                 <xsl:attribute name="selected">selected</xsl:attribute>
269                             </xsl:if>
270                         </option>
271                     </Select>
272                 </Grid>
273                 
274                 <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">
275                     <actionPerformed choose="highlight-keywords">
276                         <xsl:call-template name="context"/>
277                     </actionPerformed>
278                 </Checkbox>
279                 
280                 <Grid gridx="1" gridy="5" gridwidth="3" ipadx="10">
281                     <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-keywords}"/>
282                     <Color color="{@keywords-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-keywords}">
283                         <actionPerformed choose="keywords-color">
284                             <xsl:call-template name="context"/>
285                         </actionPerformed>
286                     </Color>
287                     <Panel gridx="3" gridy="1" weightx="1"/>
288                     <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}">
289                         <actionPerformed choose="keywords-onmouseover">
290                             <xsl:call-template name="context"/>
291                         </actionPerformed>
292                     </Checkbox>
293                     <Panel gridx="5" gridy="1" weightx="1"/>
294                     <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-keywords}"/>
295                     <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-keywords}">
296                         <xsl:variable name="kh" select="@keywords-highlightment"/>
297                         <actionPerformed choose="keywords-highlightment">
298                             <xsl:call-template name="context"/>
299                         </actionPerformed>
300                         <option value="_(Filled)" key="Filled">
301                             <xsl:if test="'Filled'=$kh">
302                                 <xsl:attribute name="selected">selected</xsl:attribute>
303                             </xsl:if>
304                         </option>
305                         <option value="_(Framed)" key="Framed">
306                             <xsl:if test="'Framed'=$kh">
307                                 <xsl:attribute name="selected">selected</xsl:attribute>
308                             </xsl:if>
309                         </option>
310                     </Select>
311                 </Grid>
312             </Grid>
313         </Title>
314         
315         <VSpace height="10"/>
316         
317         <Title text="_(Tabulation and Indentation)">
318             <Grid>
319                 <Label text="_(Tabulation size: )" gridx="1" gridy="1" weightx="0"/>
320                 <NumericalSpinner gridx="2"
321                           gridy="1"
322                           weightx="0"
323                           min-value = "0"
324                           increment = "1"
325                           length = "3"
326                           listener = "ActionListener"
327                           value = "{@tab-size}">
328                     <actionPerformed choose="tab-size">
329                         <xsl:call-template name="context"/>
330                     </actionPerformed>
331                 </NumericalSpinner>
332                 
333                 <Panel gridx="3" gridy="1" weightx="1"/>
334                 
335                 <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">
336                     <actionPerformed choose="use-spaces">
337                         <xsl:call-template name="context"/>
338                     </actionPerformed>
339                 </Checkbox>
340                 
341                 <xsl:variable name="enable">
342                     <xsl:choose>
343                         <xsl:when test="@use-spaces='true'">
344                             <xsl:text>false</xsl:text>
345                         </xsl:when>
346                         <xsl:otherwise>
347                             <xsl:text>true</xsl:text>
348                         </xsl:otherwise>
349                     </xsl:choose>
350                 </xsl:variable>
351                 
352                 <Label text="_(Representation: )" gridx="1" gridy="2" weightx="0" enable="{$enable}"/>
353                 
354                 <Radiobutton value="{@tab-representation}" expected-value="chevrons" listener="ActionListener" text="_(Chevrons)" gridx="2" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
355                     <actionPerformed choose="tab-representation">
356                         <xsl:call-template name="context"/>
357                     </actionPerformed>
358                 </Radiobutton>
359                 
360                 <Radiobutton value="{@tab-representation}" expected-value="hrule" listener="ActionListener" text="_(Horizontal rule)" gridx="3" gridy="2" fill="none" weightx="0" anchor="center" enable="{$enable}">
361                     <actionPerformed choose="tab-representation">
362                         <xsl:call-template name="context"/>
363                     </actionPerformed>
364                 </Radiobutton>
365                 
366                 <Radiobutton value="{@tab-representation}" expected-value="vrule" listener="ActionListener" text="_(Vertical rule)" gridx="4" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
367                     <actionPerformed choose="tab-representation">
368                         <xsl:call-template name="context"/>
369                     </actionPerformed>
370                 </Radiobutton>
371                 
372                 <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">
373                     <actionPerformed choose="automatic-indent">
374                         <xsl:call-template name="context"/>
375                     </actionPerformed>
376                 </Checkbox>
377                 
378                 <Label gridy="4" text="_(Indent size: )" enable="{@automatic-indent}"/>
379                 
380                 <NumericalSpinner gridx="2"
381                           gridy="4"
382                           weightx="0"
383                           min-value = "0"
384                           increment = "1"
385                           length = "3"
386                           enable="{@automatic-indent}"
387                           listener = "ActionListener"
388                           value = "{@indent-size}">
389                     <actionPerformed choose="indent-size">
390                         <xsl:call-template name="context"/>
391                     </actionPerformed>
392                 </NumericalSpinner>
393             </Grid>
394         </Title>
395     </xsl:template>
396     
397     
398     
399     <xsl:template match="scinotes-autosave">
400         <Checkbox checked="{@enable}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable autosave in Scinotes)">
401             <actionPerformed choose="enable">
402                 <xsl:call-template name="context"/>
403             </actionPerformed>
404         </Checkbox>
405         
406         <VSpace height="10"/>
407         
408         <Title text="_(Save options)">
409             <Grid>
410                 <Label gridx="1" gridy="1" weightx="0" anchor="west" text="_(Save every )" enable="{@enable}"/>
411                 <NumericalSpinner gridx="2"
412                           gridy="1"
413                           weightx="0"
414                           min-value = "1"
415                           increment = "1"
416                           length = "4"
417                           listener = "ActionListener"
418                           enable = "{@enable}"
419                           value = "{@save-every}">
420                     <actionPerformed choose="save-every">
421                         <xsl:call-template name="context"/>
422                     </actionPerformed>
423                 </NumericalSpinner>
424                 
425                 <Label gridx="3" gridy="1" weightx="0" anchor="west" text="_( minutes )" enable="{@enable}"/>
426                 
427                 <Panel gridx="4" gridy="1" gridheight="1" fill="both"/>
428             </Grid>
429         </Title>
430         
431         <VSpace height="10"/>
432         
433         <Title text="_(Close options)">
434             <Checkbox checked="{@automatic-delete}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Delete automatically saved files)" enable="{@enable}">
435                 
436                 <actionPerformed choose="automatic-delete">
437                     <xsl:call-template name="context"/>
438                 </actionPerformed>
439             </Checkbox>
440         </Title>
441         
442         <VSpace height="10"/>
443         
444         <Title text="_(Filename)">
445             <Grid>
446                 <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}">
447                     <actionPerformed choose="append-filename">
448                         <xsl:call-template name="context"/>
449                     </actionPerformed>
450                 </Radiobutton>
451                 <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
452                 <Entry gridx="3" gridy="1" weightx="1" anchor="above_baseline"
453                listener="EntryListener"
454                text="{@append-with}">
455                     <xsl:attribute name="enable">
456                         <xsl:if test="@enable='true' and @append-filename='true'">
457                             <xsl:text>true</xsl:text>
458                         </xsl:if>
459                     </xsl:attribute>
460                     <entryChanged choose="append-with">
461                         <xsl:call-template name="context"/>
462                     </entryChanged>
463                 </Entry>
464                 <Label gridx="3" gridy="2" text="_((%date can be used to be replaced by the current date))">
465                     <xsl:attribute name="enable">
466                         <xsl:if test="@enable='true' and @append-filename='true'">
467                             <xsl:text>true</xsl:text>
468                         </xsl:if>
469                     </xsl:attribute>
470                 </Label>
471                 
472                 <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}">
473                     <actionPerformed choose="append-filename">
474                         <xsl:call-template name="context"/>
475                     </actionPerformed>
476                 </Radiobutton>
477                 
478                 <Entry gridx="3" gridy="3" weightx="1" anchor="above_baseline"
479                listener="EntryListener"
480                text="{@replace-with}">
481                     <xsl:attribute name="enable">
482                         <xsl:if test="@enable='true' and @append-filename='false'">
483                             <xsl:text>true</xsl:text>
484                         </xsl:if>
485                     </xsl:attribute>
486                     <entryChanged choose="replace-with">
487                         <xsl:call-template name="context"/>
488                     </entryChanged>
489                 </Entry>
490             </Grid>
491         </Title>
492         
493         <VSpace height="10"/>
494         
495         <Title text="_(Location)">
496             <Grid>
497                 <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}">
498                     <actionPerformed choose="source-flag">
499                         <xsl:call-template name="context"/>
500                     </actionPerformed>
501                 </Radiobutton>
502                 
503                 <Radiobutton value="{@source-flag}" expected-value="false" listener="ActionListener" text="_(Single directory)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west" enable="{@enable}">
504                     <actionPerformed choose="source-flag">
505                         <xsl:call-template name="context"/>
506                     </actionPerformed>
507                 </Radiobutton>
508                 
509                 <Panel gridx="2" gridy="2" gridheight="1" fill="both"/>
510                 
511                 <FileSelector gridx="3" gridy="2" href="{@single-directory}" mask="*"
512                       desc="_(Choose an autosave directory)"
513                       dir-selection = "true"
514                       check-entry = "false"
515                       listener="EntryListener">
516                     <xsl:attribute name="enable">
517                         <xsl:if test="@enable='true' and @source-flag='false'">
518                             <xsl:text>true</xsl:text>
519                         </xsl:if>
520                     </xsl:attribute>
521                     <entryChanged choose="single-directory">
522                         <xsl:call-template name="context"/>
523                     </entryChanged>
524                 </FileSelector>
525             </Grid>
526         </Title>
527     </xsl:template>
528     
529     <xsl:template match="scinotes-header">
530         <Title text="_(Default header)">
531             <Grid>
532                 <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">
533                     <actionPerformed choose="enable">
534                         <xsl:call-template name="context"/>
535                     </actionPerformed>
536                 </Checkbox>
537                 
538                 <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
539                 
540                 <TextArea gridx="1" gridy="2" weightx="1" gridwidth="2" weighty="0" anchor="west"
541                   editable="true"
542                   rows="15"
543                   scroll="true"
544                   listener="EntryListener"
545                   enable="{@enable}">
546                     <xsl:attribute name="text">
547                         <xsl:value-of select="string(child::node()[1])" disable-output-escaping="yes"/>
548                     </xsl:attribute>
549                     <entryChanged choose-child="1">
550                         <xsl:call-template name="context"/>
551                     </entryChanged>
552                 </TextArea>
553             </Grid>
554         </Title>
555     </xsl:template>
556 </xsl:stylesheet>