<?xml version="1.0"?>

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Adblock Plus.
   -
   - The Initial Developer of the Original Code is
   - Wladimir Palant.
   - Portions created by the Initial Developer are Copyright (C) 2006-2009
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   - 2009: Wang Congming <lovelywcm@gmail.com> Modified for AutoProxy.
   -
   - ***** END LICENSE BLOCK ***** -->

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://autoproxy/skin/tip_subscriptions.css" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://autoproxy/locale/tip_subscriptions.dtd">

<dialog
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  buttons="accept,cancel,extra2"
  buttonlabelextra2="&other.label;"
  buttonaccesskeyextra2="&other.accesskey;"
  title="&subscribe.title;"
  welcome="&welcome.title;"
  id="aupTipSubscriptions"
  windowtype="aup:tip:subscriptions"
  width="550"
  height="400"
  onload="init()"
  ondialogaccept="subscribeAndSetDefault()"
  ondialogextra2="addOther()">

<script type="application/x-javascript;version=1.7" src="utils.js"/>
<script type="application/x-javascript;version=1.7" src="tip_subscriptions.js"/>

<hbox>
  <vbox flex="1">
    <description id="description-par1">&description.par1;</description>
    <description id="description-par2">&description.par2;</description>
    <description id="description-par3">&description.par3;</description>
    <description id="description-par4">&description.par4;</description>
  </vbox>
  <vbox>
    <vbox flex="1" pack="center">
      <hbox pack="center">
        <image id="icon"/>
      </hbox>
    </vbox>
    <description class="fulllist" _url="https://autoproxy.org/subscriptions" tooltiptext="https://autoproxy.org/subscriptions" value="&full-list.label;" onclick="aup.loadInBrowser(this.getAttribute('_url'))"/>
  </vbox>
</hbox>

<radiogroup id="subscriptions" flex="1" onkeypress="return handleKeyPress(event)" oncommand="handleCommand(event)">
  <scrollbox id="subscriptionsScrollbox" flex="1" orient="vertical" datasources="subscriptions.xml" ref="*" querytype="xml">
    <template>
      <hbox uri="?" class="container" align="center">
        <radio _title="?title" _url="?url"/>
        <vbox flex="1" onclick="this.previousSibling.radioGroup.selectedItem = this.previousSibling;">
          <hbox>
            <description class="title" value="?title" flex="1"/>
            <description class="homepage" _url="?homepage" tooltiptext="?homepage" value="&homepage.label;" onclick="aup.loadInBrowser(this.getAttribute('_url'));event.stopPropagation();"/>
          </hbox>
          <hbox pack="start">
            <description class="location" value="?url" onclick="aup.loadInBrowser(this.getAttribute('value'));event.stopPropagation();"/>
          </hbox>
        </vbox>
      </hbox>
    </template>
  </scrollbox>
  <description id="note">&note;</description>
</radiogroup>
<hbox>
  <hbox>
    <button dlgtype="extra2"/>
    <button type="menu" id="defaultButton" label="&defaultBtn.label;"
            accesskey="&defaultBtn.accesskey;" customLabel="&defaultBtn.custom;">
      <menupopup></menupopup>
    </button>
  </hbox>
  <hbox>
    <button dlgtype="cancel"/>
    <button dlgtype="accept" id="acceptButton" label2="&acceptBtn.label;" accesskey2="&acceptBtn.accesskey;"/>
  </hbox>
</hbox>
</dialog>
