Fix bug 456377 - Thunderbird3: Integrate New Event, New Task into Write Button. r=berend,ui-r=clarkbw,christian
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 29 Oct 2008 19:30:10 +0100
changeset 765 e580427ad474d03bfc9348fcf1b6f5d54b3baaa8
parent 764 d00fb8da1b025d4b13f48efaf0d929d951107416
child 766 08cec1de1b4240ca031be70705dc2488c598a8f9
push id690
push usermozilla@kewis.ch
push dateWed, 29 Oct 2008 18:30:42 +0000
treeherdercomm-central@e580427ad474 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersberend, clarkbw, christian
bugs456377
Fix bug 456377 - Thunderbird3: Integrate New Event, New Task into Write Button. r=berend,ui-r=clarkbw,christian
calendar/base/content/calendar-toolbar.inc
calendar/base/themes/pinstripe/calendar-toolbar.css
calendar/base/themes/winstripe/calendar-toolbar.css
calendar/lightning/content/lightning-toolbar.inc
calendar/lightning/content/messenger-overlay-toolbar.xul
calendar/lightning/themes/pinstripe/lightning.css
calendar/lightning/themes/winstripe/lightning.css
calendar/locales/en-US/chrome/lightning/lightning.dtd
calendar/sunbird/base/content/sunbird-toolbar.inc
calendar/sunbird/base/themes/pinstripe/toolbar.css
calendar/sunbird/base/themes/winstripe/toolbar.css
--- a/calendar/base/content/calendar-toolbar.inc
+++ b/calendar/base/content/calendar-toolbar.inc
@@ -43,28 +43,16 @@
 # 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 LGPL or the GPL. 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 *****
 
-<toolbarbutton id="calendar-new-event-button"
-               mode="calendar"
-               class="cal-toolbarbutton-1"
-               label="&calendar.newevent.button.label;"
-               tooltiptext="&calendar.newevent.button.tooltip;"
-               observes="calendar_new_event_command"/>
-<toolbarbutton id="calendar-new-task-button"
-               mode="calendar"
-               class="cal-toolbarbutton-1"
-               label="&calendar.newtask.button.label;"
-               tooltiptext="&calendar.newtask.button.tooltip;"
-               observes="calendar_new_todo_command"/>
 <toolbarbutton id="calendar-day-view-button"
                mode="calendar"
                type="radio"
                group="calendarViews"
                class="cal-toolbarbutton-1"
                label="&calendar.day.button.label;"
                tooltiptext="&calendar.day.button.tooltip;"
                observes="calendar_day-view_command"/>
--- a/calendar/base/themes/pinstripe/calendar-toolbar.css
+++ b/calendar/base/themes/pinstripe/calendar-toolbar.css
@@ -73,46 +73,16 @@ toolbar[mode="full"] .cal-toolbarbutton-
 
 toolbar[iconsize="small"] .cal-toolbarbutton-1 {
     -moz-box-orient: vertical;
     min-width: 0px;
     list-style-image: url("chrome://calendar/skin/toolbar-small.png");
 }
 
 /*--------------------------------------------------------------------
- *   Button: "New Event"
- *-------------------------------------------------------------------*/
-
- #calendar-new-event-button,
- #task-new-event-button {
-  -moz-image-region: rect(0px 32px 32px 0px);
-}
-#calendar-new-event-button:active,
-#task-new-event-button:active {
-    -moz-image-region: rect(32px 32px 64px 0px);
-}
-#calendar-new-event-button[disabled="true"],
-#task-new-event-button[disabled="true"] {
-    -moz-image-region: rect(64px 32px 96px 0px);
-}
-
-toolbar[iconsize="small"] #calendar-new-event-button,
-toolbar[iconsize="small"] #task-new-event-button {
-    -moz-image-region: rect(0px 24px 24px 0px);
-}
-toolbar[iconsize="small"] #calendar-new-event-button:active,
-toolbar[iconsize="small"] #task-new-event-button:active {
-    -moz-image-region: rect(24px 24px 48px 0px);
-}
-toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"],
-toolbar[iconsize="small"] #task-new-event-button[disabled="true"] {
-    -moz-image-region: rect(48px 24px 72px 0px);
-}
-
-/*--------------------------------------------------------------------
  *   Button: "Edit"
  *-------------------------------------------------------------------*/
 
 #calendar-edit-button {
     -moz-image-region: rect(0px 64px 32px 32px);
 }
 #calendar-edit-button:active {
     -moz-image-region: rect(32px 64px 64px 32px);
