<?xml version="1.0"?>

<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messenger-newsblog/skin/feed-subscriptions.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://messenger-newsblog/locale/feed-subscriptions.dtd">

<window id="subscriptionsDialog"
        title="&feedSubscriptions.label;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        style="width: 30em; height: 25em;"
        persist="width height"
        onload="gFeedSubscriptionsWindow.init();"
        onunload="return gFeedSubscriptionsWindow.uninit();"
        windowtype="Mail:News-BlogSubscriptions"
        flex="1">

  <script type="application/javascript" src="utils.js"/>
  <script type="application/javascript" src="file-utils.js"/>
  <script type="application/javascript" src="debug-utils.js"/>
  <script type="application/javascript" src="feed-subscriptions.js"/>
  <script type="application/javascript" src="Feed.js"/>
  <script type="application/javascript" src="FeedItem.js"/>
  <script type="application/javascript" src="feed-parser.js"/>
  <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>

  <keyset id="extensionsKeys">
    <key id="key_close"   key="&cmd.close.commandKey;" modifiers="accel" oncommand="window.close();"/>
    <key id="key_close2"  keycode="VK_ESCAPE" oncommand="window.close();"/>
  </keyset>

  <stringbundle id="bundle_newsblog" src="chrome://messenger-newsblog/locale/newsblog.properties"/>
  <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>

  <vbox flex="1" id="contentPane">
    <description control="rssSubscriptionsList">&subscriptionDesc.label;</description>

    <separator class="thin"/>

    <tree id="rssSubscriptionsList"
          treelines="true"
          flex="1"
          style="height: 10em;"
          hidecolumnpicker="true"
          onselect="gFeedSubscriptionsWindow.onSelect();"
          onkeypress="gFeedSubscriptionsWindow.onKeyPress(event);"
          seltype="single">
      <treecols>
        <treecol id="folderNameCol" flex="2" primary="true" hideheader="true"/>
      </treecols>
      <treechildren id="subscriptionChildren"
                    ondblclick="if (event.button == 0) gFeedSubscriptionsWindow.editFeed();"
                    ondraggesture="gFeedSubscriptionsWindow.beginDrag(event);"/>
    </tree>

    <hbox id="rssFeedInfoBox">
      <stack flex="1">
        <hbox id="backgroundBox" flex="1"/>
        <grid flex="1">
          <columns>
            <column/>
            <column flex="1"/>
          </columns>
          <rows>
            <row align="center">
              <hbox pack="end"><label id="nameLabel" control="nameValue" value="&feedTitle.label;"/></hbox>
              <textbox id="nameValue" readonly="true" class="plain"/>
            </row>
            <row align="center">
              <hbox pack="end"><label id="locationLabel" control="locationValue" value="&location.label;"/></hbox>
              <textbox id="locationValue" readonly="true" class="plain uri-element"/>
            </row>
          </rows>
        </grid>
      </stack>
    </hbox>

    <hbox id="statusContainerBox" align="center">
      <label id="statusText" class="statusbarpanel-text" crop="right" flex="1"/>
      <progressmeter id="progressMeter" collapsed="true" class="progressmeter-statusbar" style="-moz-margin-end: 5px;" mode="normal" value="0"/>
    </hbox>

    <hbox align="end">
      <hbox class="actionButtons" flex="1">
        <button id="addFeed"
                label="&button.addFeed.label;" accesskey="&button.addFeed.accesskey;"
                oncommand="gFeedSubscriptionsWindow.addFeed();"/>

        <button id="editFeed" disabled="true" default="true"
                label="&button.editFeed.label;" accesskey="&button.editFeed.accesskey;"
                oncommand="gFeedSubscriptionsWindow.editFeed();"/>

        <button id="removeFeed" disabled="true"
                label="&button.removeFeed.label;" accesskey="&button.removeFeed.accesskey;"
                oncommand="gFeedSubscriptionsWindow.removeFeed();"/>

        <button id="importOPML"
                label="&button.importOPML.label;" accesskey="&button.importOPML.accesskey;"
                oncommand="gFeedSubscriptionsWindow.importOPML();"/>

        <button id="exportOPML"
                label="&button.exportOPML.label;" accesskey="&button.exportOPML.accesskey;"
                oncommand="gFeedSubscriptionsWindow.exportOPML();"/>

        <spacer flex="1"/>
      </hbox>
    </hbox>
  </vbox>

  <hbox>
    <spring flex="1"/>
    <resizer dir="bottomright"/>
  </hbox>
</window>
