calendar/lightning/content/lightning-toolbar.xul
author Richard Marti <richard.marti@gmail.com>
Thu, 01 Mar 2012 19:30:06 +0100
changeset 10225 566537137d0ccc9c7d3aa4ecdee0bf56e8c881a6
parent 10108 18b9e02b159a32cd63fa73a6042409c29226a02b
child 10241 c188d94b4df1e259bea8398b80c92d7c79ba096a
permissions -rw-r--r--
Bug 548635 - Provide a toolbar button to open the unifinder. Initial patch from Philipp, additions by me. f=philip.chee r+a=philipp

<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.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 calendar views.
   -
   - The Initial Developer of the Original Code is Oracle Corporation
   - Portions created by the Initial Developer are Copyright (C) 2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Mike Shaver <shaver@mozilla.org>
   -   Stuart Parmenter <stuart.parmenter@oracle.com>
   -   Vladimir Vukicevic <vladimir@pobox.com>
   -   Simon Paquet <bugzilla@babylonsounds.com>
   -   Berend Cornelius <berend.cornelius@sun.com>
   -   Philipp Kewisch <mozilla@kewis.ch>
   -   Martin Schroeder <mschroeder@mozilla.x-home.org>
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

<!DOCTYPE overlay [
  <!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd"> %mailOverlayDTD;
  <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd"> %messengerDTD;
  <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd"> %lightningDTD;
  <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" > %calendarDTD;
  <!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd"> %eventDialogDTD;
  <!ENTITY % toolbarDTD SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd" > %toolbarDTD;
]>

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

<overlay id="ltnToolbarOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <popupset id="calendar-popupset">
    <menupopup id="calendar-toolbar-context">
      <menuitem id="CustomizeCalendarToolbar"
                label="&customizeToolbar.label;"
                accesskey="&customizeToolbar.accesskey;"
                oncommand="CustomizeMailToolbar('calendar-toolbox', 'CustomizeCalendarToolbar')"/>
    </menupopup>
    <menupopup id="task-toolbar-context">
      <menuitem id="CustomizeTaskToolbar"
                label="&customizeToolbar.label;"
                accesskey="&customizeToolbar.accesskey;"
                oncommand="CustomizeMailToolbar('task-toolbox', 'CustomizeTaskToolbar')"/>
    </menupopup>
  </popupset>

  <!-- The popup id here must match the popup id in the SeaMonkey
       New Message button. See Bug 506461 -->
  <toolbarbutton id="button-newmsg"
                 type="menu-button">
    <menupopup id="button-newMsgPopup">
      <menuitem id="newMsgButton-mail-menuitem"
                label="&newMessageCmd.label;"
                class="menuitem-iconic"
                oncommand="event.stopPropagation(); MsgNewMessage(event)"/>
      <menuitem id="newMsgButton-calendar-menuitem"
                label="&lightning.toolbar.newevent.label;"
                class="menuitem-iconic"
                command="calendar_new_event_command"
                observes="calendar_new_event_command"/>
      <menuitem id="newMsgButton-task-menuitem"
                label="&lightning.toolbar.newtask.label;"
                class="menuitem-iconic"
                command="calendar_new_todo_command"
                observes="calendar_new_todo_command"/>
    </menupopup>
  </toolbarbutton>

  <toolbarpalette id="MailToolbarPalette">
    <toolbarbutton id="lightning-button-calendar"
                   class="toolbarbutton-1"
                   label="&lightning.toolbar.calendar.label;"
                   tooltiptext="&lightning.toolbar.calendar.tooltip;"
                   command="new_calendar_tab"/>
    <toolbarbutton id="lightning-button-tasks"
                   class="toolbarbutton-1"
                   label="&lightning.toolbar.task.label;"
                   tooltiptext="&lightning.toolbar.task.tooltip;"
                   command="new_task_tab"/>
  </toolbarpalette>

  <toolbox id="calendar-toolbox"
           class="mail-toolbox"
           mode="full"
           defaultmode="full"