@@ -439,40 +409,9 @@ toolbar[iconsize="small"] #task-progress
 toolbar[iconsize="small"] #task-priority-button {
         -moz-image-region: rect(0px 600px 24px 576px);
 }
 toolbar[iconsize="small"] #task-priority-button:active {
         -moz-image-region: rect(24px 600px 48px 576px);
 }
 toolbar[iconsize="small"] #task-priority-button[disabled="true"] {
         -moz-image-region: rect(48px 600px 72px 576px);
-
 }
-
-/*--------------------------------------------------------------------
- *   Button: "New Task"
- *-------------------------------------------------------------------*/
-
-#calendar-new-task-button,
-#task-new-task-button {
-        -moz-image-region: rect(0px 512px 32px 480px);
-}
-#calendar-new-task-button:active,
-#task-new-task-button:active {
-        -moz-image-region: rect(32px 512px 64px 480px);
-}
-#calendar-new-task-button[disabled="true"],
-#task-new-task-button[disabled="true"] {
-        -moz-image-region: rect(64px 512px 96px 480px);
-}
-
-toolbar[iconsize="small"] #calendar-new-task-button,
-toolbar[iconsize="small"] #task-new-task-button {
-        -moz-image-region: rect(0px 384px 24px 360px);
-}
-toolbar[iconsize="small"] #calendar-new-task-button:active,
-toolbar[iconsize="small"] #task-new-task-button:active {
-        -moz-image-region: rect(24px 384px 48px 360px);
-}
-toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"],
-toolbar[iconsize="small"] #task-new-task-button[disabled="true"] {
-        -moz-image-region: rect(48px 384px 72px 360px);
-}
--- a/calendar/base/themes/winstripe/calendar-toolbar.css
+++ b/calendar/base/themes/winstripe/calendar-toolbar.css
@@ -116,64 +116,16 @@ toolbar[mode="full"] .cal-toolbarbutton-
 
 toolbar[iconsize="small"] .cal-toolbarbutton-1 {
     -moz-box-orient: vertical;
     min-width: 0px;
     list-style-image: url("chrome://calendar/skin/toolbar-small.png");
 }
 
 /*--------------------------------------------------------------------
- *   new event button
- *-------------------------------------------------------------------*/
-
- #calendar-new-event-button,
- #task-new-event-button {
-    -moz-image-region: rect(0px 24px 24px 0px);
-}
-#calendar-new-event-button[disabled="true"],
-#calendar-new-event-button[disabled="true"]:hover,
-#calendar-new-event-button[disabled="true"]:hover:active,
-#task-new-event-button[disabled="true"],
-#task-new-event-button[disabled="true"]:hover,
-#task-new-event-button[disabled="true"]:hover:active {
-    -moz-image-region: rect(48px 24px 72px 0px);
-}
-#calendar-new-event-button:hover,
-#task-new-event-button:hover {
-    -moz-image-region: rect(24px 24px 48px 0px);
-}
-#calendar-new-event-button:hover:active,
-#task-new-event-button:hover:active {
-}
-
-/*--------------------------------------------------------------------
- *   new event button - small
- *-------------------------------------------------------------------*/
-
-toolbar[iconsize="small"] #calendar-new-event-button,
-toolbar[iconsize="small"] #task-new-event-button {
-    -moz-image-region: rect(0px 16px 16px 0px);
-}
-toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"],
-toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"]:hover,
-toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"]:hover:active,
-toolbar[iconsize="small"] #task-new-event-button[disabled="true"],
-toolbar[iconsize="small"] #task-new-event-button[disabled="true"]:hover,
-toolbar[iconsize="small"] #task-new-event-button[disabled="true"]:hover:active {
-    -moz-image-region: rect(32px 16px 48px 0px);
-}
-toolbar[iconsize="small"] #calendar-new-event-button:hover,
-toolbar[iconsize="small"] #task-new-event-button:hover {
-    -moz-image-region: rect(16px 16px 32px 0px);
-}
-toolbar[iconsize="small"] #calendar-new-event-button:hover:active,
-toolbar[iconsize="small"] #task-new-event-button:hover:active {
-}
-
-/*--------------------------------------------------------------------
  *   edit event button
  *-------------------------------------------------------------------*/
 
 #calendar-edit-button {
     -moz-image-region: rect(0px 48px 24px 24px);
 }
 #calendar-edit-button[disabled="true"],
 #calendar-edit-button[disabled="true"]:hover,
