--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -233,19 +233,16 @@ var calendarController = {
} else if (focusedElement.className == "calendar-task-tree") {
return this.writable &&
this.todo_items_selected &&
this.todo_items_writable;
}
}
}
- // If calendar is not in foreground, let the default controller take
- // care. If we don't have a default controller (i.e sunbird), just
- // continue.
if (this.defaultController.supportsCommand(aCommand)) {
return this.defaultController.isCommandEnabled(aCommand);
}
}
if (aCommand in this.commands) {
// All other commands we support should be enabled by default
return true;
}
@@ -414,43 +411,40 @@ var calendarController = {
} else {
selectAllItems();
}
break;
default:
if (this.defaultController && !this.isCalendarInForeground()) {
// If calendar is not in foreground, let the default controller take
- // care. If we don't have a default controller (i.e sunbird), just
- // continue.
+ // care. If we don't have a default controller, just continue.
this.defaultController.doCommand(aCommand);
return;
}
}
return;
},
onEvent: function cC_onEvent(aEvent) {
},
isCalendarInForeground: function cC_isCalendarInForeground() {
- // For sunbird, calendar is always in foreground. Otherwise check if
- // we are in the correct mode.
- return isSunbird() || (gCurrentMode && gCurrentMode != "mail");
+ return gCurrentMode && gCurrentMode != "mail";
},
isInMode: function cC_isInMode(mode) {
switch (mode) {
case "mail":
return !isCalendarInForeground();
case "calendar":
- return isSunbird() || (gCurrentMode && gCurrentMode == "calendar");
+ return gCurrentMode && gCurrentMode == "calendar";
case "task":
- return !isSunbird() && (gCurrentMode && gCurrentMode == "task");
+ return gCurrentMode && gCurrentMode == "task";
}
return false;
},
onSelectionChanged: function cC_onSelectionChanged(aEvent) {
var selectedItems = aEvent.detail;
calendarUpdateDeleteCommand(selectedItems);
@@ -490,19 +484,17 @@ var calendarController = {
calendarController.selected_events_requires_network =
(selected_events_requires_network == selLength);
calendarController.selected_events_invitation =
(selected_events_invitation == selLength);
calendarController.updateCommands();
calendarController2.updateCommands();
- if(!isSunbird()) {
- document.commandDispatcher.updateCommands('mail-toolbar');
- }
+ document.commandDispatcher.updateCommands('mail-toolbar');
},
/**
* Condition Helpers
*/
// These attributes will be set up manually.
item_selected: false,
@@ -707,17 +699,16 @@ var calendarController2 = {
return calendarController.isInMode("task");
default:
return true;
}
},
doCommand: function doCommand(aCommand) {
switch (aCommand) {
- // These commands are overridden in lightning and native in sunbird.
case "cmd_cut":
cutToClipboard();
break;
case "cmd_copy":
copyToClipboard();
break;
case "cmd_paste":
pasteFromClipboard();
@@ -765,39 +756,31 @@ var calendarController2 = {
};
/**
* Inserts the command controller into the document. On Lightning, also make
* sure that it is inserted before the conflicting thunderbird command
* controller.
*/
function injectCalendarCommandController() {
- if (!isSunbird()) {
- // We need to put our new command controller *before* the one that
- // gets installed by thunderbird. Since we get called pretty early
- // during startup we need to install the function below as a callback
- // that periodically checks when the original thunderbird controller
- // gets alive. Please note that setTimeout with a value of 0 means that
- // we leave the current thread in order to re-enter the message loop.
+ // We need to put our new command controller *before* the one that
+ // gets installed by thunderbird. Since we get called pretty early
+ // during startup we need to install the function below as a callback
+ // that periodically checks when the original thunderbird controller
+ // gets alive. Please note that setTimeout with a value of 0 means that
+ // we leave the current thread in order to re-enter the message loop.
- let tbController = top.controllers.getControllerForCommand("cmd_runJunkControls");
- if (!tbController) {
- setTimeout(injectCalendarCommandController, 0);
- return;
- } else {
- calendarController.defaultController = tbController;
- }
+ let tbController = top.controllers.getControllerForCommand("cmd_runJunkControls");
+ if (tbController) {
+ calendarController.defaultController = tbController;
+ top.controllers.insertControllerAt(0, calendarController);
+ document.commandDispatcher.updateCommands("calendar_commands");
} else {
- // On Sunbird, we also need to set up our hacky command controller.
- top.controllers.insertControllerAt(0, calendarController2);
+ setTimeout(injectCalendarCommandController, 0);
}
-
- // This needs to be done for all applications
- top.controllers.insertControllerAt(0, calendarController);
- document.commandDispatcher.updateCommands("calendar_commands");
}
/**
* Remove the calendar command controller from the document.
*/
function removeCalendarCommandController() {
top.controllers.removeController(calendarController);
}
@@ -844,23 +827,23 @@ function setupContextItemType(event, ite
* Shows the given date in the current view, if in calendar mode.
*
* XXX This function is misplaced, should go to calendar-views.js or a minimonth
* specific js file.
*
* @param aNewDate The new date as a JSDate.
*/
function minimonthPick(aNewDate) {
- if (cal.isSunbird() || gCurrentMode == "calendar" || gCurrentMode == "task") {
+ if (gCurrentMode == "calendar" || gCurrentMode == "task") {
let cdt = cal.jsDateToDateTime(aNewDate, currentView().timezone);
cdt.isDate = true;
currentView().goToDay(cdt);
// update date filter for task tree
- let tree = document.getElementById(cal.isSunbird() ? "unifinder-todo-tree" : "calendar-task-tree");
+ let tree = document.getElementById("calendar-task-tree");
tree.updateFilter();
}
}
/**
* Selects all items, based on which mode we are currently in and what task tree is focused
*/
function selectAllItems() {
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -31,30 +31,29 @@ function addCalendarNames(aEvent) {
* Change the opening context menu for the selected tasks.
*
* @param aEvent The popupshowing event of the opening menu.
*/
function changeContextMenuForTask(aEvent) {
handleTaskContextMenuStateChange(aEvent);
let idnode = document.popupNode.id;
- let sunbird = cal.isSunbird();
let items = getSelectedTasks(aEvent);
document.getElementById("task-context-menu-new").hidden =
- (idnode == "unifinder-todo-tree" && !sunbird);
+ (idnode == "unifinder-todo-tree");
document.getElementById("task-context-menu-modify").hidden =
- (idnode == "unifinder-todo-tree" && !sunbird);
+ (idnode == "unifinder-todo-tree");
document.getElementById("task-context-menu-new-todaypane").hidden =
- (idnode == "calendar-task-tree" || sunbird);
+ (idnode == "calendar-task-tree");
document.getElementById("task-context-menu-modify-todaypane").hidden =
- (idnode == "calendar-task-tree" || sunbird);
+ (idnode == "calendar-task-tree");
document.getElementById("task-context-menu-filter-todaypane").hidden =
- (idnode == "calendar-task-tree" || sunbird);
+ (idnode == "calendar-task-tree");
document.getElementById("task-context-menu-separator-filter").hidden =
- (idnode == "calendar-task-tree" || sunbird);
+ (idnode == "calendar-task-tree");
let tasksSelected = (items.length > 0);
applyAttributeToMenuChildren(aEvent.target, "disabled", (!tasksSelected));
if (calendarController.isCommandEnabled("calendar_new_todo_command") &&
calendarController.isCommandEnabled("calendar_new_todo_todaypane_command")) {
document.getElementById("calendar_new_todo_command").removeAttribute("disabled");
document.getElementById("calendar_new_todo_todaypane_command").removeAttribute("disabled");
} else {
--- a/calendar/base/content/calendar-unifinder-todo.js
+++ b/calendar/base/content/calendar-unifinder-todo.js
@@ -1,20 +1,16 @@
/* 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/. */
/**
* Called when the window is loaded to set up the unifinder-todo.
*/
function prepareCalendarToDoUnifinder() {
- if (isSunbird()) {
- document.getElementById("todo-label").removeAttribute("collapsed");
- }
-
// add listener to update the date filters
getViewDeck().addEventListener("dayselect", updateCalendarToDoUnifinder, false);
updateCalendarToDoUnifinder();
}
/**
* Updates the applied filter and show completed view of the unifinder todo.
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -236,32 +236,16 @@ var calendarViewController = {
ritem.oldItem,
null);
}
endBatchTransaction();
}
};
/**
- * This function provides a neutral way to switch between views.
- *
- * @param aType The type of view to select.
- * @param aShow If true, the calendar view is forced to be shown, i.e.
- * bringing the view to the front if the application is
- * showing other elements (Lightning).
- */
-function switchCalendarView(aType, aShow) {
- if (cal.isSunbird()) {
- sbSwitchToView(aType);
- } else {
- ltnSwitchCalendarView(aType, aShow);
- }
-}
-
-/**
* This function does the common steps to switch between views. Should be called
* from app-specific view switching functions
*
* @param aViewType The type of view to select.
*/
function switchToView(aViewType) {
var viewDeck = getViewDeck();
var selectedDay;
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -60,17 +60,17 @@ function onDismissAllAlarms() {
parentItems[node.item.parentItem.hashId] = node.item.parentItem;
getAlarmService().dismissAlarm(node.item, node.alarm);
}
}
}
/**
* Event handler fired when the alarm widget's "Details..." label was clicked.
- * Open the event dialog in the most recent Sunbird or Thunderbird window
+ * Open the event dialog in the most recent Thunderbird window.
*
* @param event The itemdetails event.
*/
function onItemDetails(event) {
// We want this to happen in a calendar window if possible. Otherwise open
// it using our window.
let calWindow = cal.getCalendarWindow();
if (calWindow) {
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -1107,30 +1107,25 @@ function updateTitle() {
}
/**
* Updates the stylesheet to add rules to hide certain aspects (i.e task only
* elements when editing an event).
*
* TODO We can use general rules here, i.e
* dialog[itemType="task"] .event-only,
- * dialog[itemType="event"] .task-only,
- * dialog:not([product="lightning"]) .lightning-only {
+ * dialog[itemType="event"] .task-only {
* display: none;
* }
- */
+*/
function updateStyle() {
const kDialogStylesheet = "chrome://calendar/skin/calendar-event-dialog.css";
for each (let stylesheet in document.styleSheets) {
if (stylesheet.href == kDialogStylesheet) {
- if (cal.isSunbird()) {
- stylesheet.insertRule(".lightning-only { display: none; }",
- stylesheet.cssRules.length);
- }
if (cal.isEvent(window.calendarItem)) {
stylesheet.insertRule(".todo-only { display: none; }",
stylesheet.cssRules.length);
} else if (cal.isToDo(window.calendarItem)) {
stylesheet.insertRule(".event-only { display: none; }",
stylesheet.cssRules.length);
}
return;
@@ -2959,33 +2954,26 @@ function onCommandCustomize() {
for (var i = 0; i < menubar.childNodes.length; ++i) {
menubar.childNodes[i].setAttribute("disabled", true);
}
// Disable the toolbar context menu items
document.getElementById("cmd_customize").setAttribute("disabled", "true");
var id = "event-toolbox";
- if (isSunbird()) {
- window.openDialog("chrome://global/content/customizeToolbar.xul",
- "CustomizeToolbar",
- "chrome,all,dependent",
- document.getElementById(id));
- } else {
- var wintype = document.documentElement.getAttribute("windowtype");
- wintype = wintype.replace(/:/g, "");
-
- window.openDialog("chrome://global/content/customizeToolbar.xul",
- "CustomizeToolbar" + wintype,
- "chrome,all,dependent",
- document.getElementById(id), // toolbar dom node
- false, // is mode toolbar yes/no?
- null, // callback function
- "dialog"); // name of this mode
- }
+ var wintype = document.documentElement.getAttribute("windowtype");
+ wintype = wintype.replace(/:/g, "");
+
+ window.openDialog("chrome://global/content/customizeToolbar.xul",
+ "CustomizeToolbar" + wintype,
+ "chrome,all,dependent",
+ document.getElementById(id), // toolbar dom node
+ false, // is mode toolbar yes/no?
+ null, // callback function
+ "dialog"); // name of this mode
}
/**
* Prompts the user to change the start timezone.
*/
function editStartTimezone() {
editTimezone("timezone-starttime",
gStartTime.getInTimezone(gStartTimezone),
--- a/calendar/base/content/dialogs/calendar-event-dialog.xul
+++ b/calendar/base/content/dialogs/calendar-event-dialog.xul
@@ -286,38 +286,35 @@
label="&event.menu.item.new.label;"
accesskey="&event.menu.item.new.accesskey;">
<menupopup id="item-new-menupopup">
<menuitem id="item-new-message-menuitem"
label="&event.menu.item.new.message.label;"
accesskey="&event.menu.item.new.message.accesskey;"
key="new-message-key"
command="cmd_item_new_message"
- disable-on-readonly="true"
- class="lightning-only"/>
+ disable-on-readonly="true"/>
<menuitem id="item-new-event-menuitem"
label="&event.menu.item.new.event.label;"
accesskey="&event.menu.item.new.event.accesskey;"
key="new-event-key"
command="cmd_item_new_event"
disable-on-readonly="true"/>
<menuitem id="item-new-task-menuitem"
label="&event.menu.item.new.task.label;"
accesskey="&event.menu.item.new.task.accesskey;"
key="new-task-key"
command="cmd_item_new_task"
disable-on-readonly="true"/>
- <menuseparator id="item-new-menuseparator1"
- class="lightning-only"/>
+ <menuseparator id="item-new-menuseparator1"/>
<menuitem id="item-new-address-menuitem"
label="&event.menu.item.new.contact.label;"
accesskey="&event.menu.item.new.contact.accesskey;"
command="cmd_item_new_card"
- disable-on-readonly="true"
- class="lightning-only"/>
+ disable-on-readonly="true"/>
</menupopup>
</menu>
<menuseparator id="item-menuseparator1"/>
<menuitem id="item-save-menuitem"
label="&event.menu.item.save.label;"
accesskey="&event.menu.item.save.accesskey;"
key="save-key"
command="cmd_save"/>
@@ -817,22 +814,20 @@
crop="right"
tooltiptext=""
onclick="showAttendeePopup(event)"/>
</row>
<row id="event-grid-attendee-row-2">
<spacer/>
<hbox id="notify-options-box" align="center">
<checkbox id="notify-attendees-checkbox"
- class="lightning-only"
label="&event.attendees.notify.label;"
oncommand="changeUndiscloseCheckboxStatus();"
pack="start"/>
<checkbox id="undisclose-attendees-checkbox"
- class="lightning-only"
label="&event.attendees.notifyundisclosed.label;"
tooltiptext="&event.attendees.notifyundisclosed.tooltip;"
pack="start"/>
</hbox>
</row>
<separator class="groove" id="event-grid-basic-separator"/>
--- a/calendar/base/content/dialogs/calendar-migration-dialog.js
+++ b/calendar/base/content/dialogs/calendar-migration-dialog.js
@@ -19,27 +19,25 @@ var gMigrateWizard = {
* user can then check these off to migrate the data from those sources.
*/
loadMigrators: function gmw_load() {
var listbox = document.getElementById("datasource-list");
//XXX Once we have branding for lightning, this hack can go away
var props = Services.strings.createBundle("chrome://calendar/locale/migration.properties");
- if (!cal.isSunbird()) {
- var wizard = document.getElementById("migration-wizard");
- var desc = document.getElementById("wizard-desc");
- // Since we don't translate "Lightning"...
- wizard.title = props.formatStringFromName("migrationTitle",
+ var wizard = document.getElementById("migration-wizard");
+ var desc = document.getElementById("wizard-desc");
+ // Since we don't translate "Lightning"...
+ wizard.title = props.formatStringFromName("migrationTitle",
+ ["Lightning"],
+ 1);
+ desc.textContent = props.formatStringFromName("migrationDescription",
["Lightning"],
1);
- desc.textContent = props.formatStringFromName("migrationDescription",
- ["Lightning"],
- 1);
- }
migLOG("migrators: " + window.arguments.length);
for each (var migrator in window.arguments[0]) {
var listItem = document.createElement("listitem");
listItem.setAttribute("type", "checkbox");
listItem.setAttribute("checked", true);
listItem.setAttribute("label", migrator.title);
listItem.migrator = migrator;
@@ -290,44 +288,32 @@ var gDataMigrator = {
var migrators = [];
// Look in our current profile directory, in case we're upgrading in
// place
var profileDir = this.dirService.get("ProfD", Components.interfaces.nsILocalFile);
profileDir.append("Calendar");
if (profileDir.exists()) {
migLOG("Found old extension directory in current app");
- var title;
- if (!cal.isSunbird()) {
- title = "Mozilla Calendar Extension";
- } else {
- title = "Sunbird 0.2";
- }
+ let title = "Mozilla Calendar Extension";
migrators.push(new dataMigrator(title, extMigrator, [profileDir]));
}
// Check the profiles of the various other moz-apps for calendar data
var profiles = [];
// Do they use Firefox?
var ffProf, sbProf, tbProf;
if ((ffProf = this.getFirefoxProfile())) {
profiles.push(ffProf);
}
- if (!cal.isSunbird()) {
- // If we're lightning, check Sunbird
- if ((sbProf = this.getSunbirdProfile())) {
- profiles.push(sbProf);
- }
- } else {
- // Otherwise, check Thunderbird
- if ((tbProf = this.getThunderbirdProfile())) {
- profiles.push(tbProf);
- }
+ // We're lightning, check Sunbird
+ if ((sbProf = this.getSunbirdProfile())) {
+ profiles.push(sbProf);
}
// Now check all of the profiles in each of these folders for data
for each (var prof in profiles) {
var dirEnum = prof.directoryEntries;
while (dirEnum.hasMoreElements()) {
var profile = dirEnum.getNext().QueryInterface(Components.interfaces.nsIFile);
if (profile.isFile()) {
@@ -414,37 +400,25 @@ var gDataMigrator = {
calManager.registerCalendar(calendar);
getCompositeCalendar().addCalendar(calendar);
}
migLOG("icalMig making callback");
aCallback();
}
var profileDir = this.dirService.get("ProfD", Components.interfaces.nsILocalFile);
var icalSpec = profileDir.path;
- var icalFile;
- if (cal.isSunbird()) {
- var diverge = icalSpec.indexOf("Sunbird");
- if (diverge == -1) {
- return [];
- }
- icalSpec = icalSpec.substr(0, diverge);
- icalFile = Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile);
- icalFile.initWithPath(icalSpec);
- } else {
- var diverge = icalSpec.indexOf("Thunderbird");
- if (diverge == -1) {
- return [];
- }
- icalSpec = icalSpec.substr(0, diverge);
- icalFile = Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile);
- icalFile.initWithPath(icalSpec);
- icalFile.append("Application Support");
+ var diverge = icalSpec.indexOf("Thunderbird");
+ if (diverge == -1) {
+ return [];
}
+ icalSpec = icalSpec.substr(0, diverge);
+ var icalFile = Components.classes["@mozilla.org/file/local;1"]
+ .createInstance(Components.interfaces.nsILocalFile);
+ icalFile.initWithPath(icalSpec);
+ icalFile.append("Application Support");
icalFile.append("iCal");
if (icalFile.exists()) {
return [new dataMigrator("Apple iCal", icalMigrate, [icalFile])];
}
return [];
},
@@ -618,37 +592,19 @@ var gDataMigrator = {
getFirefoxProfile: function gdm_getFF() {
return this.getNormalProfile("Firefox");
},
/**
* @see getFirefoxProfile
*/
getThunderbirdProfile: function gdm_getTB() {
- var localFile;
- var profileRoot = this.dirService.get("DefProfRt", Components.interfaces.nsILocalFile);
- migLOG("profileRoot = " + profileRoot.path);
- if (!cal.isSunbird()) {
- localFile = profileRoot;
- } else {
- // Now it gets ugly
- switch (this.mPlatform) {
- case "darwin": // Mac OS X
- case "winnt":
- localFile = profileRoot.parent.parent.parent;
- localFile.append("Thunderbird");
- localFile.append("Profiles");
- break;
- default: // Unix
- localFile = profileRoot.parent.parent;
- localFile.append(".thunderbird");
- }
- }
- migLOG("searching for Thunderbird in " + localFile.path);
- return localFile.exists() ? localFile : null;
+ let profileRoot = this.dirService.get("DefProfRt", Components.interfaces.nsILocalFile);
+ migLOG("searching for Thunderbird in " + profileRoot.path);
+ return profileRoot.exists() ? profileRoot : null;
},
/**
* @see getFirefoxProfile
*/
getSunbirdProfile: function gdm_getSB() {
return this.getNormalProfile("Sunbird");
},
@@ -657,51 +613,34 @@ var gDataMigrator = {
* Common function to retrieve the profile directory for a given app.
* @see getFirefoxProfile
*/
getNormalProfile: function gdm_getNorm(aAppName) {
var localFile;
var profileRoot = this.dirService.get("DefProfRt", Components.interfaces.nsILocalFile);
migLOG("profileRoot = " + profileRoot.path);
- if (!cal.isSunbird()) { // We're in Thunderbird
- switch (this.mPlatform) {
- case "darwin": // Mac OS X
- localFile = profileRoot.parent.parent;
- localFile.append("Application Support");
- localFile.append(aAppName);
- localFile.append("Profiles");
- break;
- case "winnt":
- localFile = profileRoot.parent.parent;
- localFile.append("Mozilla");
- localFile.append(aAppName);
- localFile.append("Profiles");
- break;
- default: // Unix
- localFile = profileRoot.parent;
- localFile.append(".mozilla");
- localFile.append(aAppName.toLowerCase());
- break;
- }
- } else {
- switch (this.mPlatform) {
- // On Mac and Windows, we can just remove the "Sunbird" and
- // replace it with "Firefox" to get to Firefox
- case "darwin": // Mac OS X
- case "winnt":
- localFile = profileRoot.parent.parent;
- localFile.append(aAppName);
- localFile.append("Profiles");
- break;
- default: // Unix
- localFile = profileRoot.parent;
- localFile.append(aAppName.toLowerCase());
- break;
- }
+ switch (this.mPlatform) {
+ case "darwin": // Mac OS X
+ localFile = profileRoot.parent.parent;
+ localFile.append("Application Support");
+ localFile.append(aAppName);
+ localFile.append("Profiles");
+ break;
+ case "winnt":
+ localFile = profileRoot.parent.parent;
+ localFile.append("Mozilla");
+ localFile.append(aAppName);
+ localFile.append("Profiles");
+ break;
+ default: // Unix
+ localFile = profileRoot.parent;
+ localFile.append(".mozilla");
+ localFile.append(aAppName.toLowerCase());
+ break;
}
migLOG("searching for " + aAppName + " in " + localFile.path);
return localFile.exists() ? localFile : null;
}
};
/**
* logs to system and error console, depending on the calendar.migration.log
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -96,17 +96,17 @@ calendar.jar:
content/calendar/preferences/views.js (content/preferences/views.js)
content/calendar/preferences/views.xul (content/preferences/views.xul)
content/calendar/widgets/minimonth.xml (content/widgets/minimonth.xml)
content/calendar/widgets/calendar-alarm-widget.xml (content/widgets/calendar-alarm-widget.xml)
content/calendar/widgets/calendar-widgets.xml (content/widgets/calendar-widgets.xml)
content/calendar/widgets/calendar-list-tree.xml (content/widgets/calendar-list-tree.xml)
content/calendar/calendar-subscriptions-list.xml (content/widgets/calendar-subscriptions-list.xml)
content/calendar/widgets/calendar-widget-bindings.css (content/widgets/calendar-widget-bindings.css)
-* content/calendar/calApplicationUtils.js (src/calApplicationUtils.js)
+ content/calendar/calApplicationUtils.js (src/calApplicationUtils.js)
content/calendar/calUtils.js (src/calUtils.js)
content/calendar/calFilter.js (src/calFilter.js)
content/calendar/WindowsNTToZoneInfoTZId.properties (src/WindowsNTToZoneInfoTZId.properties)
% skin calendar classic/1.0 chrome/skin/linux/calendar/ os=Linux
% skin calendar classic/1.0 chrome/skin/osx/calendar/ os=Darwin
% skin calendar classic/1.0 chrome/skin/windows/calendar/ os=WINNT
% skin calendar-common classic/1.0 chrome/skin/common/
% skin calendar-windows classic/1.0 chrome/skin/windows/calendar/win-classic/ os=WINNT osversion<6
--- a/calendar/base/modules/calProviderUtils.jsm
+++ b/calendar/base/modules/calProviderUtils.jsm
@@ -244,19 +244,16 @@ cal.getImipTransport = function calGetIm
* Gets the configured identity and account of a particular calendar instance, or null.
*
* @param aCalendar Calendar instance
* @param outAccount Optional out value for account
* @return The configured identity
*/
cal.getEmailIdentityOfCalendar = function calGetEmailIdentityOfCalendar(aCalendar, outAccount) {
cal.ASSERT(aCalendar, "no calendar!", Components.results.NS_ERROR_INVALID_ARG);
- if (cal.isSunbird()) {
- return null;
- }
let key = aCalendar.getProperty("imip.identity.key");
if (key !== null) {
if (key.length == 0) { // i.e. "None"
return null;
}
let identity = null;
cal.calIterateEmailIdentities(
function(identity_, account) {
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.js
@@ -264,17 +264,17 @@ calAlarmService.prototype = {
let timerCallback = {
alarmService: this,
notify: function timer_notify() {
let now = nowUTC();
let start;
if (!this.alarmService.mRangeEnd) {
// This is our first search for alarms. We're going to look for
// alarms +/- 1 month from now. If someone sets an alarm more than
- // a month ahead of an event, or doesn't start Sunbird/Lightning
+ // a month ahead of an event, or doesn't start Lightning
// for a month, they'll miss some, but that's a slim chance
start = now.clone();
start.month -= 1;
this.alarmService.mRangeStart = start.clone();
} else {
// This is a subsequent search, so we got all the past alarms before
start = this.alarmService.mRangeEnd.clone();
}
@@ -575,17 +575,17 @@ calAlarmService.prototype = {
// Purge out all alarm timers belonging to the refreshed/loaded calendar:
this.disposeCalendarTimers(aCalendars);
// Purge out all alarms from dialog belonging to the refreshed/loaded calendar:
this.mObservers.notify("onRemoveAlarmsByCalendar", aCalendars);
// Total refresh similar to startup. We're going to look for
// alarms +/- 1 month from now. If someone sets an alarm more than
- // a month ahead of an event, or doesn't start Sunbird/Lightning
+ // a month ahead of an event, or doesn't start Lightning
// for a month, they'll miss some, but that's a slim chance
let start = nowUTC();
let until = start.clone();
start.month -= 1;
until.month += 1;
this.findAlarms(aCalendars, start, until);
},
--- a/calendar/base/src/calApplicationUtils.js
+++ b/calendar/base/src/calApplicationUtils.js
@@ -1,94 +1,15 @@
/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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/. */
Components.utils.import("resource://gre/modules/Services.jsm");
-function openAboutDialog()
-{
- const SUNBIRD_ID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}";
- var url = (Services.appinfo.ID == SUNBIRD_ID) ?
- "chrome://sunbird/content/aboutDialog.xul" :
- "chrome://messenger/content/aboutDialog.xul" ;
-#ifdef XP_WIN
- var features = "chrome,centerscreen,dependent";
-#elifdef XP_MACOSX
- var features = "chrome,resizable=no,minimizable=no";
-#else
- var features = "chrome,centerscreen,dependent,dialog=no";
-#endif
- window.openDialog(url, "About", features);
-}
-
-/**
- * Opens the release notes page for this version of the application.
- */
-function openReleaseNotes()
-{
- const SUNBIRD_ID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}";
- if (Services.appinfo.ID == SUNBIRD_ID) {
- var bundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- var relNotesURL = bundle.formatStringFromName("releaseNotesURL",[Services.appinfo.version],1)
- launchBrowser(relNotesURL);
- } else {
- openFormattedRegionURL('app.releaseNotesURL');
- }
-}
-
-/**
- * Opens region specific web pages for the application like the release notes, the help site, etc.
- * aResourceName --> the string resource ID in region.properties to load.
- */
-function openRegionURL(aResourceName)
-{
- try {
- var regionBundle = Services.strings.createBundle("chrome://messenger-region/locale/region.properties");
- // the release notes are special and need to be formatted with the app version
- var urlToOpen;
- if (aResourceName == "releaseNotesURL")
- urlToOpen = regionBundle.formatStringFromName(aResourceName, [Services.appinfo.version], 1);
- else
- urlToOpen = regionBundle.GetStringFromName(aResourceName);
-
- var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
- .getService(Components.interfaces.nsIExternalProtocolService);
- protocolSvc.loadUrl(Services.io.newURI(urlToOpen, null, null));
- } catch (ex) {}
-}
-
-/**
- * Fetches the url for the passed in pref name, formats it and then loads it in the default
- * browser.
- *
- * @param aPrefName - name of the pref that holds the url we want to format and open
- */
-function openFormattedRegionURL(aPrefName)
-{
- var formattedUrl = getFormattedRegionURL(aPrefName);
-
- var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].
- getService(Components.interfaces.nsIExternalProtocolService);
- protocolSvc.loadUrl(Services.io.newURI(formattedUrl, null, null));
-}
-
-/**
- * Fetches the url for the passed in pref name and uses the URL formatter service to
- * process it.
- *
- * @param aPrefName - name of the pref that holds the url we want to format and open
- * @returns the formatted url string
- */
-function getFormattedRegionURL(aPrefName)
-{
- return Services.urlFormatter.formatURLPref(aPrefName);
-}
-
/**
* Launch the given url (string) in the external browser. If an event is passed,
* then this is only done on left click and the event propagation is stopped.
*
* @param url The URL to open, as a string
* @param event (optional) The event that caused the URL to open
*/
function launchBrowser(url, event)
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -43,19 +43,16 @@ calCalendarManager.prototype = {
// calIStartupService:
startup: function ccm_startup(aCompleteListener) {
AddonManager.addAddonListener(gCalendarManagerAddonListener);
this.checkAndMigrateDB();
this.mCache = null;
this.mCalObservers = null;
this.mRefreshTimer = {};
this.setupOfflineObservers();
- if (cal.isSunbird()) {
- this.loginMasterPassword();
- }
this.mNetworkCalendarCount = 0;
this.mReadonlyCalendarCount = 0;
this.mCalendarCount = 0;
Services.obs.addObserver(this, "http-on-modify-request", false);
// We only add the observer if the pref is set and only check for the
// pref on startup to avoid checking for every http request
@@ -91,34 +88,16 @@ calCalendarManager.prototype = {
setupOfflineObservers: function ccm_setupOfflineObservers() {
Services.obs.addObserver(this, "network:offline-status-changed", false);
},
cleanupOfflineObservers: function ccm_cleanupOfflineObservers() {
Services.obs.removeObserver(this, "network:offline-status-changed");
},
- loginMasterPassword: function ccm_loginMasterPassword() {
- // Try to avoid the multiple master password prompts on startup scenario
- // by prompting for the master password upfront.
- let token = Components.classes["@mozilla.org/security/pk11tokendb;1"]
- .getService(Components.interfaces.nsIPK11TokenDB)
- .getInternalKeyToken();
-
- // Only log in to the internal token if it is already initialized,
- // otherwise we get a "Change Master Password" dialog.
- try {
- if (!token.needsUserInit) {
- token.login(false);
- }
- } catch (ex) {
- // If user cancels an exception is expected.
- }
- },
-
observe: function ccm_observe(aSubject, aTopic, aData) {
switch (aTopic) {
case "timer-callback":
// Refresh all the calendars that can be refreshed.
var cals = this.getCalendars({});
for each (var calendar in cals) {
if (!calendar.getProperty("disabled") && calendar.canRefresh) {
calendar.refresh();
@@ -411,32 +390,23 @@ calCalendarManager.prototype = {
throw table + " SELECT returned no results";
},
//
// / DB migration code ends here
//
alertAndQuit: function cmgr_alertAndQuit() {
- // If we're Lightning, we want to include the extension name
- // in the error message rather than blaming Thunderbird.
- var errorBoxTitle;
- var errorBoxText;
- var errorBoxButtonLabel;
+ // We want to include the extension name in the error message rather
+ // than blaming Thunderbird.
var hostAppName = calGetString("brand", "brandShortName", null, "branding");
- if (isSunbird()) {
- errorBoxTitle = calGetString("calendar", "tooNewSchemaErrorBoxTitle", [hostAppName]);
- errorBoxText = calGetString("calendar", "tooNewSchemaErrorBoxTextSunbird", [hostAppName]);
- errorBoxButtonLabel = calGetString("calendar", "tooNewSchemaButtonQuit", [hostAppName]);
- } else {
- var calAppName = calGetString("lightning", "brandShortName", null, "lightning");
- errorBoxTitle = calGetString("calendar", "tooNewSchemaErrorBoxTitle", [calAppName]);
- errorBoxText = calGetString("calendar", "tooNewSchemaErrorBoxTextLightning", [calAppName, hostAppName]);
- errorBoxButtonLabel = calGetString("calendar", "tooNewSchemaButtonRestart", [hostAppName]);
- }
+ var calAppName = calGetString("lightning", "brandShortName", null, "lightning");
+ var errorBoxTitle = calGetString("calendar", "tooNewSchemaErrorBoxTitle", [calAppName]);
+ var errorBoxText = calGetString("calendar", "tooNewSchemaErrorBoxTextLightning", [calAppName, hostAppName]);
+ var errorBoxButtonLabel = calGetString("calendar", "tooNewSchemaButtonRestart", [hostAppName]);
var promptSvc = Services.prompt;
var errorBoxButtonFlags = (promptSvc.BUTTON_POS_0 *
promptSvc.BUTTON_TITLE_IS_STRING +
promptSvc.BUTTON_POS_0_DEFAULT);
var choice = promptSvc.confirmEx(null,
@@ -444,26 +414,22 @@ calCalendarManager.prototype = {
errorBoxText,
errorBoxButtonFlags,
errorBoxButtonLabel,
null, // No second button text
null, // No third button text
null, // No checkbox
{ value: false }); // Unnecessary checkbox state
- if (isSunbird()) {
- Services.startup.quit(Components.interfaces.nsIAppStartup.eForceQuit);
- } else {
- // Disable Lightning
- AddonManager.getAddonByID("{e2fda1a4-762b-4020-b5ad-a41df1933103}", function getLightningExt(aAddon) {
- aAddon.userDisabled = true;
- Services.startup.quit(Components.interfaces.nsIAppStartup.eRestart |
- Components.interfaces.nsIAppStartup.eForceQuit);
- });
- }
+ // Disable Lightning
+ AddonManager.getAddonByID("{e2fda1a4-762b-4020-b5ad-a41df1933103}", function getLightningExt(aAddon) {
+ aAddon.userDisabled = true;
+ Services.startup.quit(Components.interfaces.nsIAppStartup.eRestart |
+ Components.interfaces.nsIAppStartup.eForceQuit);
+ });
},
/**
* calICalendarManager interface
*/
createCalendar: function cmgr_createCalendar(type, uri) {
try {
if (!Components.classes["@mozilla.org/calendar/calendar;1?type=" + type]) {
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -1144,31 +1144,16 @@ function getProgressAtom(aTask) {
if (aTask.entryDate && aTask.entryDate.isValid &&
aTask.entryDate.jsDate.getTime() < now.getTime()) {
return "inprogress";
}
return "future";
}
-/**
- * Returns true if we are Sunbird (according to our UUID), false otherwise.
- */
-function isSunbird() {
- if (isSunbird.mIsSunbird === undefined) {
- try {
- isSunbird.mIsSunbird = (Services.appinfo.ID == "{718e30fb-e89b-41dd-9da7-e25a45638b28}");
- } catch (e) {
- dump("### Warning: Could not access appinfo, using unreliable check for Lightning\n");
- isSunbird.mIsSunbird = !("@mozilla.org/lightning/mime-converter;1" in Components.classes);
- }
- }
- return isSunbird.mIsSunbird;
-}
-
function calInterfaceBag(iid) {
this.init(iid);
}
calInterfaceBag.prototype = {
mIid: null,
mInterfaces: null,
/// internal:
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -220,17 +220,17 @@ function refreshUIBits() {
/**
* Switch the calendar view, and optionally switch to calendar mode.
*
* @param aType The type of view to select.
* @param aShow If true, the mode will be switched to calendar if not
* already there.
*/
-function ltnSwitchCalendarView(aType, aShow) {
+function switchCalendarView(aType, aShow) {
gLastShownCalendarView = aType;
if (aShow && gCurrentMode != "calendar") {
// This function in turn calls switchToView(), so return afterwards.
ltnSwitch2Calendar();
return;
}
--- a/calendar/locales/en-US/README.txt
+++ b/calendar/locales/en-US/README.txt
@@ -1,3 +1,3 @@
-For information about installing, running and configuring Sunbird
-including a list of known issues and troubleshooting information,
+For information about installing, running and configuring Lightning
+including a list of known issues and troubleshooting information,
refer to: http://www.mozilla.org/projects/calendar/
--- a/calendar/locales/en-US/chrome/calendar/calendar.properties
+++ b/calendar/locales/en-US/chrome/calendar/calendar.properties
@@ -102,21 +102,16 @@ None=None
## @loc none
tooNewSchemaErrorBoxTitle=Your calendar data isn't compatible with this version of %1$S
# LOCALIZATION NOTE (tooNewSchemaErrorBoxTextLightning):
# %1$S will be replaced with the name of the calendar application e.g. 'Lightning'
# %2$S will be replaced with the name of the host application 'calendar'
tooNewSchemaErrorBoxTextLightning=The calendar data in your profile was updated by a newer version of %1$S, and continuing will probably cause the information to be lost or corrupted. %1$S will now be disabled and %2$S restarted.
-# LOCALIZATION NOTE (tooNewSchemaErrorBoxTextSunbird):
-# %1$S will be replaced with the name of the calendar application e.g. 'Sunbird'
-# %2$S will be replaced with the name of the host application 'calendar'
-tooNewSchemaErrorBoxTextSunbird=The calendar data in your profile was updated by a newer version of %1$S, and continuing will probably cause the information to be lost or corrupted. %1$S will now quit.
-
# LOCALIZATION NOTE (tooNewSchemaButtonRestart):
# %1$S will be replaced with the name of the host application 'Calendar'
tooNewSchemaButtonRestart=Restart %1$S
# LOCALIZATION NOTE (tooNewSchemaButtonQuit):
# %1$S will be replaced with the name of the host application 'Calendar'
tooNewSchemaButtonQuit=Quit %1$S
@@ -334,31 +329,16 @@ go=Go
# Some languages have different conjugations of 'next' and 'last'. If yours
# does not, simply repeat the value. This will be used with day names, as in
# 'next Sunday'.
next1=next
next2=next
last1=last
last2=last
-# Master Password
-changeMasterPassword=Change Master Password…
-pw_change2empty_in_fips_mode=You are currently in FIPS mode. FIPS requires a non-empty Master Password.
-pw_change_failed_title=Password Change Failed
-
-# Check for Updates (SUNBIRD_ONLY)
-updatesItem_default=Check for Updates…
-updatesItem_defaultFallback=Check for Updates…
-updatesItem_downloading=Downloading %S…
-updatesItem_downloadingFallback=Downloading Update…
-updatesItem_resume=Resume Downloading %S…
-updatesItem_resumeFallback=Resume Downloading Update…
-updatesItem_pending=Apply Downloaded Update Now…
-updatesItem_pendingFallback=Apply Downloaded Update Now…
-
# Alarm Dialog
# LOCALIZATION NOTE (alarmWindowTitle.label): Semi-colon list of plural
# forms. See: http://developer.mozilla.org/en/Localization_and_Plurals
alarmWindowTitle.label=#1 Reminder;#1 Reminders
# LOCALIZATION NOTE (alarmStarts):
# used for a display the start of an alarm like 'Starts: Thu 2 Oct 2008 13:21'
# %1$S will be replaced with a date-time
@@ -381,20 +361,16 @@ alarmYesterdayAt=Yesterday at %1$S
# Alarm interface strings
# LOCALIZATION NOTE: These strings do not get displayed. They are only visible
# when exporting an item with i.e a DISPLAY alarm, that doesn't have a
# description set, or an EMAIL alarm that doesn't have a summary set.
alarmDefaultDescription=Default Mozilla Description
alarmDefaultSummary=Default Mozilla Summary
-# offline support strings (SUNBIRD ONLY)
-offlineTooltip=You are currently offline.
-onlineTooltip=You are currently online.
-
taskDetailsStatusNeedsAction=Needs Action
# LOCALIZATION NOTE (taskDetailsStatusInProgress):
# used for a display of how much of a task is completed '25% Complete'
# %1$S will be replaced with the number of percentage completed
taskDetailsStatusInProgress=%1$S%% Complete
taskDetailsStatusCompleted=Completed
--- a/calendar/locales/filter.py
+++ b/calendar/locales/filter.py
@@ -1,28 +1,24 @@
def test(mod, path, entity = None):
import re
# ignore anyhting but calendar stuff
if mod not in ("netwerk", "dom", "toolkit", "security/manager",
- "calendar", "other-licenses/branding/sunbird"):
+ "calendar"):
return False
# Timezone properties don't have to be translated
if path == "chrome/calendar/timezones.properties":
return "report"
# Noun class entries do not have to be translated
if path == "chrome/calendar/calendar-event-dialog.properties":
return not re.match(r".*Nounclass[1-9]", entity)
# most extraction related strings are not required
if path == "chrome/calendar/calendar-extract.properties":
if not re.match(r"from.today", entity):
return "report"
- # Sunbird specific strings don't need translation
- if path.startswith("chrome/sunbird/"):
- return False
-
# Everything else should be taken into account
return True
deleted file mode 100755
--- a/calendar/locales/l10n-1.9.2.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[general]
-depth = ../..
-all = calendar/locales/all-locales
-
-[compare]
-dirs = calendar
- other-licenses/branding/sunbird
-
-[includes]
-# non-central apps might want to use %(topsrcdir)s here, or other vars
-# RFE: that needs to be supported by compare-locales, too, though
-toolkit = mozilla/toolkit/locales/l10n.ini
-
-[extras]
-
-[include_toolkit]
-type = hg
-mozilla = releases/mozilla-1.9.2
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
--- a/calendar/locales/l10n.ini
+++ b/calendar/locales/l10n.ini
@@ -1,26 +1,12 @@
[general]
depth = ../..
all = calendar/locales/all-locales
[compare]
dirs = calendar
-# If you are comparing for Sunbird, you must also add:
-# other-licenses/branding/sunbird
-
-
-# To avoid having localizers translate extra strings, the inclusion for toolkit
-# has been commented out. If you would like to compare for Sunbird, you need to
-# add these in again
-#
# [includes]
# # non-central apps might want to use %(topsrcdir)s here, or other vars
# # RFE: that needs to be supported by compare-locales, too, though
-# toolkit = mozilla/toolkit/locales/l10n.ini
#
# [extras]
#
-# [include_toolkit]
-# type = hg
-# mozilla = mozilla-central
-# repo = http://hg.mozilla.org/
-# l10n.ini = toolkit/locales/l10n.ini
--- a/calendar/providers/gdata/content/gdata-migration.js
+++ b/calendar/providers/gdata/content/gdata-migration.js
@@ -57,17 +57,17 @@ function getMigratableCalendars() {
"attendees-only|free-busy|basic)(\\.ics)?$");
return c.type == "ics" && c.uri.spec.match(re);
}
return getCalendarManager().getCalendars({}).filter(isMigratable);
}
/**
- * Load Handler for both the wizard and the Sunbird/Thunderbird main windows.
+ * Load Handler for both the wizard and the Thunderbird main window.
*/
function gdata_migration_loader() {
// Only load once
window.removeEventListener("load", gdata_migration_loader, false);
if (document.documentElement.id == "gdata-migration-wizard") {
// This is the migration wizard, load the calendars neeeded.
let listbox = document.getElementById("calendars-listbox");
--- a/calendar/providers/gdata/install.rdf
+++ b/calendar/providers/gdata/install.rdf
@@ -11,48 +11,31 @@
<em:id>{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}</em:id>
<em:version>@GDATA_VERSION@</em:version>
<em:type>2</em:type>
<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
- <!-- Sunbird -->
- <em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
- <em:minVersion>@CALENDAR_VERSION@</em:minVersion>
- <em:maxVersion>@CALENDAR_VERSION@</em:maxVersion>
- </Description>
- </em:targetApplication>
- <em:targetApplication>
- <Description>
<!-- Thunderbird -->
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>17.0a1</em:minVersion>
<em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
</Description>
</em:targetApplication>
<em:targetApplication>
<Description>
<!-- SeaMonkey -->
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.14a1</em:minVersion>
<em:maxVersion>@SEAMONKEY_VERSION@</em:maxVersion>
</Description>
</em:targetApplication>
- <em:requires>
- <Description>
- <!-- Lightning (also Sunbird via extension stub) -->
- <em:id>{e2fda1a4-762b-4020-b5ad-a41df1933103}</em:id>
- <em:minVersion>1.9a1</em:minVersion>
- <em:maxVersion>@CALENDAR_VERSION@</em:maxVersion>
- </Description>
- </em:requires>
-
<em:name>Provider for Google Calendar</em:name>
<em:description>Allows bidirectional access to Google Calendar</em:description>
<em:creator>Philipp Kewisch</em:creator>
<em:contributor>Mark James (http://www.famfamfam.com/lab/icons/silk/)</em:contributor>
<em:homepageURL>https://addons.mozilla.org/thunderbird/addon/4631</em:homepageURL>
<em:iconURL>chrome://gdata-provider/content/gcal.png</em:iconURL>
<em:unpack>true</em:unpack>
</Description>
--- a/calendar/providers/gdata/jar.mn
+++ b/calendar/providers/gdata/jar.mn
@@ -2,22 +2,20 @@
# 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/.
gdata-provider.jar:
% content gdata-provider %content/
% overlay chrome://calendar/content/calendarCreation.xul chrome://gdata-provider/content/calendarCreation.xul
-% overlay chrome://sunbird/content/calendar.xul chrome://gdata-provider/content/gdata-migration-overlay.xul application={718e30fb-e89b-41dd-9da7-e25a45638b28}
% overlay chrome://messenger/content/messenger.xul chrome://gdata-provider/content/gdata-migration-overlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
% overlay chrome://calendar/content/calendar-event-dialog.xul chrome://gdata-provider/content/gdata-calendar-event-dialog.xul
% overlay chrome://calendar/content/calendar-event-dialog-reminder.xul chrome://gdata-provider/content/gdata-event-dialog-reminder.xul
% style chrome://calendar/content/calendar-event-dialog.xul chrome://gdata-provider/skin/gdata-event-dialog-reminder.css
-% style chrome://calendar/content/calendar.xul chrome://gdata-provider/skin/gdata-event-dialog-reminder.css application={718e30fb-e89b-41dd-9da7-e25a45638b28}
% style chrome://messenger/content/messenger.xul chrome://gdata-provider/skin/gdata-event-dialog-reminder.css application={3550f703-e582-4d05-9a08-453d09bdfdc6}
content/calendarCreation.xul (content/calendarCreation.xul)
content/gdata-calendar-event-dialog.xul (content/gdata-calendar-event-dialog.xul)
content/gdata-event-dialog-reminder.xul (content/gdata-event-dialog-reminder.xul)
content/gdata-migration.js (content/gdata-migration.js)
content/gdata-migration-overlay.xul (content/gdata-migration-overlay.xul)
content/gdata-migration-wizard.xul (content/gdata-migration-wizard.xul)
content/gcal.png (content/gcal.png)
deleted file mode 100644
--- a/calendar/resources/content/calendar.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/* 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/. */
-
-/**
- * Called from calendar.xul window onload.
- */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Preferences.jsm");
-
-function calendarInit() {
- // Take care of common initialization
- commonInitCalendar();
-
- var toolbox = document.getElementById("calendar-toolbox");
- toolbox.customizeDone = CalendarToolboxCustomizeDone;
-
- // Setup the offline manager
- calendarOfflineManager.init();
-
- // Handle commandline args
- for (var i = 0; i < window.arguments.length; i++) {
- try {
- var cl = window.arguments[i].QueryInterface(Components.interfaces.nsICommandLine);
- } catch (ex) {
- dump("unknown argument passed to main window\n");
- continue;
- }
- handleCommandLine(cl);
- }
-}
-
-function handleCommandLine(aComLine) {
- var comLine = aComLine;
- var calurl = [];
-
- var validFlags = ["showdate", "subscribe", "url"];
- var flagsToProcess = [];
-
- for each (var flag in validFlags) {
- if (comLine.findFlag(flag, false) >= 0) {
- flagsToProcess.push(flag);
- }
- }
-
- for each (var flag in flagsToProcess) {
- var param = comLine.handleFlagWithParam(flag, false);
-
- switch (flag) {
- case "showdate":
- currentView().goToDay(cal.jsDateToDateTime(new Date(param)));
- break;
- case "subscribe":
- case "url":
- // Double-clicking an .ics file on the Mac causes
- // LaunchServices to launch Sunbird with the -url command line
- // switch like so:
- // sunbird-bin -url file://localhost/Users/foo/mycal.ics -foreground
- calurl.push(param);
- break;
- default:
- // no-op
- break;
- }
- }
-
- // Look for arguments without a flag.
- // This is needed to handle double-click on Windows and Linux.
- if (comLine.length >= 1) {
- for (var i = 0; i < comLine.length; i++) {
- if (!comLine.getArgument(i).match(/^-/) &&
- !comLine.getArgument(i).match(/^\s/)) {
- calurl.push( comLine.getArgument(i) );
- } else {
- comLine.removeArguments(i, i);
- }
- }
- }
-
- //subscribe to all files in the calurl array
- for (var i = 0; i < calurl.length; i++) {
- var uri = comLine.resolveURI(calurl[i]);
- var calendar = getCalendarManager().createCalendar("ics", uri);
-
- // Strip ".ics" from filename for use as calendar name
- var fullPathRegEx = new RegExp("([^/:]+)[.]ics$");
- var path = uri.path;
- var prettyName = path.match(fullPathRegEx);
-
- var name;
- if (prettyName && prettyName.length >= 1) {
- name = decodeURIComponent(prettyName[1]);
- } else {
- name = calGetString("calendar", "untitledCalendarName");
- }
- calendar.name = name;
-
- getCalendarManager().registerCalendar(calendar);
- }
-}
-
-/* Called at midnight to tell us to update the views and other ui bits */
-function refreshUIBits() {
- try {
- currentView().goToDay(now());
- refreshEventTree();
- } catch (exc) {
- ASSERT(false, exc);
- }
-
- // and schedule again...
- scheduleMidnightUpdate(refreshUIBits);
-}
-
-/**
- * Steps to be taken when the sunbird calendar window is unloaded.
- */
-function calendarFinish() {
- // Workaround to make the selected tab persist. See bug 249552.
- var tabbox = document.getElementById("tablist");
- tabbox.setAttribute("selectedIndex", tabbox.selectedIndex);
-
- // Finish the offline manager
- calendarOfflineManager.uninit();
-
- // Common finish steps
- commonFinishCalendar();
-}
-
-function closeCalendar() {
- self.close();
-}
-
-function openPreferences() {
- // Check to see if the prefwindow is already open
- var win = Services.wm.getMostRecentWindow("Calendar:Preferences");
-
- if (win) {
- win.focus();
- } else {
- // The prefwindow should only be modal on non-instant-apply platforms
- var instApply = Preferences.get("browser.preferences.instantApply", false);
-
- var features = "chrome,titlebar,toolbar,centerscreen," +
- (instApply ? "dialog=no" : "modal");
-
- var url = "chrome://calendar/content/preferences/preferences.xul";
-
- openDialog(url, "Preferences", features);
- }
-}
-
-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://global/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();
-}
-
-function changeNumberOfWeeks(menuitem) {
- currentView().weeksInView = menuitem.value;
-}
-
-function pickAndGoToDate() {
- var initialDate = currentView().selectedDay.getInTimezone(floating()).jsDate;
- var callback = function receiveAndGoToDate(pickedDate) {
- currentView().goToDay(cal.jsDateToDateTime(pickedDate));
- getMinimonth().value = pickedDate;
- };
- openDialog("chrome://sunbird/content/calendar-gotodate-dialog.xul",
- "CalendarGoToDateDialog",
- "chrome,modal",
- {callback: callback, date: initialDate});
-}
-
-function sbSwitchToView(newView) {
- var mwWeeksCommand = document.getElementById("menu-numberofweeks-inview");
- if (newView == "multiweek") {
- mwWeeksCommand.removeAttribute("disabled");
- } else {
- mwWeeksCommand.setAttribute("disabled", true);
- }
-
- // Call the common view switching code in calendar-views.js
- switchToView(newView);
-}
deleted file mode 100644
--- a/calendar/resources/content/calendarService.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* 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/. */
-
-/*
- * This file contains the following calendar related components:
- * 1. Command line handler service, for responding to the -webcal command line
- * option. (CLineHandler)
- * 2. Content handler for responding to content of type text/calendar
- * (ICALContentHandler)
- * 3. Protocol handler for supplying a channel to the browser when an webcal://
- * link is clicked. (ICALProtocolHandler)
- * 4. A (nearly empty) imeplementation of nsIChannel for telling the browser
- * that webcal:// links have the content type text/calendar (BogusChannel)
- */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://calendar/modules/calUtils.jsm");
-
-/* Command Line handler service */
-function CLineService() {
- this.wrappedJSObject = this;
-}
-const CLineServiceClassID = Components.ID("{65ef4b0b-d116-4b93-bf8a-84525992bf27}");
-const CLineServiceInterfaces = [Components.interfaces.nsICommandLineHandler];
-CLineService.prototype = {
- classID: CLineServiceClassID,
- QueryInterface: XPCOMUtils.generateQI(CLineServiceInterfaces),
- classInfo: XPCOMUtils.generateCI({
- classID: CLineServiceClassID,
- contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=calendar",
- classDescription: "Calendar Commandline Handler",
- interfaces: CLineServiceInterfaces,
- flags: Components.interfaces.nsIClassInfo.SINGLETON
- }),
-
- /* nsICommandLineHandler */
- handle : function service_handle(cmdLine) {
- if (!cmdLine.preventDefault) {
- // just pass all arguments on to the Sunbird window
- Services.ww.openWindow(null, "chrome://sunbird/content/calendar.xul",
- "_blank", "chrome,dialog=no,all", cmdLine);
- cmdLine.preventDefault = true;
- }
- },
-
- helpInfo : " -subscribe or -url Pass in a path pointing to a calendar\n" +
- " to subscribe to.\n" +
- " -showdate Pass in a value for a javascript date\n" +
- " to show this date on startup.\n"
-};
-
-/* text/calendar content handler */
-function ICALContentHandler() {
- this.wrappedJSObject = this;
-}
-const ICALContentHandlerClassID = Components.ID("{9ebf4c8a-7770-40a6-aeed-e1738129535a}");
-const ICALContentHandlerInterfaces = [Components.interfaces.nsIContentHandler];
-ICALContentHandler.prototype = {
- classID: ICALContentHandlerClassID,
- QueryInterface: XPCOMUtils.generateQI(ICALContentHandlerInterfaces),
- classInfo: XPCOMUtils.generateCI({
- classID: ICALContentHandlerClassID,
- contractID: "@mozilla.org/uriloader/content-handler;1?type=text/calendar",
- classDescription: "text/calendar Content Handler",
- interfaces: ICALContentHandlerInterfaces
- }),
-
- handleContent: function handleContent(aContentType, aWindowTarget, aRequest) {
- let channel = aRequest.QueryInterface(Components.interfaces.nsIChannel);
-
- // Cancel the request ...
- let uri = channel.URI;
- const NS_BINDING_ABORTED = 0x804b0002 // from nsError.h
- aRequest.cancel(NS_BINDING_ABORTED);
-
- // ... Subscribe to the uri ...
- let calendarManager = cal.getCalendarManager();
- let newCalendar = calendarManager.createCalendar('ics', uri);
-
- // XXX Come up with a better name, like the filename or X-WR-CALNAME
- // XXX Also, make up a color
- newCalendar.name = "temp";
-
- calendarManager.registerCalendar(newCalendar);
-
- // ... and open or focus a calendar window.
- let w = cal.getCalendarWindow();
-
- if (w) {
- w.focus();
- } else {
- w = Services.appShell.hiddenDOMWindow;
-
- let args = {};
- args.channel = channel;
- w.openDialog("chrome://sunbird/content/calendar.xul",
- "calendar",
- "chrome,menubar,resizable,scrollbars,status,toolbar,dialog=no",
- args);
- }
- }
-};
-
-function NYI() {
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* bogus webcal channel used by the ICALProtocolHandler */
-function BogusChannel(aURI) {
- this.URI = aURI;
- this.originalURI = aURI;
-}
-const BogusChannelClassID = Components.ID("{1e36ef5d-92d9-488f-ada6-9f15a1b57acf}");
-const BogusChannelInterfaces = [
- Components.interfaces.nsIRequest,
- Components.interfaces.nsIChannel
-];
-BogusChannel.prototype = {
- classID: BogusChannelClassID,
- QueryInterface: XPCOMUtils.generateQI(BogusChannelInterfaces),
- classInfo: XPCOMUtils.generateCI({
- classID: BogusChannelClassID,
- contractID: "@mozilla.org/calendar/webcal-channel;1",
- classDescription: "webcal bogus channel",
- interfaces: BogusChannelInterfaces
- }),
-
- URI: null,
- originalURI: null,
-
- /* nsIChannel */
- loadAttributes: null,
- contentType: "text/calendar",
- contentLength: 0,
- owner: null,
- loadGroup: null,
- notificationCallbacks: null,
- securityInfo: null,
-
- open: NYI,
- asyncOpen: NYI,
-
- asyncOpen: function asyncOpen(observer, ctxt) {
- observer.onStartRequest(this, ctxt);
- },
-
- asyncRead: function asyncRead(listener, ctxt) {
- return listener.onStartRequest(this, ctxt);
- },
-
- /* nsIRequest */
- isPending: function() true,
- status: Components.results.NS_OK,
-
- cancel: function cancel(aStatus) {
- this.status = aStatus;
- },
-
- suspend: NYI,
- resume: NYI
-};
-
-var components = [CLineService, ICALContentHandler, BogusChannel];
-var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
deleted file mode 100644
--- a/calendar/resources/content/calendarService.manifest
+++ /dev/null
@@ -1,9 +0,0 @@
-component {65ef4b0b-d116-4b93-bf8a-84525992bf27} calendarService.js
-contract @mozilla.org/commandlinehandler/general-startup;1?type=calendar {65ef4b0b-d116-4b93-bf8a-84525992bf27}
-category command-line-handler x-default @mozilla.org/commandlinehandler/general-startup;1?type=calendar
-
-component {9ebf4c8a-7770-40a6-aeed-e1738129535a} calendarService.js
-contract @mozilla.org/uriloader/content-handler;1?type=text/calendar {9ebf4c8a-7770-40a6-aeed-e1738129535a}
-
-component {1e36ef5d-92d9-488f-ada6-9f15a1b57acf} calendarService.js
-contract @mozilla.org/calendar/webcal-channel;1 {1e36ef5d-92d9-488f-ada6-9f15a1b57acf}
--- a/calendar/resources/jar.mn
+++ b/calendar/resources/jar.mn
@@ -1,16 +1,15 @@
#filter substitution
# 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/.
calendar.jar:
% content calendar %content/calendar/
- content/calendar/calendar.js (content/calendar.js)
content/calendar/calendarCreation.xul (content/calendarCreation.xul)
content/calendar/calendarCreation.js (content/calendarCreation.js)
content/calendar/publish.js (content/publish.js)
content/calendar/publishDialog.js (content/publishDialog.js)
content/calendar/publishDialog.xul (content/publishDialog.xul)
content/calendar/mouseoverPreviews.js (content/mouseoverPreviews.js)
content/calendar/sound.wav (content/sound.wav)
content/calendar/datetimepickers/datetimepickers.css (content/datetimepickers/datetimepickers.css)
--- a/calendar/resources/moz.build
+++ b/calendar/resources/moz.build
@@ -1,11 +1,6 @@
# vim: set filetype=python:
# 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/.
-EXTRA_COMPONENTS += [
- 'content/calendarService.js',
- 'content/calendarService.manifest',
-]
-
JAR_MANIFESTS += ['jar.mn']
--- a/calendar/timezones/install.rdf
+++ b/calendar/timezones/install.rdf
@@ -10,25 +10,16 @@
<Description about="urn:mozilla:install-manifest">
<em:id>calendar-timezones@mozilla.org</em:id>
<em:version>@TIMEZONES_VERSION@</em:version>
<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
- <!-- Sunbird; we define an upper limit, because we come
- with a top-notch calendar-timezones.xpi on every release -->
- <em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
- <em:minVersion>0.9</em:minVersion>
- <em:maxVersion>@CALENDAR_VERSION@</em:maxVersion>
- </Description>
- </em:targetApplication>
- <em:targetApplication>
- <Description>
<!-- Thunderbird -->
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>2.0</em:minVersion>
<em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
</Description>
</em:targetApplication>
<em:targetApplication>
<Description>
@@ -36,16 +27,16 @@
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.0</em:minVersion>
<em:maxVersion>@SEAMONKEY_VERSION@</em:maxVersion>
</Description>
</em:targetApplication>
<em:name>Timezone Definitions for Mozilla Calendar</em:name>
<em:unpack>true</em:unpack>
- <em:description>Timezone definitions required by Sunbird and Lightning</em:description>
+ <em:description>Timezone definitions required by Lightning</em:description>
<em:creator>Mozilla Calendar Project</em:creator>
<em:iconURL>chrome://calendar-timezones/skin/addon-icon32.png</em:iconURL>
#if 0
<em:homepageURL>https://addons.mozilla.org/en-US/thunderbird/addon/xxx todo</em:homepageURL>
#endif
</Description>
</RDF>