Bug 11628 fixed: update on the fly the shortuts in prefereces 26/8526/2
Calixte DENIZET [Fri, 3 Aug 2012 14:58:51 +0000 (16:58 +0200)]
Change-Id: Ic439f2d25acf54f08db8fe6827d9642caa4aa756

scilab/CHANGES_5.4.X
scilab/modules/console/etc/XConfiguration-general.xsl

index 173f05a..2513a08 100644 (file)
@@ -32,6 +32,7 @@ Bug Fixes
 
 * Bug #11618 fixed - A(:) returned wrong values when A was a complex sparse matrix.
 
+* Bug #11628 fixed - Clearing a shortcut did not work is Preferences.
 
 
 
index 242350d..4fd1924 100644 (file)
 <xsl:stylesheet version ="1.0"\r
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
                 >\r
-    <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\r
-                      ::\r
-                      ::     M A I N   P A N E L :   G E N E R A L\r
-                      ::\r
-                 -->\r
-    <xsl:template match="environment" mode="tooltip">Settings environment</xsl:template>\r
-    <xsl:template match="environment">\r
-        <Title text="Environment">\r
-            <Grid>\r
-                <Label gridx="1" gridy="1" weightx="0" text="_(Floating point exception (ieee): )"/>\r
-                <Panel gridx="2" gridy="1" weightx="1"/>\r
-                <Select gridx="3" gridy="1" listener="ActionListener">\r
-                    <xsl:variable name="fpe" select="@fpe"/>\r
-                    <actionPerformed choose="fpe">\r
-                        <xsl:call-template name="context"/>\r
-                    </actionPerformed>\r
-                    <xsl:for-each select="fpe">\r
-                        <option value="{@floating-point-exception}" key="{@code}">\r
-                            <xsl:if test="@code=$fpe">\r
-                                <xsl:attribute name="selected">selected</xsl:attribute>\r
-                            </xsl:if>\r
-                        </option>\r
-                    </xsl:for-each>\r
-                </Select>\r
+  <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\r
+       ::\r
+       ::     M A I N   P A N E L :   G E N E R A L\r
+       ::\r
+  -->\r
+  <xsl:template match="environment" mode="tooltip">Settings environment</xsl:template>\r
+  <xsl:template match="environment">\r
+    <Title text="Environment">\r
+      <Grid>\r
+        <Label gridx="1" gridy="1" weightx="0" text="_(Floating point exception (ieee): )"/>\r
+        <Panel gridx="2" gridy="1" weightx="1"/>\r
+        <Select gridx="3" gridy="1" listener="ActionListener">\r
+          <xsl:variable name="fpe" select="@fpe"/>\r
+          <actionPerformed choose="fpe">\r
+            <xsl:call-template name="context"/>\r
+          </actionPerformed>\r
+          <xsl:for-each select="fpe">\r
+            <option value="{@floating-point-exception}" key="{@code}">\r
+              <xsl:if test="@code=$fpe">\r
+                <xsl:attribute name="selected">selected</xsl:attribute>\r
+              </xsl:if>\r
+            </option>\r
+          </xsl:for-each>\r
+        </Select>\r
 \r