@@ -624,56 +576,8 @@ toolbar[iconsize="small"] #task-priority
 toolbar[iconsize="small"] #task-priority-button[disabled="true"]:hover:active {
         -moz-image-region: rect(32px 400px 48px 384px);
 }
 toolbar[iconsize="small"] #task-priority-button:hover {
         -moz-image-region: rect(16px 400px 32px 384px);
 }
 toolbar[iconsize="small"] #task-priority-button:hover:active {
 }
-
-/*--------------------------------------------------------------------
- *   New Task button
- *-------------------------------------------------------------------*/
-
-#calendar-new-task-button,
-#task-new-task-button {
-        -moz-image-region: rect(0px 384px 24px 360px);
-}
-#calendar-new-task-button[disabled="true"],
-#calendar-new-task-button[disabled="true"]:hover,
-#calendar-new-task-button[disabled="true"]:hover:active,
-#task-new-task-button[disabled="true"],
-#task-new-task-button[disabled="true"]:hover,
-#task-new-task-button[disabled="true"]:hover:active {
-        -moz-image-region: rect(48px 384px 72px 360px);
-}
-#calendar-new-task-button:hover,
-#task-new-task-button:hover {
-        -moz-image-region: rect(24px 384px 48px 360px);
-}
-#calendar-new-task-button:hover:active,
-#task-new-task-button:hover:active {
-}
-
-/*--------------------------------------------------------------------
- *   New Task button - small
- *-------------------------------------------------------------------*/
-
-toolbar[iconsize="small"] #calendar-new-task-button,
-toolbar[iconsize="small"] #task-new-task-button {
-        -moz-image-region: rect(0px 256px 16px 240px);
-}
-toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"],
-toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"]:hover,
-toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"]:hover:active,
-toolbar[iconsize="small"] #task-new-task-button[disabled="true"],
-toolbar[iconsize="small"] #task-new-task-button[disabled="true"]:hover,
-toolbar[iconsize="small"] #task-new-task-button[disabled="true"]:hover:active {
-        -moz-image-region: rect(32px 256px 48px 240px);
-}
-toolbar[iconsize="small"] #calendar-new-task-button:hover,
-toolbar[iconsize="small"] #task-new-task-button:hover {
-        -moz-image-region: rect(16px 256px 32px 240px);
-}
-toolbar[iconsize="small"] #calendar-new-task-button:hover:active,
-toolbar[iconsize="small"] #task-new-task-button:hover:active {
-}
--- a/calendar/lightning/content/lightning-toolbar.inc
+++ b/calendar/lightning/content/lightning-toolbar.inc
@@ -39,28 +39,16 @@
 # ***** END LICENSE BLOCK *****
 
 <toolbarbutton id="calendar-edit-button"
                mode="calendar"
                class="cal-toolbarbutton-1"
                label="&calendar.edit.button.label;"
                tooltiptext="&calendar.edit.button.tooltip;"
                observes="lightning_modify_item_command"/>
-<toolbarbutton id="task-new-event-button"
-               mode="task"
-               class="cal-toolbarbutton-1"
-               label="&calendar.newevent.button.label;"
-               tooltiptext="&calendar.newevent.button.tooltip;"
-               observes="calendar_new_event_command"/>
-<toolbarbutton id="task-new-task-button"
-               mode="task"
-               class="cal-toolbarbutton-1"
-               label="&calendar.newtask.button.label;"
-               tooltiptext="&calendar.newtask.button.tooltip;"
-               observes="calendar_new_todo_command"/>
 <toolbarbutton id="task-category-button"
                type="menu"
                mode="task"
                class="cal-toolbarbutton-1"
                label="&calendar.unifinder.tree.categories.label;"
                tooltiptext="&calendar.task.category.button.tooltip;"
                command="calendar_task_category_command"
                observes="calendar_task_category_command">
