* Bug 16269 fixed: scalar struct was poorly displayed
[scilab.git] / scilab / modules / console / etc / XConfiguration-general.xsl
1 <?xml version='1.0' encoding='utf-8'?>
2 <xsl:stylesheet version ="1.0"
3                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4                 >
5     <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
6        ::
7        ::     M A I N   P A N E L :   G E N E R A L
8        ::
9   -->
10     <xsl:template match="environment" mode="tooltip">Settings environment</xsl:template>
11     <xsl:template match="environment">
12         <Title text="_(Environment)">
13             <Grid>
14                 <Label gridx="1" gridy="1" weightx="0" text="_(Floating point exception (ieee): )"/>
15                 <Panel gridx="2" gridy="1" weightx="1"/>
16                 <Select gridx="3" gridy="1" listener="ActionListener">
17                     <xsl:variable name="fpe" select="@fpe"/>
18                     <actionPerformed choose="fpe">
19                         <xsl:call-template name="context"/>
20                     </actionPerformed>
21                     <xsl:for-each select="fpe">
22                         <option value="{@floating-point-exception}" key="{@code}">
23                             <xsl:if test="@code=$fpe">
24                                 <xsl:attribute name="selected">selected</xsl:attribute>
25                             </xsl:if>
26                         </option>
27                     </xsl:for-each>
28                 </Select>
29
30                 <Label gridx="1" gridy="2" weightx="0" text="_(Printing format: )"/>
31                 <Select gridx="3" gridy="2" listener="ActionListener">
32                     <xsl:variable name="pf" select="@printing-format"/>
33                     <actionPerformed choose="printing-format">
34                         <xsl:call-template name="context"/>
35                     </actionPerformed>
36                     <xsl:for-each select="printing-format">
37                         <option value="{@format}" key="{@code}">
38                             <xsl:if test="@code=$pf">
39                                 <xsl:attribute name="selected">selected</xsl:attribute>
40                             </xsl:if>
41                         </option>
42                     </xsl:for-each>
43                 </Select>
44                 <Label gridx="1" gridy="3" weightx="0" text="_(Width: )"/>
45                 <NumericalSpinner gridx="3"
46                           gridy="3"
47                           weightx="0"
48                           min-value="2"
49                           max-value="25"
50                           increment="1"
51                           length="3"
52                           listener="ActionListener"
53                           value="{@width}">
54                     <actionPerformed choose="width">
55                         <xsl:call-template name="context"/>
56                     </actionPerformed>
57                 </NumericalSpinner>
58                 <Label gridx="1" gridy="4" weightx="0" text="_(Recursion limit: )"/>
59                 <Panel gridx="2" gridy="1" weightx="1"/>
60                 <NumericalSpinner gridx="3" gridy="4" weightx="0" length="3"
61                     increment="1"
62                     min-value="10"
63                     listener="ActionListener"
64                     value="{@recursion-limit}">
65                     <actionPerformed choose="recursion-limit">
66                         <xsl:call-template name="context"/>
67                     </actionPerformed>
68                 </NumericalSpinner>
69                 <Label gridx="1" gridy="5" weightx="0" text="_(Containers display depth: )"/>
70                 <NumericalSpinner gridx="3" gridy="5"
71                           weightx="0"
72                           min-value="0"
73                           max-value="10"
74                           increment="1"
75                           length="2"
76                           listener="ActionListener"
77                           value="{@container_disp_max_depth}">
78                     <actionPerformed choose="container_disp_max_depth">
79                         <xsl:call-template name="context"/>
80                     </actionPerformed>
81                 </NumericalSpinner>
82             </Grid>
83         </Title>
84     </xsl:template>
85
86     <xsl:template match="languages">
87         <xsl:if test="$OS='Windows'">
88             <VSpace height="10"/>
89             <Title text="_(Language setting)">
90                 <Grid>
91                     <Label text="_(Default language: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>
92                     <Panel gridx="2" gridy="1" weightx="1"/>
93                     <Select gridx="3" gridy="1" listener="ActionListener">
94                         <actionPerformed choose="lang">
95                             <xsl:call-template name="context"/>
96                         </actionPerformed>
97                         <xsl:variable name="code" select="@lang"/>
98                         <xsl:for-each select="language">
99                             <option value="{@desc}" key="{@code}">
100                                 <xsl:if test="@code=$SCILAB_LANGUAGE or @code=$code">
101                                     <xsl:attribute name="selected">selected</xsl:attribute>
102                                 </xsl:if>
103                             </option>
104                         </xsl:for-each>
105                     </Select>
106                     <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>
107                     <Panel gridx="2" gridy="2" weightx="1" fill="both"/>
108                 </Grid>
109             </Title>
110         </xsl:if>
111     </xsl:template>
112
113     <xsl:template match="java-heap-memory" mode="tooltip"> and java heap size.</xsl:template>
114     <xsl:template match="java-heap-memory">
115         <VSpace height="10"/>
116         <Title text="_(Java Heap Memory)">
117             <Grid>
118                 <Label text="_(Select the memory (in MB) available in Java: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>
119                 <Panel gridx="2" gridy="1" weightx="1"/>
120                 <NumericalSpinner min-value="0"
121                           increment="128"
122                           length="6"
123                           listener="ActionListener"
124                           value="{@heap-size}"
125                           gridx="3" gridy="1" anchor="baseline" weightx="0">
126                     <actionPerformed choose="heap-size">
127                         <xsl:call-template name="context"/>
128                     </actionPerformed>
129                 </NumericalSpinner>
130                 <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>
131                 <Panel gridx="2" gridy="2" weightx="1" fill="both"/>
132             </Grid>
133         </Title>
134     </xsl:template>
135
136     <xsl:template match="startup">
137         <VSpace height="10"/>
138         <Title text="_(Start-up directory)">
139             <Grid>
140                 <Radiobutton value="{@use}" expected-value="current" listener="ActionListener" text="_(Use current working directory)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
141                     <actionPerformed choose="use">
142                         <xsl:call-template name="context"/>
143                     </actionPerformed>
144                 </Radiobutton>
145
146                 <Radiobutton value="{@use}" expected-value="previous" listener="ActionListener" text="_(Use previous working directory)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west">
147                     <actionPerformed choose="use">
148                         <xsl:call-template name="context"/>
149                     </actionPerformed>
150                 </Radiobutton>
151
152                 <Radiobutton value="{@use}" expected-value="default" listener="ActionListener" text="_(Use default directory)" gridx="1" gridy="3" fill="none" weightx="0" anchor="west">
153                     <actionPerformed choose="use">
154                         <xsl:call-template name="context"/>
155                     </actionPerformed>
156                 </Radiobutton>
157
158                 <FileSelector gridx="2" gridy="3" weightx="1" anchor="above_baseline"
159                               listener="EntryListener"
160                               href="{@default}"
161                               desc="_(Default startup directory)"
162                               dir-selection="true"
163                               check-entry="true">
164                     <xsl:attribute name="enable">
165                         <xsl:if test="@use='default'">
166                             <xsl:text>true</xsl:text>
167                         </xsl:if>
168                     </xsl:attribute>
169                     <entryChanged choose="default">
170                         <xsl:call-template name="context"/>
171                     </entryChanged>
172                 </FileSelector>
173             </Grid>
174         </Title>
175     </xsl:template>
176
177     <xsl:template match="tools">
178         <Title text="_(Confirmation dialogs)">
179             <Grid>
180                 <xsl:for-each select="tool">
181                     <Checkbox
182               gridy="{position() + 1}"
183               gridx="1"
184               listener="ActionListener"
185               checked="{@state}"
186               text="{@description}">
187                         <actionPerformed choose="state">
188                             <xsl:call-template name="context"/>
189                         </actionPerformed>
190                     </Checkbox>
191                 </xsl:for-each>
192             </Grid>
193         </Title>
194     </xsl:template>
195
196     <xsl:template match="layouts">
197         <xsl:variable name="id" select="@id"/>
198         <Title text="_(Desktop Layout)">
199             <Grid>
200                 <Label gridx="1" gridy="1" weightx="0" text="_(Select a layout)"/>
201                 <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
202                 <Select gridx="3" gridy="1" listener="ActionListener">
203                     <actionPerformed choose="id">
204                         <xsl:call-template name="context"/>
205                     </actionPerformed>
206                     <xsl:for-each select="layout">
207                         <option value="{@name}" key="{@id}">
208                             <xsl:if test="@id=$id">
209                                 <xsl:attribute name="selected">selected</xsl:attribute>
210                             </xsl:if>
211                         </option>
212                     </xsl:for-each>
213                 </Select>
214                 <Label text="_((Modifying the layout requires to restart Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>
215                 <Panel gridx="1" gridy="3">
216                     <VSpace height="10"/>
217                 </Panel>
218                 <Image gridx="1" gridy="4" gridwidth="3">
219                     <xsl:attribute name="url">
220                         <xsl:value-of select="layout[@id=$id]/@image"/>
221                     </xsl:attribute>
222                 </Image>
223                 <Panel gridx="1" gridy="5">
224                     <VSpace height="10"/>
225                 </Panel>
226                 <Checkbox gridx="1" gridy="6" weightx="0" text="_(Save layout on exiting)" checked="{@save-desktop}" selected-value="true" unselected-value="false" listener="ActionListener">
227                     <actionPerformed choose="save-desktop">
228                         <xsl:call-template name="context"/>
229                     </actionPerformed>
230                 </Checkbox>
231                 <Button gridx="3" gridy="6" weightx="0" text="_(Reset layout)" listener="ActionListener">
232                     <actionPerformed callback="Reset layout"/>
233                 </Button>
234             </Grid>
235         </Title>
236     </xsl:template>
237
238     <xsl:template match="actions">
239         <xsl:variable name="name" select="@name"/>
240         <xsl:variable name="current-item" select="action-folder[@name=$name]/action[number(@item)]"/>
241         <Title text="_(Keys binding)" fixed-height="false">
242             <VBox fixed-height="false">
243                 <Grid>
244                     <Label gridy="1" gridx="1" gridwidth="2" text="_(Filter on action name: )"/>
245                     <Entry gridy="2" gridx="1" gridwidth="2" text="{@filter}" listener="EntryListener">
246                         <entryChanged choose="filter">
247                             <xsl:call-template name="context"/>
248                         </entryChanged>
249                     </Entry>
250                 </Grid>
251                 <VSpace height="10"/>
252                 <Grid>
253                     <VBox gridx="1" gridy="1" weightx="0" anchor="north">
254                         <Label text="_(Component)"/>
255                         <List item="{@name}" nb-visible-rows="4" listener="ActionListener">
256                             <actionPerformed choose="name">
257                                 <xsl:call-template name="context"/>
258                             </actionPerformed>
259                             <xsl:for-each select="action-folder">
260                                 <listElement name="{@name}"/>
261                             </xsl:for-each>
262                         </List>
263                     </VBox>
264                     <Panel gridx="2" gridy="1" weightx="0" width="30" height="1" fixed-width="true"/>
265                     <Grid gridx="3" gridy="1" weightx="1" anchor="north">
266                         <Label gridx="1" gridy="1" weightx="0" weighty="0" anchor="north" text="_(Name: )"/>
267                         <Label gridx="2" gridy="1" weightx="0" weighty="0" anchor="west">
268                             <xsl:attribute name="text">
269                                 <xsl:value-of select="$current-item/@name"/>
270                             </xsl:attribute>
271                         </Label>
272                         <Label gridx="1" gridy="2" weightx="0" weighty="0" anchor="north" text="_(Description: )"/>
273                         <TextArea gridx="2" gridy="2" weightx="1" weighty="0" anchor="west" editable="false" rows="4">
274                             <xsl:attribute name="text">
275                                 <xsl:value-of select="$current-item/@description"/>
276                             </xsl:attribute>
277                         </TextArea>
278                         <Label gridx="1" gridy="3" weightx="0" weighty="0" anchor="baseline" text="_(Binding: )"/>
279                         <Entry gridx="2" gridy="3" weightx="0" weighty="0" anchor="baseline" listener="EntryListener">
280                             <xsl:attribute name="text">
281                                 <xsl:value-of select="$current-item/@key"/>
282                             </xsl:attribute>
283                             <entryChanged choose="key">
284                                 <xsl:attribute name="context">
285                                     <xsl:for-each select="$current-item/ancestor-or-self::*">
286                                         <xsl:if test="not(.=/)">
287                                             <xsl:value-of select="count(preceding-sibling::*)+1"/>
288                                             <xsl:text>/</xsl:text>
289                                         </xsl:if>
290                                     </xsl:for-each>
291                                 </xsl:attribute>
292                             </entryChanged>
293                         </Entry>
294                     </Grid>
295                 </Grid>
296                 <VSpace height="10"/>
297                 <Table mode="select" listener="TableListener" fixed-height="false">
298                     <!-- we change this useless attribute (which is not an actuator) to force the table reload) -->
299                     <xsl:attribute name="name">
300                         <xsl:value-of select="concat($name,@filter)"/>
301                     </xsl:attribute>
302                     <tableSelect choose="item">
303                         <xsl:call-template name="context"/>
304                     </tableSelect>
305                     <xsl:for-each select="action-folder[@name=$name]/action[contains(
306                                 translate(@name,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
307                                 translate(current()/@filter,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'))]">
308                         <tableRow binding="{@key}" command="{@name}"/>
309                     </xsl:for-each>
310                     <tableCol title="_(Action name)" attr="command"/>
311                     <tableCol title="_(Key binding)" attr="binding"/>
312                 </Table>
313                 <Glue/>
314             </VBox>
315         </Title>
316     </xsl:template>
317
318     <xsl:template match="demos">
319         <Title text="_(Demos)">
320             <Grid>
321                 <Checkbox
322                       gridx="1"
323                       gridy="1"
324                       listener="ActionListener"
325                       checked="{@demoGUIisDockable}"
326                       text="_(The demo interface is dockable)"
327                       >
328                     <actionPerformed choose="demoGUIisDockable">
329                         <xsl:call-template name="context"/>
330                     </actionPerformed>
331                 </Checkbox>
332             </Grid>
333         </Title>
334     </xsl:template>
335 </xsl:stylesheet>