-                <Label gridx="1" gridy="2" weightx="0" text="_(Printing format: )"/>\r
-                <Select gridx="3" gridy="2" listener="ActionListener">\r
-                    <xsl:variable name="pf" select="@printing-format"/>\r
-                    <actionPerformed choose="printing-format">\r
-                        <xsl:call-template name="context"/>\r
-                    </actionPerformed>\r
-                    <xsl:for-each select="printing-format">\r
-                        <option value="{@format}" key="{@code}">\r
-                            <xsl:if test="@code=$pf">\r
-                                <xsl:attribute name="selected">selected</xsl:attribute>\r
-                            </xsl:if>\r
-                        </option>\r
-                    </xsl:for-each>\r
-                </Select>\r
-                <Label gridx="1" gridy="3" weightx="0" text="_(Width: )"/>\r
-                <NumericalSpinner gridx="3"\r
-                                  gridy="3"\r
-                                  weightx="0"\r
-                                  min-value="2"\r
-                                  max-value="25"\r
-                                  increment="1"\r
-                                  length="3"\r
-                                  listener="ActionListener"\r
-                                  value="{@width}">\r
-                    <actionPerformed choose="width">\r
-                        <xsl:call-template name="context"/>\r
-                    </actionPerformed>\r
-                </NumericalSpinner>\r
-            </Grid>\r
-        </Title>\r
-    </xsl:template>\r
+        <Label gridx="1" gridy="2" weightx="0" text="_(Printing format: )"/>\r
+        <Select gridx="3" gridy="2" listener="ActionListener">\r
+          <xsl:variable name="pf" select="@printing-format"/>\r
+          <actionPerformed choose="printing-format">\r
+            <xsl:call-template name="context"/>\r
+          </actionPerformed>\r
+          <xsl:for-each select="printing-format">\r
+            <option value="{@format}" key="{@code}">\r
+              <xsl:if test="@code=$pf">\r
+                <xsl:attribute name="selected">selected</xsl:attribute>\r
+              </xsl:if>\r
+            </option>\r
+          </xsl:for-each>\r
+        </Select>\r
+        <Label gridx="1" gridy="3" weightx="0" text="_(Width: )"/>\r
+        <NumericalSpinner gridx="3"\r
+                          gridy="3"\r
+                          weightx="0"\r
+                          min-value="2"\r
+                          max-value="25"\r
+                          increment="1"\r
+                          length="3"\r
+                          listener="ActionListener"\r
+                          value="{@width}">\r
+          <actionPerformed choose="width">\r
+            <xsl:call-template name="context"/>\r
+          </actionPerformed>\r
+        </NumericalSpinner>\r
+      </Grid>\r
+    </Title>\r
+  </xsl:template>\r
 \r
-    <xsl:template match="languages">\r
-        <xsl:if test="$OS='Windows'">\r
-            <VSpace height="10"/>\r
-            <Title text="_(Language setting)">\r
-                <Grid>\r
-                    <Label text="_(Default language: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>\r
-                    <Panel gridx="2" gridy="1" weightx="1"/>\r
-                    <Select gridx="3" gridy="1" listener="ActionListener">\r
-                        <actionPerformed choose="lang">\r
-                            <xsl:call-template name="context"/>\r
-                        </actionPerformed>\r
-                        <xsl:variable name="code" select="@lang"/>\r
-                        <xsl:for-each select="language">\r
-                            <option value="{@desc}" key="{@code}">\r
-                                <xsl:if test="@code=$SCILAB_LANGUAGE or @code=$code">\r
-                                    <xsl:attribute name="selected">selected</xsl:attribute>\r
-                                </xsl:if>\r
-                            </option>\r
-                        </xsl:for-each>\r
-                    </Select>\r
-                    <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
-                    <Panel gridx="2" gridy="2" weightx="1" fill="both"/>\r
-                </Grid>\r
-            </Title>\r
-        </xsl:if>\r
-    </xsl:template>\r
+  <xsl:template match="languages">\r
+    <xsl:if test="$OS='Windows'">\r
+      <VSpace height="10"/>\r
+      <Title text="_(Language setting)">\r
+        <Grid>\r
+          <Label text="_(Default language: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>\r
+          <Panel gridx="2" gridy="1" weightx="1"/>\r
+          <Select gridx="3" gridy="1" listener="ActionListener">\r
+            <actionPerformed choose="lang">\r
+              <xsl:call-template name="context"/>\r
+            </actionPerformed>\r
+            <xsl:variable name="code" select="@lang"/>\r
+            <xsl:for-each select="language">\r
+              <option value="{@desc}" key="{@code}">\r
+                <xsl:if test="@code=$SCILAB_LANGUAGE or @code=$code">\r
+                  <xsl:attribute name="selected">selected</xsl:attribute>\r
+                </xsl:if>\r
+              </option>\r
+            </xsl:for-each>\r
+          </Select>\r
+          <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
+          <Panel gridx="2" gridy="2" weightx="1" fill="both"/>\r
+        </Grid>\r
+      </Title>\r
+    </xsl:if>\r
+  </xsl:template>\r
 \r