--- a/calendar/lightning/content/messenger-overlay-toolbar.xul
+++ b/calendar/lightning/content/messenger-overlay-toolbar.xul
@@ -39,16 +39,20 @@
    - 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 % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd">
   %messengerDTD;
+  <!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd">
+  %mailOverlayDTD;
+  <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
+  %lightningDTD;
   <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" >
   %calendarDTD;
 ]>
 
 <?xml-stylesheet href="chrome://calendar/skin/calendar-toolbar.css" type="text/css"?>
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>
 
 <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
@@ -119,22 +123,41 @@
   </toolbarpalette>
   
     <toolbar id="calendar-toolbar"
              class="chromeclass-toolbar"
              customizable="true"
              context="calendar-toolbar-context-menu"
              collapsed="true"
              collapsedinMode="false"
-             defaultset="calendar-new-event-button,calendar-new-task-button,separator,calendar-day-view-button,calendar-week-view-button,calendar-multiweek-view-button,calendar-month-view-button,separator,calendar-unifinder-button,spring"
+             defaultset="calendar-day-view-button,calendar-week-view-button,calendar-multiweek-view-button,calendar-month-view-button,separator,calendar-unifinder-button,spring"
              persist="collapsedinMode"/>
     <toolbar id="task-toolbar"
              class="chromeclass-toolbar"
              customizable="true"
              context="calendar-toolbar-context-menu"
              collapsed="true"
              collapsedinMode="false"
-             defaultset="task-new-event-button,task-new-task-button,separator,task-category-button,task-progress-button,task-priority-button,separator,spring"
+             defaultset="task-category-button,task-progress-button,task-priority-button,separator,spring"
              persist="collapsedinMode"/>
     <toolbarset id="calendar-custom-toolbars"/>
   </toolbox>
 
+  <toolbarbutton id="button-newmsg"
+                 type="menu-button">
+    <menupopup id="button-newmsg-menupopup">
+      <menuitem id="newMsgButton-mail-menuitem"
+                label="&newMessageCmd.label;"
+                class="menuitem-iconic"
+                oncommand="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>
 </overlay>
--- a/calendar/lightning/themes/pinstripe/lightning.css
+++ b/calendar/lightning/themes/pinstripe/lightning.css
@@ -108,16 +108,32 @@ radio[pane=paneLightning] {
 #ltnSidebar {
   background-color: -moz-field;  
 }
 
 .task-tree-subpane {
   -moz-margin-start: 12px;
 }
 
+/* Write button */
+#newMsgButton-mail-menuitem {
+  list-style-image: url(chrome://messenger/skin/icons/mail-toolbar.png);
+  -moz-image-region: rect(0px 48px 24px 24px);
+}
+
+#newMsgButton-calendar-menuitem {
+  list-style-image: url(chrome://calendar/skin/toolbar-small.png);
+  -moz-image-region: rect(0px 16px 16px 0px);
+}
+
+#newMsgButton-task-menuitem {
+  list-style-image: url(chrome://calendar/skin/toolbar-small.png);
+  -moz-image-region: rect(0px 256px 16px 240px);
+}
+
 /* Today pane button in status bar */
 #calendar-status-todaypane-button,
 #calendar-status-todaypane-button[checked="true"] {
   min-width: 0;
   min-height: 0;
   -moz-appearance: none;
   -moz-border-radius: 3px;
   padding: 0.2pt 2px !important;
--- a/calendar/lightning/themes/winstripe/lightning.css
+++ b/calendar/lightning/themes/winstripe/lightning.css
@@ -104,16 +104,32 @@ radio[pane=paneLightning] {
 }
 
 
 /* Lightning sidebar background in calendar and task mode */
 #ltnSidebar {
   background-color: -moz-field;  
 }
 
+/* Write button */
+#newMsgButton-mail-menuitem {
+  list-style-image: url(chrome://messenger/skin/icons/mail-toolbar.png);
+  -moz-image-region: rect(0px 48px 24px 24px);
+}
+
+#newMsgButton-calendar-menuitem {
+  list-style-image: url(chrome://calendar/skin/toolbar-small.png);
+  -moz-image-region: rect(0px 16px 16px 0px);
+}
+
+#newMsgButton-task-menuitem {
+  list-style-image: url(chrome://calendar/skin/toolbar-small.png);
+  -moz-image-region: rect(0px 256px 16px 240px);
+}
+
 /* Today pane button in status bar */
 #calendar-status-todaypane-button,
 #calendar-status-todaypane-button[checked="true"] {
   min-width: 0;
   min-height: 0;
   -moz-appearance: none;
   -moz-border-radius: 3px;
   padding: 0.2pt 2px !important;
