<?xml version="1.0"?>

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

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

<dialog id="feedPropertyDialog"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:nc="http://home.netscape.com/NC-rdf#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  title="&window.title;"
  style="width: 33em;"
  buttons="accept,cancel"
  onload="onLoad();"
  ondialogaccept="return onOk();">

  <script type="application/javascript" src="feed-properties.js"/>
  <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
  <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>

  <menupopup id="copyUrlPopup" popupanchor="bottomleft">
    <menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;"
              oncommand="CopyWebsiteAddress(document.popupNode)"/>
  </menupopup>

  <menupopup id="pasteUrlPopup" popupanchor="bottomleft">
    <menuitem label="&pasteLinkCmd.label;" accesskey="&pasteLinkCmd.accesskey;"
              oncommand="goDoCommand('cmd_paste')"/>
  </menupopup>

  <grid flex="1">
    <columns>
      <column/>
      <column  flex="1"/>
    </columns>

    <rows>
      <row>
        <label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
        <textbox id="feedLocation" class="uri-element"/>
      </row>

      <row>
        <separator class="thin"/>
      </row>

      <row>
        <label value="&feedFolder.label;" accesskey="&feedFolder.accesskey;" control="selectFolder"/>
        <menulist id="selectFolder"
              containment="http://home.netscape.com/NC-rdf#child"
              sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
              sortDirection="ascending"
              datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
              ref="...">
            <menupopup>
              <menuitem id="rssAccountMenuItem"
                        oncommand="PickedMsgFolder(event.target, 'selectFolder')"/>
              <menuseparator/>
            </menupopup>

            <template>
              <!-- cheat and use the CanRename property to make sure we don't list the Trash folder as a possible feed folder -->
              <rule nc:CanFileMessages="true" iscontainer="true" isempty="false" nc:CanRename="true">
                <menupopup>
                  <menu uri="..."
                        class="folderMenuItem menu-iconic"
                        oncommand="PickedMsgFolder(event.target, 'selectFolder')"
                        SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
                        BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
                        IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
                        IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
                        ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
                        label="rdf:http://home.netscape.com/NC-rdf#Name">
                    <menupopup class="menulist-menupopup">
                      <menuitem label="&choosethisfolder.label;"
                                oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'selectFolder')"/>
                      <menuseparator/>
                    </menupopup>
                  </menu>
                </menupopup>
              </rule>
              <rule nc:CanFileMessages="true" nc:CanRename="true">
                <menupopup>
                     <menuitem uri="..." value="..."
                      class="folderMenuItem menuitem-iconic"
                      oncommand="PickedMsgFolder(event.target,'selectFolder')"
                      SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
                      BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
                      IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
                      IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
                      ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
                      label="rdf:http://home.netscape.com/NC-rdf#Name"/>
                 </menupopup>
              </rule>
            </template>
        </menulist>
      </row>
    </rows>
  </grid>

  <separator class="thin"/>

  <checkbox id="quickMode" accesskey="&quickMode.accesskey;" label="&quickMode.label;"/>

</dialog>