-    <xsl:template match="java-heap-memory" mode="tooltip"> and java heap size.</xsl:template>\r
-    <xsl:template match="java-heap-memory">\r
-        <VSpace height="10"/>\r
-        <Title text="_(Java Heap Memory)">\r
-            <Grid>\r
-                <Label text="_(Select the memory (in MB) available in Java: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>\r
-                <Panel gridx="2" gridy="1" weightx="1"/>\r
-                <NumericalSpinner min-value="0"\r
-                                  increment="128"\r
-                                  length="6"\r
-                                  listener="ActionListener"\r
-                                  value="{@heap-size}"\r
-                                  gridx="3" gridy="1" anchor="baseline" weightx="0">\r
-                    <actionPerformed choose="heap-size">\r
-                        <xsl:call-template name="context"/>\r
-                    </actionPerformed>\r
-                </NumericalSpinner>\r
-                <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
-                <Panel gridx="2" gridy="2" weightx="1" fill="both"/>\r
-            </Grid>\r
-        </Title>\r
+  <xsl:template match="java-heap-memory" mode="tooltip"> and java heap size.</xsl:template>\r
+  <xsl:template match="java-heap-memory">\r
+    <VSpace height="10"/>\r
+    <Title text="_(Java Heap Memory)">\r
+      <Grid>\r
+        <Label text="_(Select the memory (in MB) available in Java: )" gridx="1" gridy="1" anchor="baseline" weightx="0"/>\r
+        <Panel gridx="2" gridy="1" weightx="1"/>\r
+        <NumericalSpinner min-value="0"\r
+                          increment="128"\r
+                          length="6"\r
+                          listener="ActionListener"\r
+                          value="{@heap-size}"\r
+                          gridx="3" gridy="1" anchor="baseline" weightx="0">\r
+          <actionPerformed choose="heap-size">\r
+            <xsl:call-template name="context"/>\r
+          </actionPerformed>\r
+        </NumericalSpinner>\r
+        <Label text="_((This requires a restart of Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
+        <Panel gridx="2" gridy="2" weightx="1" fill="both"/>\r
+      </Grid>\r
+    </Title>\r
 \r
-    </xsl:template>\r
+  </xsl:template>\r
 \r
-    <xsl:template match="tools">\r
-        <Title text="_(Confirmation dialogs)">\r
-            <Grid>\r
-                <xsl:for-each select="tool">\r
-                    <Checkbox\r
-                        gridy="{position() + 1}"\r
-                        gridx="1"\r
-                        listener="ActionListener"\r
-                        checked="{@state}"\r
-                        text="{@description}">\r
-                        <actionPerformed choose="state">\r
-                            <xsl:call-template name="context"/>\r
-                        </actionPerformed>\r
-                    </Checkbox>\r
-                </xsl:for-each>\r
-            </Grid>\r
-        </Title>\r
-    </xsl:template>\r
+  <xsl:template match="tools">\r
+    <Title text="_(Confirmation dialogs)">\r
+      <Grid>\r
+        <xsl:for-each select="tool">\r
+          <Checkbox\r
+              gridy="{position() + 1}"\r
+              gridx="1"\r
+              listener="ActionListener"\r
+              checked="{@state}"\r
+              text="{@description}">\r
+            <actionPerformed choose="state">\r
+              <xsl:call-template name="context"/>\r
+            </actionPerformed>\r
+          </Checkbox>\r
+        </xsl:for-each>\r
+      </Grid>\r
+    </Title>\r
+  </xsl:template>\r
 \r