--- a/calendar/locales/en-US/chrome/lightning/lightning.dtd
+++ b/calendar/locales/en-US/chrome/lightning/lightning.dtd
@@ -70,16 +70,20 @@
 <!-- Mode Toolbar -->
 <!ENTITY lightning.toolbar.mail.label         "Mail">
 <!ENTITY lightning.toolbar.mail.accesskey     "M">
 <!ENTITY lightning.toolbar.calendar.label     "Calendar">
 <!ENTITY lightning.toolbar.calendar.accesskey "C">
 <!ENTITY lightning.toolbar.task.label         "Tasks">
 <!ENTITY lightning.toolbar.task.accesskey     "T">
 
+<!-- Toolbar write button -->
+<!ENTITY lightning.toolbar.newevent.label     "Event">
+<!ENTITY lightning.toolbar.newtask.label      "Task">
+
 <!-- Messenger Toolbar -->
 <!ENTITY lightning.toolbar.day.label                 "Day">
 <!ENTITY lightning.toolbar.day.accesskey             "D">
 <!ENTITY lightning.toolbar.week.label                "Week">
 <!ENTITY lightning.toolbar.week.accesskey            "W">
 <!ENTITY lightning.toolbar.multiweek.label           "Multiweek">
 <!ENTITY lightning.toolbar.multiweek.accesskey       "u">
 <!ENTITY lightning.toolbar.month.label               "Month">
--- a/calendar/sunbird/base/content/sunbird-toolbar.inc
+++ b/calendar/sunbird/base/content/sunbird-toolbar.inc
@@ -39,16 +39,26 @@
 # 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 LGPL or the GPL. 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 *****
 
+<toolbarbutton id="calendar-new-event-button"
+               class="cal-toolbarbutton-1"
+               label="&calendar.newevent.button.label;"
+               tooltiptext="&calendar.newevent.button.tooltip;"
+               observes="calendar_new_event_command"/>
+<toolbarbutton id="calendar-new-task-button"
+               class="cal-toolbarbutton-1"
+               label="&calendar.newtask.button.label;"
+               tooltiptext="&calendar.newtask.button.tooltip;"
+               observes="calendar_new_todo_command"/>
 <toolbarbutton class="cal-toolbarbutton-1"
                id="calendar-edit-button"
                label="&calendar.edit.button.label;"
                tooltiptext="&calendar.edit.button.tooltip;"
                observes="calendar_modify_event_command"/>
 <toolbarbutton class="cal-toolbarbutton-1"
                id="calendar-delete-button"
                label="&sunbird.delete.button.label;"
--- a/calendar/sunbird/base/themes/pinstripe/toolbar.css
+++ b/calendar/sunbird/base/themes/pinstripe/toolbar.css
@@ -126,16 +126,64 @@ toolbar[iconsize="small"] #calendar-choo
 toolbar[iconsize="small"] #calendar-choose-date-button:active {
         -moz-image-region: rect(24px 432px 48px 408px);
 }
 toolbar[iconsize="small"] #calendar-choose-date-button[disabled="true"] {
         -moz-image-region: rect(48px 432px 72px 408px);
 }
 
 /*--------------------------------------------------------------------
+ *   Button: "New Event"
+ *-------------------------------------------------------------------*/
+
+#calendar-new-event-button {
+    -moz-image-region: rect(0px 32px 32px 0px);
+}
+#calendar-new-event-button:active {
+    -moz-image-region: rect(32px 32px 64px 0px);
+}
+#calendar-new-event-button[disabled="true"] {
+    -moz-image-region: rect(64px 32px 96px 0px);
+}
+
+toolbar[iconsize="small"] #calendar-new-event-button {
+    -moz-image-region: rect(0px 24px 24px 0px);
+}
+toolbar[iconsize="small"] #calendar-new-event-button:active {
+    -moz-image-region: rect(24px 24px 48px 0px);
+}
+toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"] {
+    -moz-image-region: rect(48px 24px 72px 0px);
+}
+
+/*--------------------------------------------------------------------
+ *   Button: "New Task"
+ *-------------------------------------------------------------------*/
+
+#calendar-new-task-button {
+    -moz-image-region: rect(0px 512px 32px 480px);
+}
+#calendar-new-task-button:active {
+    -moz-image-region: rect(32px 512px 64px 480px);
+}
+#calendar-new-task-button[disabled="true"] {
+    -moz-image-region: rect(64px 512px 96px 480px);
+}
+
+toolbar[iconsize="small"] #calendar-new-task-button {
+    -moz-image-region: rect(0px 384px 24px 360px);
+}
+toolbar[iconsize="small"] #calendar-new-task-button:active {
+    -moz-image-region: rect(24px 384px 48px 360px);
+}
+toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"] {
+    -moz-image-region: rect(48px 384px 72px 360px);
+}
+
+/*--------------------------------------------------------------------
  *   Button: "Delete"
  *-------------------------------------------------------------------*/
 
 #calendar-delete-button {
     -moz-image-region: rect(0px 96px 32px 64px);
 }
 #calendar-delete-button:active {
     -moz-image-region: rect(32px 96px 64px 64px);