#ifdef XP_MACOSX
           iconsize="small"
           defaulticonsize="small"
#endif
           labelalign="end"
           defaultlabelalign="end">
    <toolbarpalette id="CalendarToolbarPalette">
      <toolbarbutton id="calendar-synchronize-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.sync.label;"
                     observes="calendar_reload_remote_calendars"/>
      <toolbarbutton id="calendar-newevent-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.newevent.label;"
                     observes="calendar_new_event_command"/>
      <toolbarbutton id="calendar-newtask-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.newtask.label;"
                     observes="calendar_new_todo_command"/>
      <toolbarbutton id="calendar-goto-today-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&calendar.today.button.tooltip;"
                     observes="calendar_go_to_today_command"/>
      <toolbarbutton id="calendar-edit-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&event.menu.edit.label;"
                     observes="calendar_modify_focused_item_command"/>
      <toolbarbutton id="calendar-delete-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&calendar.taskview.delete.label;"
                     observes="calendar_delete_focused_item_command"/>
      <toolbarbutton id="calendar-print-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&calendar.print.button.label;"
                     observes="cmd_print"/>
      <toolbarbutton id="calendar-unifinder-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&showUnifinderCmd.label;"
                     observes="calendar_show_unifinder_command"/>
    </toolbarpalette>

    <toolbar id="calendar-toolbar2" class="inline-toolbar chromeclass-toolbar"
             toolbarname="&lightning.toolbar.calendar.name;"
             accesskey="&lightning.toolbar.calendar.accesskey;"
             fullscreentoolbar="true" mode="full"
             customizable="true"
             context="calendar-toolbar-context"
#ifdef XP_MACOSX
             iconsize="small"
#endif
             defaultset="calendar-synchronize-button,calendar-newevent-button,calendar-newtask-button,calendar-edit-button,calendar-delete-button,spring"/>
    <toolbarset id="calendarToolbars" context="calendar-toolbar-context"/>
  </toolbox>

  <toolbox id="task-toolbox"
           class="mail-toolbox"
           mode="full"
           defaultmode="full"
#ifdef XP_MACOSX
           iconsize="small"
           defaulticonsize="small"
#endif
           labelalign="end"
           defaultlabelalign="end">
    <toolbarpalette id="CalendarToolbarPalette">
      <toolbarbutton id="task-synchronize-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.sync.label;"
                     observes="calendar_reload_remote_calendars"/>
      <toolbarbutton id="task-newevent-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.newevent.label;"
                     observes="calendar_new_event_command"/>
      <toolbarbutton id="task-newtask-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&lightning.toolbar.newtask.label;"
                     observes="calendar_new_todo_command"/>
      <toolbarbutton id="task-edit-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&event.menu.edit.label;"
                     observes="calendar_modify_focused_item_command"/>
      <toolbarbutton id="task-delete-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&calendar.taskview.delete.label;"
                     observes="calendar_delete_focused_item_command"/>
      <toolbarbutton id="task-print-button"
                     class="toolbarbutton-1 calbar-toolbarbutton-1"
                     label="&calendar.print.button.label;"
                     observes="cmd_print"/>
    </toolbarpalette>

    <toolbar id="task-toolbar2" class="inline-toolbar chromeclass-toolbar"
             toolbarname="&lightning.toolbar.task.name;"
             accesskey="&lightning.toolbar.task.accesskey;"
             fullscreentoolbar="true" mode="full"
             customizable="true"
             context="task-toolbar-context"
#ifdef XP_MACOSX
             iconsize="small"
#endif
             defaultset="task-synchronize-button,task-newevent-button,task-newtask-button,task-edit-button,task-delete-button,spring"/>
    <toolbarset id="calendarToolbars" context="task-toolbar-context"/>
  </toolbox>
</overlay>