home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / AIMP2 / aimp_2.61.583.exe / $TEMP / YandexPackSetup.msi / fil14CFD8B9BF36C4D7256F6EC35BBD3D0A < prev    next >
Extensible Markup Language  |  2010-07-12  |  13KB  |  322 lines

  1. ∩╗┐<?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE widget SYSTEM "quote.dtd">
  3. <widget icon="icons/quote.png" name="&wgt.quotes.name;" unique="false" xmlns="http://bar.yandex.ru/dev/gui" xmlns:f="http://bar.yandex.ru/dev/functional">
  4.     <f:setting default="&wgt.quotes.default-quote-id;" name="quote-id" scope="instance">
  5.         <control label="&wgt.quotes.settings.id.label;" source="quotelist.xml" template="quotelist.xsl" type="combobox"/>
  6.     </f:setting>
  7.     <f:setting default="15" name="update-interval" scope="widget">
  8.         <control label="&wgt.quotes.settings.interval.label;" label-after="&wgt.quotes.settings.min.label;" max="10000" min="0" spin="5" type="textedit" value-type="int"/>
  9.     </f:setting>
  10.     <f:variable name="update-id" scope="instance"/>
  11.     <f:variable name="throbber-end-time" scope="instance"/>
  12.     <f:data name="quotes-request">
  13.         <f:request>
  14.             <f:param name="url">
  15.                 <f:concat>
  16.                     <f:value type="string">http://export.yandex.ru/bar/quotes.xml?id=</f:value>
  17.                     <f:value-of name="quote-id"/>
  18.                 </f:concat>
  19.             </f:param>
  20.             <f:param name="update">
  21.                 <f:mul>
  22.                     <f:value-of name="update-interval"/>
  23.                     <f:value type="number">60</f:value>
  24.                 </f:mul>
  25.             </f:param>
  26.             <f:param name="expire">
  27.                 <f:value type="number">172800</f:value>
  28.             </f:param>
  29.         </f:request>
  30.     </f:data>
  31.     <f:data name="quotes">
  32.         <f:content>
  33.             <f:value-of name="quotes-request"/>
  34.         </f:content>
  35.     </f:data>
  36.     <f:data name="value">
  37.         <f:xpath>
  38.             <f:value type="string">number(quotes/quote/value)</f:value>
  39.             <f:value-of name="quotes"/>
  40.         </f:xpath>
  41.     </f:data>
  42.     <f:data name="change">
  43.         <f:xpath>
  44.             <f:value type="string">number(quotes/quote/change)</f:value>
  45.             <f:value-of name="quotes"/>
  46.         </f:xpath>
  47.     </f:data>
  48.     <f:data name="tomorrow-node">
  49.         <f:xpath>
  50.             <f:value type="string">quotes/quote/tomorrow</f:value>
  51.             <f:value-of name="quotes"/>
  52.         </f:xpath>
  53.     </f:data>
  54.     <f:data name="tomorrow">
  55.         <f:xpath>
  56.             <f:value type="string">number(quotes/quote/tomorrow)</f:value>
  57.             <f:value-of name="quotes"/>
  58.         </f:xpath>
  59.     </f:data>
  60.     <f:data name="tomorrow-change">
  61.         <f:xpath>
  62.             <f:value type="string">number(quotes/quote/tomorrowchange)</f:value>
  63.             <f:value-of name="quotes"/>
  64.         </f:xpath>
  65.     </f:data>
  66.     <f:data name="change-color">
  67.         <f:if>
  68.             <f:lt>
  69.                 <f:value-of name="change"/>
  70.                 <f:value type="number">0</f:value>
  71.             </f:lt>
  72.             <f:value type="string">#802020</f:value>
  73.             <f:if>
  74.                 <f:gt>
  75.                     <f:value-of name="change"/>
  76.                     <f:value type="number">0</f:value>
  77.                 </f:gt>
  78.                 <f:value type="string">#208020</f:value>
  79.                 <f:value type="string">#000000</f:value>
  80.             </f:if>
  81.         </f:if>
  82.     </f:data>
  83.     <f:data name="has-data">
  84.         <f:try>
  85.             <f:not-equal>
  86.                 <f:value-of name="value"/>
  87.                 <f:value type="string"/>
  88.             </f:not-equal>
  89.             <f:param name="...">
  90.                 <f:value type="bool">false</f:value>
  91.             </f:param>
  92.         </f:try>
  93.     </f:data>
  94.     <f:data name="quote-list">
  95.         <f:coalesce>
  96.             <f:content>
  97.                 <f:request>
  98.                     <f:param name="url">
  99.                         <f:value type="string">http://export.yandex.ru/bar/quotelist.xml</f:value>
  100.                     </f:param>
  101.                     <f:param name="update">
  102.                         <f:value type="number">2592000</f:value>
  103.                     </f:param>
  104.                     <f:param name="expire">
  105.                         <f:value type="number">946080000</f:value>
  106.                     </f:param>
  107.                 </f:request>
  108.             </f:content>
  109.             <f:file>
  110.                 <f:param name="type">
  111.                     <f:value type="string">xml</f:value>
  112.                 </f:param>
  113.                 <f:param name="path">
  114.                     <f:value type="string">quotelist.xml</f:value>
  115.                 </f:param>
  116.             </f:file>
  117.         </f:coalesce>
  118.     </f:data>
  119.     <f:data name="precision">
  120.         <f:xpath>
  121.             <f:concat>
  122.                 <f:value type="string">number(//quote[@id='</f:value>
  123.                 <f:value-of name="quote-id"/>
  124.                 <f:value type="string">']/precision)</f:value>
  125.             </f:concat>
  126.             <f:value-of name="quote-list"/>
  127.         </f:xpath>
  128.     </f:data>
  129.     <button>
  130.         <f:optional>
  131.             <f:not>
  132.                 <f:or>
  133.                     <f:is-empty>
  134.                         <f:value-of name="update-id"/>
  135.                     </f:is-empty>
  136.                     <f:and>
  137.                         <f:finished>
  138.                             <f:value-of name="update-id"/>
  139.                         </f:finished>
  140.                         <f:time-arrived>
  141.                             <f:value-of name="throbber-end-time"/>
  142.                         </f:time-arrived>
  143.                     </f:and>
  144.                 </f:or>
  145.             </f:not>
  146.             <icon>xb://toolkit/images/throbber.gif</icon>
  147.         </f:optional>
  148.         <text>
  149.             <f:xpath>
  150.                 <f:concat>
  151.                     <f:value type="string">string(//quote[@id='</f:value>
  152.                     <f:value-of name="quote-id"/>
  153.                     <f:value type="string">']/shortname)</f:value>
  154.                 </f:concat>
  155.                 <f:value-of name="quote-list"/>
  156.             </f:xpath>
  157.             <f:optional>
  158.                 <f:value-of name="has-data"/>
  159.                 <style font-weight="bold">
  160.                     <f:concat>
  161.                         <f:value type="string">┬á</f:value>
  162.                         <f:format-number>
  163.                             <f:value-of name="value"/>
  164.                             <f:param name="precision">
  165.                                 <f:value type="number">2</f:value>
  166.                             </f:param>
  167.                             <f:param name="separate-groups">
  168.                                 <f:value type="bool">false</f:value>
  169.                             </f:param>
  170.                         </f:format-number>
  171.                     </f:concat>
  172.                     <attribute name="color">
  173.                         <f:value-of name="change-color"/>
  174.                     </attribute>
  175.                 </style>
  176.             </f:optional>
  177.         </text>
  178.         <tooltip>
  179.             <f:optional>
  180.                 <f:value-of name="has-data"/>
  181.                 <grid>
  182.                     <row>
  183.                         <cell h-align="center">
  184.                             <style font-weight="bold">
  185.                                 <f:xpath>
  186.                                     <f:concat>
  187.                                         <f:value type="string">string(//quote[@id='</f:value>
  188.                                         <f:value-of name="quote-id"/>
  189.                                         <f:value type="string">']/name)</f:value>
  190.                                     </f:concat>
  191.                                     <f:value-of name="quote-list"/>
  192.                                 </f:xpath>
  193.                             </style>
  194.                         </cell>
  195.                         <cell merge-left="true"/>
  196.                     </row>
  197.                     <row>
  198.                         <cell h-align="right">&wgt.quotes.tooltip.today;:</cell>
  199.                         <cell>
  200.                             <f:concat>
  201.                                 <f:format-number>
  202.                                     <f:value-of name="value"/>
  203.                                     <f:param name="precision">
  204.                                         <f:value-of name="precision"/>
  205.                                     </f:param>
  206.                                 </f:format-number>
  207.                                 <f:value type="string">┬á(</f:value>
  208.                                 <f:format-number>
  209.                                     <f:value-of name="change"/>
  210.                                     <f:param name="precision">
  211.                                         <f:value-of name="precision"/>
  212.                                     </f:param>
  213.                                     <f:param name="positive-sign">
  214.                                         <f:value type="bool">true</f:value>
  215.                                     </f:param>
  216.                                 </f:format-number>
  217.                                 <f:value type="string">)</f:value>
  218.                             </f:concat>
  219.                         </cell>
  220.                     </row>
  221.                     <f:optional>
  222.                         <f:value-of name="tomorrow-node"/>
  223.                         <row>
  224.                             <cell h-align="right">&wgt.quotes.tooltip.tomorrow;:</cell>
  225.                             <cell>
  226.                                 <f:concat>
  227.                                     <f:format-number>
  228.                                         <f:value-of name="tomorrow"/>
  229.                                         <f:param name="precision">
  230.                                             <f:value-of name="precision"/>
  231.                                         </f:param>
  232.                                     </f:format-number>
  233.                                     <f:value type="string">┬á(</f:value>
  234.                                     <f:format-number>
  235.                                         <f:value-of name="tomorrow-change"/>
  236.                                         <f:param name="precision">
  237.                                             <f:value-of name="precision"/>
  238.                                         </f:param>
  239.                                         <f:param name="positive-sign">
  240.                                             <f:value type="bool">true</f:value>
  241.                                         </f:param>
  242.                                     </f:format-number>
  243.                                     <f:value type="string">)</f:value>
  244.                                 </f:concat>
  245.                             </cell>
  246.                         </row>
  247.                     </f:optional>
  248.                 </grid>
  249.             </f:optional>
  250.             <f:optional>
  251.                 <f:not>
  252.                     <f:value-of name="has-data"/>
  253.                 </f:not>
  254.                 <style>&wgt.quotes.nodata;</style>
  255.             </f:optional>
  256.         </tooltip>
  257.         <action>
  258.             <f:navigate action="2120">
  259.                 <f:xpath>
  260.                     <f:concat>
  261.                         <f:value type="string">string(//quote[@id='</f:value>
  262.                         <f:value-of name="quote-id"/>
  263.                         <f:value type="string">']/url)</f:value>
  264.                     </f:concat>
  265.                     <f:value-of name="quote-list"/>
  266.                 </f:xpath>
  267.             </f:navigate>
  268.         </action>
  269.         <menu>
  270.             <menuitem>
  271.                 <text>&wgt.quotes.refresh;</text>
  272.                 <action>
  273.                     <f:assign name="update-id">
  274.                         <f:update>
  275.                             <f:value-of name="quotes-request"/>
  276.                         </f:update>
  277.                     </f:assign>
  278.                     <f:assign name="throbber-end-time">
  279.                         <f:add>
  280.                             <f:timestamp/>
  281.                             <f:value type="number">1.5</f:value>
  282.                         </f:add>
  283.                     </f:assign>
  284.                 </action>
  285.             </menuitem>
  286.             <separator/>
  287.             <menuitem>
  288.                 <text>&wgt.quotes.copy;</text>
  289.                 <action>
  290.                     <f:copy-to-clipboard>
  291.                         <f:format-number>
  292.                             <f:value-of name="value"/>
  293.                             <f:param name="separate-groups">
  294.                                 <f:value type="bool">false</f:value>
  295.                             </f:param>
  296.                         </f:format-number>
  297.                     </f:copy-to-clipboard>
  298.                 </action>
  299.             </menuitem>
  300.             <separator/>
  301.             <menuitem>
  302.                 <text>&wgt.quotes.change;</text>
  303.                 <action>
  304.                     <f:setup-widget/>
  305.                 </action>
  306.             </menuitem>
  307.             <menuitem>
  308.                 <text>&wgt.quotes.delete;</text>
  309.                 <action>
  310.                     <f:remove-widget/>
  311.                 </action>
  312.             </menuitem>
  313.             <menuitem>
  314.                 <text>&wgt.quotes.add;</text>
  315.                 <action>
  316.                     <f:add-widget/>
  317.                 </action>
  318.             </menuitem>
  319.         </menu>
  320.     </button>
  321. </widget>
  322.