--- a/calendar/sunbird/base/themes/winstripe/toolbar.css
+++ b/calendar/sunbird/base/themes/winstripe/toolbar.css
@@ -284,8 +284,72 @@ toolbar[iconsize="small"] #calendar-remo
 toolbar[iconsize="small"] #calendar-remote-reload-button[disabled="true"],
 toolbar[iconsize="small"] #calendar-remote-reload-button[disabled="true"]:hover,
 toolbar[iconsize="small"] #calendar-remote-reload-button[disabled="true"]:hover:active {
     -moz-image-region: rect(32px 320px 48px 304px);
 }
 toolbar[iconsize="small"] #calendar-remote-reload-button:hover {
     -moz-image-region: rect(16px 320px 32px 304px);
 }
+
+/*--------------------------------------------------------------------
+ *   new event button
+ *-------------------------------------------------------------------*/
+
+#calendar-new-event-button {
+    -moz-image-region: rect(0px 24px 24px 0px);
+}
+#calendar-new-event-button[disabled="true"],
+#calendar-new-event-button[disabled="true"]:hover,
+#calendar-new-event-button[disabled="true"]:hover:active {
+    -moz-image-region: rect(48px 24px 72px 0px);
+}
+#calendar-new-event-button:hover {
+    -moz-image-region: rect(24px 24px 48px 0px);
+}
+
+/*--------------------------------------------------------------------
+ *   new event button - small
+ *-------------------------------------------------------------------*/
+
+toolbar[iconsize="small"] #calendar-new-event-button {
+    -moz-image-region: rect(0px 16px 16px 0px);
+}
+toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"],
+toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"]:hover,
+toolbar[iconsize="small"] #calendar-new-event-button[disabled="true"]:hover:active {
+    -moz-image-region: rect(32px 16px 48px 0px);
+}
+toolbar[iconsize="small"] #calendar-new-event-button:hover {
+    -moz-image-region: rect(16px 16px 32px 0px);
+}
+
+/*--------------------------------------------------------------------
+ *   New Task button
+ *-------------------------------------------------------------------*/
+
+#calendar-new-task-button {
+    -moz-image-region: rect(0px 384px 24px 360px);
+}
+#calendar-new-task-button[disabled="true"],
+#calendar-new-task-button[disabled="true"]:hover,
+#calendar-new-task-button[disabled="true"]:hover:active {
+    -moz-image-region: rect(48px 384px 72px 360px);
+}
+#calendar-new-task-button:hover {
+    -moz-image-region: rect(24px 384px 48px 360px);
+}
+
+/*--------------------------------------------------------------------
+ *   New Task button - small
+ *-------------------------------------------------------------------*/
+
+toolbar[iconsize="small"] #calendar-new-task-button {
+    -moz-image-region: rect(0px 256px 16px 240px);
+}
+toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"],
+toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"]:hover,
+toolbar[iconsize="small"] #calendar-new-task-button[disabled="true"]:hover:active {
+    -moz-image-region: rect(32px 256px 48px 240px);
+}
+toolbar[iconsize="small"] #calendar-new-task-button:hover {
+    -moz-image-region: rect(16px 256px 32px 240px);
+}