-    <xsl:template match="layouts">\r
-        <xsl:variable name="id" select="@id"/>\r
-        <Title text="_(Desktop Layout)">\r
-            <Grid>\r
-                <Label gridx="1" gridy="1" weightx="0" text="_(Select a layout)"/>\r
-                <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>\r
-               <Select gridx="3" gridy="1" listener="ActionListener">\r
-                    <actionPerformed choose="id">\r
-                        <xsl:call-template name="context"/>\r
-                    </actionPerformed>\r
-                    <xsl:for-each select="layout">\r
-                        <option value="{@name}" key="{@id}">\r
-                            <xsl:if test="@id=$id">\r
-                                <xsl:attribute name="selected">selected</xsl:attribute>\r
-                            </xsl:if>\r
-                        </option>\r
-                    </xsl:for-each>\r
-                </Select>\r
-                <Label text="_((Modify the layout requires to restart Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
-                <Panel gridx="1" gridy="3">\r
-                    <VSpace height="10"/>\r
-                </Panel>\r
-                <Image gridx="1" gridy="4" gridwidth="3">\r
-                    <xsl:attribute name="url">\r
-                        <xsl:value-of select="layout[@id=$id]/@image"/>\r
-                    </xsl:attribute>\r
-                </Image>\r
+  <xsl:template match="layouts">\r
+    <xsl:variable name="id" select="@id"/>\r
+    <Title text="_(Desktop Layout)">\r
+      <Grid>\r
+        <Label gridx="1" gridy="1" weightx="0" text="_(Select a layout)"/>\r
+        <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>\r
+        <Select gridx="3" gridy="1" listener="ActionListener">\r
+          <actionPerformed choose="id">\r
+            <xsl:call-template name="context"/>\r
+          </actionPerformed>\r
+          <xsl:for-each select="layout">\r
+            <option value="{@name}" key="{@id}">\r
+              <xsl:if test="@id=$id">\r
+                <xsl:attribute name="selected">selected</xsl:attribute>\r
+              </xsl:if>\r
+            </option>\r
+          </xsl:for-each>\r
+        </Select>\r
+        <Label text="_((Modify the layout requires to restart Scilab))" font-face="bold" gridx="1" gridy="2" anchor="west" weightx="0"/>\r
+        <Panel gridx="1" gridy="3">\r
+          <VSpace height="10"/>\r
+        </Panel>\r
+        <Image gridx="1" gridy="4" gridwidth="3">\r
+          <xsl:attribute name="url">\r
+            <xsl:value-of select="layout[@id=$id]/@image"/>\r
+          </xsl:attribute>\r
+        </Image>\r
 \r
-            </Grid>\r
-        </Title>\r
-    </xsl:template>\r
+      </Grid>\r
+    </Title>\r
+  </xsl:template>\r
 \r
