<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://calendar/skin/calendar-management.css" type="text/css"?>
<?xml-stylesheet href="chrome://calendar/content/widgets/calendar-widget-bindings.css" type="text/css"?>

<!DOCTYPE overlay SYSTEM "chrome://calendar/locale/calendar.dtd">

<overlay id="calendar-list-overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <popupset id="calendar-popupset">
    <menupopup id="list-calendars-context-menu"
               onpopupshowing="return calendarListSetupContextMenu(event);">
      <menuitem id="list-calendars-context-new"
                label="&calendar.context.newserver.label;"
                accesskey="&calendar.context.newserver.accesskey;"
                observes="calendar_new_calendar_command"/>
      <menuitem id="list-calendars-context-find"
                label="&calendar.context.findcalendar.label;"
                accesskey="&calendar.context.findcalendar.accesskey;"
                oncommand="openCalendarSubscriptionsDialog();"/>
      <menuitem id="list-calendars-context-delete"
                label="&calendar.context.deleteserver.label;"
                accesskey="&calendar.context.deleteserver.accesskey;"
                observes="calendar_delete_calendar_command"/>
      <menuseparator id="list-calendars-context-itemops-menuseparator"/>
      <menuitem id="list-calendars-context-export"
                label="&calendar.context.export.label;"
                accesskey="&calendar.context.export.accesskey;"
                oncommand="exportEntireCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
      <menuitem id="list-calendars-context-publish"
                label="&calendar.context.publish.label;"
                accesskey="&calendar.context.publish.accesskey;"
                observes="calendar_publish_selected_calendar_command"/>
      <menuseparator id="list-calendars-context-export-menuseparator"/>
      <menuitem id="list-calendars-context-reload"
                label="&calendar.context.synccalendars.label;"
                accesskey="&calendar.context.synccalendars.accesskey;"
                observes="calendar_reload_remote_calendars"/>
      <menuseparator id="list-calendars-context-reload-menuseparator"/>
      <menuitem id="list-calendars-context-edit"
                label="&calendar.context.properties.label;"
                accesskey="&calendar.context.properties.accesskey;"
                observes="calendar_edit_calendar_command"/>
    </menupopup>
    <tooltip id="calendar-list-tooltip"
             onpopupshowing="return calendarListTooltipShowing(event)"/>
  </popupset>

  <calendar-list-tree id="calendar-list-tree-widget"
                      type="full"
                      writable="true"
                      allowdrag="true"
                      onSortOrderChanged="updateSortOrderPref(event)"
                      onselect="document.commandDispatcher.updateCommands('calendar_commands')"
                      childtooltip="calendar-list-tooltip"
                      childcontext="list-calendars-context-menu"/>
</overlay>
