diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js
index 0737710e0451..5abd91cc6a3c 100644
--- a/calendar/resources/content/calendar.js
+++ b/calendar/resources/content/calendar.js
@@ -249,6 +249,9 @@ function calendarInit()
//All is settled, enable feedbacks to observers
gICalLib.batchMode = false;
+
+ var toolbox = document.getElementById("calendar-toolbox");
+ toolbox.customizeDone = CalendarToolboxCustomizeDone;
}
// Set the date and time on the clock and set up a timeout to refresh the clock when the
@@ -1599,3 +1602,30 @@ function srGetStrBundle(path)
}
return strBundle;
}
+
+function CalendarCustomizeToolbar()
+{
+ // Disable the toolbar context menu items
+ var menubar = document.getElementById("main-menubar");
+ for (var i = 0; i < menubar.childNodes.length; ++i)
+ menubar.childNodes[i].setAttribute("disabled", true);
+
+ var cmd = document.getElementById("cmd_CustomizeToolbars");
+ cmd.setAttribute("disabled", "true");
+
+ window.openDialog("chrome://calendar/content/customizeToolbar.xul", "CustomizeToolbar",
+ "chrome,all,dependent", document.getElementById("calendar-toolbox"));
+}
+
+function CalendarToolboxCustomizeDone(aToolboxChanged)
+{
+ // Re-enable parts of the UI we disabled during the dialog
+ var menubar = document.getElementById("main-menubar");
+ for (var i = 0; i < menubar.childNodes.length; ++i)
+ menubar.childNodes[i].setAttribute("disabled", false);
+ var cmd = document.getElementById("cmd_CustomizeToolbars");
+ cmd.removeAttribute("disabled");
+
+ // XXX Shouldn't have to do this, but I do
+ window.focus();
+}
diff --git a/calendar/resources/locale/en-US/calendar.dtd b/calendar/resources/locale/en-US/calendar.dtd
index 8e4bd0779a24..933383fbb524 100644
--- a/calendar/resources/locale/en-US/calendar.dtd
+++ b/calendar/resources/locale/en-US/calendar.dtd
@@ -294,6 +294,12 @@
+
+
+
+
+
+
diff --git a/calendar/resources/skin/classic/calendar.css b/calendar/resources/skin/classic/calendar.css
index 2db4a6718123..bf06ffc52306 100644
--- a/calendar/resources/skin/classic/calendar.css
+++ b/calendar/resources/skin/classic/calendar.css
@@ -64,6 +64,7 @@
.toolbarbutton-1 {
list-style-image: url("chrome://calendar/skin/btn1.png");
+ -moz-box-orient: vertical;
}
diff --git a/calendar/sunbird/app/profile/sunbird.js b/calendar/sunbird/app/profile/sunbird.js
index df113664fe55..84a2f64f1e59 100644
--- a/calendar/sunbird/app/profile/sunbird.js
+++ b/calendar/sunbird/app/profile/sunbird.js
@@ -41,7 +41,7 @@
// pref("startup.homepage_override_url","chrome://browser-region/locale/region.properties");
pref("general.startup.calendar", true);
-pref("browser.chromeURL","chrome://browser/content/");
+pref("browser.chromeURL","chrome://calendar/content/");
pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindow.xul");
pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul");
pref("xpinstall.dialog.progress", "chrome://mozapps/content/downloads/downloads.xul");
diff --git a/calendar/sunbird/base/content/calendar.xul b/calendar/sunbird/base/content/calendar.xul
index cdec9b5d1374..8dd19c0a825c 100644
--- a/calendar/sunbird/base/content/calendar.xul
+++ b/calendar/sunbird/base/content/calendar.xul
@@ -47,7 +47,6 @@
-
@@ -132,6 +131,8 @@
+
+
@@ -403,14 +404,23 @@
observes="publish_calendar"/>
+
+
-
+
-
+
+
+
-
-
+
-
-
-
-
+
+
+
@@ -527,10 +541,7 @@
-
+
@@ -595,9 +606,8 @@
+ class="chromeclass-extrachrome sidebar-splitter" orient="horizontal"
+ onmouseup="setTimeout( 'gCalendarWindow.onMouseUpCalendarSplitter()', 1 );"/>
diff --git a/calendar/sunbird/base/content/customizeToolbar.xul b/calendar/sunbird/base/content/customizeToolbar.xul
new file mode 100644
index 000000000000..3af8fcd7355b
--- /dev/null
+++ b/calendar/sunbird/base/content/customizeToolbar.xul
@@ -0,0 +1,93 @@
+
+
+# The contents of this file are subject to the Netscape 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/NPL/
+#
+# 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 Mozilla Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998-1999 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s):
+# David Hyatt (hyatt@apple.com)
+# Blake Ross (blaker@netscape.com)
+
+
+ %customizeToolbarDTD;
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ &instructions.description;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/calendar/sunbird/base/content/menuOverlay.xul b/calendar/sunbird/base/content/menuOverlay.xul
index 98925b87f0d7..5fae351f6a37 100644
--- a/calendar/sunbird/base/content/menuOverlay.xul
+++ b/calendar/sunbird/base/content/menuOverlay.xul
@@ -89,11 +89,12 @@
-
-
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/calendar/sunbird/base/jar.mn b/calendar/sunbird/base/jar.mn
index 8f1521f784f2..c9ebcf786c63 100644
--- a/calendar/sunbird/base/jar.mn
+++ b/calendar/sunbird/base/jar.mn
@@ -1,3 +1,4 @@
calendar.jar:
- content/calendar/calendar.xul (content/calendar.xul)
- content/calendar/menuOverlay.xul (content/menuOverlay.xul)
+ content/calendar/calendar.xul (content/calendar.xul)
+ content/calendar/menuOverlay.xul (content/menuOverlay.xul)
+* content/calendar/customizeToolbar.xul (content/customizeToolbar.xul)