-    <xsl:template match="actions">\r
-        <xsl:variable name="name" select="@name"/>\r
-        <xsl:variable name="current-item" select="action-folder[@name=$name]/action[number(@item)]"/>\r
-        <Title text="_(Keys binding)" fixed-height="false">\r
-            <VBox fixed-height="false">\r
-                <Grid>\r
-                    <Label gridy="1" gridx="1" gridwidth="2" text="_(Filter on action name: )"/>\r
-                    <Entry gridy="2" gridx="1" gridwidth="2" text="{@filter}" listener="EntryListener">\r
-                        <entryChanged choose="filter">\r
-                            <xsl:call-template name="context"/>\r
-                        </entryChanged>\r
-                    </Entry>\r
-                </Grid>\r
-                <VSpace height="10"/>\r
-                <Grid>\r
-                    <VBox gridx="1" gridy="1" weightx="0" anchor="north">\r
-                        <Label text="_(Component)"/>\r
-                        <List item="{@name}" nb-visible-rows="4" listener="ActionListener">\r
-                            <actionPerformed choose="name">\r
-                                <xsl:call-template name="context"/>\r
-                            </actionPerformed>\r
-                            <xsl:for-each select="action-folder">\r
-                                <listElement name="{@name}"/>\r
-                            </xsl:for-each>\r
-                        </List>\r
-                    </VBox>\r
-                    <Panel gridx="2" gridy="1" weightx="0" width="30" height="1" fixed-width="true"/>\r
-                    <Grid gridx="3" gridy="1" weightx="1" anchor="north">\r
-                        <Label gridx="1" gridy="1" weightx="0" weighty="0" anchor="north" text="_(Name: )"/>\r
-                        <Label gridx="2" gridy="1" weightx="0" weighty="0" anchor="west">\r
-                            <xsl:attribute name="text">\r
-                                <xsl:value-of select="$current-item/@name"/>\r
-                            </xsl:attribute>\r
-                        </Label>\r
-                        <Label gridx="1" gridy="2" weightx="0" weighty="0" anchor="north" text="_(Description: )"/>\r
-                        <TextArea gridx="2" gridy="2" weightx="1" weighty="0" anchor="west" editable="false" rows="4">\r
-                            <xsl:attribute name="text">\r
-                                <xsl:value-of select="$current-item/@description"/>\r
-                            </xsl:attribute>\r
-                        </TextArea>\r
-                        <Label gridx="1" gridy="3" weightx="0" weighty="0" anchor="baseline" text="_(Binding: )"/>\r
-                        <Entry gridx="2" gridy="3" weightx="0" weighty="0" anchor="baseline" listener="ActionListener">\r
-                            <xsl:attribute name="text">\r
-                                <xsl:value-of select="$current-item/@key"/>\r
-                            </xsl:attribute>\r
-                            <actionPerformed choose="key">\r
-                                <xsl:attribute name="context">\r
-                                    <xsl:for-each select="$current-item/ancestor-or-self::*">\r
-                                        <xsl:if test="not(.=/)">\r
-                                            <xsl:value-of select="count(preceding-sibling::*)+1"/>\r
-                                            <xsl:text>/</xsl:text>\r
-                                        </xsl:if>\r
-                                    </xsl:for-each>\r
-                                </xsl:attribute>\r
-                            </actionPerformed>\r
-                        </Entry>\r
-                    </Grid>\r
-                </Grid>\r
-                <VSpace height="10"/>\r
-                <Table mode="select" listener="TableListener" fixed-height="false">\r
-                    <!-- we change this useless attribute (which is not an actuator) to force the table reload) -->\r
-                    <xsl:attribute name="name">\r
-                        <xsl:value-of select="concat($name,@filter)"/>\r
-                    </xsl:attribute>\r
-                    <tableSelect choose="item">\r
-                        <xsl:call-template name="context"/>\r
-                    </tableSelect>\r
-                    <xsl:for-each select="action-folder[@name=$name]/action[contains(\r
+  <xsl:template match="actions">\r
+    <xsl:variable name="name" select="@name"/>\r
+    <xsl:variable name="current-item" select="action-folder[@name=$name]/action[number(@item)]"/>\r
+    <Title text="_(Keys binding)" fixed-height="false">\r
+      <VBox fixed-height="false">\r
+        <Grid>\r
+          <Label gridy="1" gridx="1" gridwidth="2" text="_(Filter on action name: )"/>\r
+          <Entry gridy="2" gridx="1" gridwidth="2" text="{@filter}" listener="EntryListener">\r
+            <entryChanged choose="filter">\r
+              <xsl:call-template name="context"/>\r
+            </entryChanged>\r
+          </Entry>\r
+        </Grid>\r
+        <VSpace height="10"/>\r
+        <Grid>\r
+          <VBox gridx="1" gridy="1" weightx="0" anchor="north">\r
+            <Label text="_(Component)"/>\r
+            <List item="{@name}" nb-visible-rows="4" listener="ActionListener">\r
+              <actionPerformed choose="name">\r
+                <xsl:call-template name="context"/>\r
+              </actionPerformed>\r
+              <xsl:for-each select="action-folder">\r
+                <listElement name="{@name}"/>\r
+              </xsl:for-each>\r
+            </List>\r
+          </VBox>\r
+          <Panel gridx="2" gridy="1" weightx="0" width="30" height="1" fixed-width="true"/>\r
+          <Grid gridx="3" gridy="1" weightx="1" anchor="north">\r
+            <Label gridx="1" gridy="1" weightx="0" weighty="0" anchor="north" text="_(Name: )"/>\r
+            <Label gridx="2" gridy="1" weightx="0" weighty="0" anchor="west">\r
+              <xsl:attribute name="text">\r
+                <xsl:value-of select="$current-item/@name"/>\r
+              </xsl:attribute>\r
+            </Label>\r
+            <Label gridx="1" gridy="2" weightx="0" weighty="0" anchor="north" text="_(Description: )"/>\r
+            <TextArea gridx="2" gridy="2" weightx="1" weighty="0" anchor="west" editable="false" rows="4">\r
+              <xsl:attribute name="text">\r
+                <xsl:value-of select="$current-item/@description"/>\r
+              </xsl:attribute>\r
+            </TextArea>\r
+            <Label gridx="1" gridy="3" weightx="0" weighty="0" anchor="baseline" text="_(Binding: )"/>\r
+            <Entry gridx="2" gridy="3" weightx="0" weighty="0" anchor="baseline" listener="EntryListener">\r
+              <xsl:attribute name="text">\r
+                <xsl:value-of select="$current-item/@key"/>\r
+              </xsl:attribute>\r
+              <entryChanged choose="key">\r
+                <xsl:attribute name="context">\r
+                  <xsl:for-each select="$current-item/ancestor-or-self::*">\r
+                    <xsl:if test="not(.=/)">\r
+                      <xsl:value-of select="count(preceding-sibling::*)+1"/>\r
+                      <xsl:text>/</xsl:text>\r
+                    </xsl:if>\r
+                  </xsl:for-each>\r
+                </xsl:attribute>\r
+              </entryChanged>\r
+            </Entry>\r
+          </Grid>\r
+        </Grid>\r
+        <VSpace height="10"/>\r
+        <Table mode="select" listener="TableListener" fixed-height="false">\r
+          <!-- we change this useless attribute (which is not an actuator) to force the table reload) -->\r
+          <xsl:attribute name="name">\r
+            <xsl:value-of select="concat($name,@filter)"/>\r
+          </xsl:attribute>\r
+          <tableSelect choose="item">\r
+            <xsl:call-template name="context"/>\r
+          </tableSelect>\r
+          <xsl:for-each select="action-folder[@name=$name]/action[contains(\r
                                 translate(@name,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),\r
                                 translate(current()/@filter,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'))]">\r
-                        <tableRow binding="{@key}" command="{@name}"/>\r
-                    </xsl:for-each>\r
-                    <tableCol title="_(Action name)" attr="command"/>\r
-                    <tableCol title="_(Key binding)" attr="binding"/>\r
-                </Table>\r
-                <Glue/>\r
-            </VBox>\r
-        </Title>\r
-    </xsl:template>\r
+            <tableRow binding="{@key}" command="{@name}"/>\r
+          </xsl:for-each>\r
+          <tableCol title="_(Action name)" attr="command"/>\r
+          <tableCol title="_(Key binding)" attr="binding"/>\r
+        </Table>\r
+        <Glue/>\r
+      </VBox>\r
+    </Title>\r
+  </xsl:template>\r
 </xsl:stylesheet>\r