bug 320266 - Moves javascript bits that don't implement nsIModule out of components/. r=dmose

This commit is contained in:
mattwillis%gmail.com 2006-07-27 14:10:31 +00:00
Родитель fe120e3c14
Коммит 395310ec43
10 изменённых файлов: 114 добавлений и 78 удалений

Просмотреть файл

@ -57,10 +57,6 @@ REQUIRES = xpcom \
ical \ ical \
$(NULL) $(NULL)
# storage \
# sqlite3 \
# $(NULL)
XPIDL_MODULE = calbaseinternal XPIDL_MODULE = calbaseinternal
XPIDLSRCS = \ XPIDLSRCS = \
calInternalInterfaces.idl \ calInternalInterfaces.idl \
@ -76,18 +72,30 @@ CPPSRCS = calDateTime.cpp \
EXTRA_COMPONENTS = \ EXTRA_COMPONENTS = \
calAlarmService.js \ calItemModule.js \
calAttachment.js \ $(NULL)
calAttendee.js \
calCalendarManager.js \ EXTRA_SCRIPTS = \
calRecurrenceInfo.js \ calAlarmService.js \
calEvent.js \ calAttachment.js \
calItemBase.js \ calAttendee.js \
calItemModule.js \ calCalendarManager.js \
calTodo.js \ calDateTimeFormatter.js \
calDateTimeFormatter.js \ calEvent.js \
calWeekTitleService.js \ calItemBase.js \
calUtils.js \ calRecurrenceInfo.js \
$(NULL) calTodo.js \
calUtils.js \
calWeekTitleService.js \
$(NULL)
# Use NSINSTALL to make the directory, as there's no mtime to preserve.
libs:: $(EXTRA_SCRIPTS)
$(NSINSTALL) -D $(DIST)/bin/js
$(INSTALL) $^ $(DIST)/bin/js
# The install target must use SYSINSTALL, which is NSINSTALL in copy mode.
install:: $(EXTRA_SCRIPTS)
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/js
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -151,8 +151,10 @@ var calItemModule = {
var dirsvc = Components.classes[dirsvcContractID].getService(propsIID); var dirsvc = Components.classes[dirsvcContractID].getService(propsIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// We expect to find the subscripts in our directory. // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find the subscripts in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
for (var i = 0; i < componentData.length; i++) { for (var i = 0; i < componentData.length; i++) {
var scriptName = componentData[i].script; var scriptName = componentData[i].script;

Просмотреть файл

@ -43,11 +43,23 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
EXTRA_COMPONENTS = \ EXTRA_COMPONENTS = \
calOutlookCSVImportExport.js \ calImportExportModule.js \
calHtmlExport.js \ $(NULL)
calIcsImportExport.js \
calListFormatter.js \ EXTRA_SCRIPTS = \
calImportExportModule.js \ calHtmlExport.js \
$(NULL) calIcsImportExport.js \
calListFormatter.js \
calOutlookCSVImportExport.js \
$(NULL)
# Use NSINSTALL to make the directory, as there's no mtime to preserve.
libs:: $(EXTRA_SCRIPTS)
$(NSINSTALL) -D $(DIST)/bin/js
$(INSTALL) $^ $(DIST)/bin/js
# The install target must use SYSINSTALL, which is NSINSTALL in copy mode.
install:: $(EXTRA_SCRIPTS)
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/js
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -104,8 +104,10 @@ var calImportExportModule = {
var dirsvc = Components.classes[dirsvcContractID].getService(propsIID); var dirsvc = Components.classes[dirsvcContractID].getService(propsIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// We expect to find the subscripts in our directory. // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find the subscripts in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
for (var i = 0; i < componentData.length; i++) { for (var i = 0; i < componentData.length; i++) {
var scriptName = componentData[i].script; var scriptName = componentData[i].script;

Просмотреть файл

@ -184,40 +184,37 @@ bin\components\nsProgressDialog.js
bin\components\nsSetDefaultMail.js bin\components\nsSetDefaultMail.js
bin\components\nsUnsetDefaultMail.js bin\components\nsUnsetDefaultMail.js
bin\components\nsUpdateService.js bin\components\nsUpdateService.js
;!4sunbird bin\components\nsDictionary.js
bin\components\nsHelperAppDlg.js bin\components\nsHelperAppDlg.js
bin\components\nsProxyAutoConfig.js bin\components\nsProxyAutoConfig.js
;!4sunbird bin\components\nsSidebar.js
;!4sunbird bin\components\nsXmlRpcClient.js
bin\components\nsExtensionManager.js bin\components\nsExtensionManager.js
bin\components\extensions.xpt bin\components\extensions.xpt
bin\components\update.xpt bin\components\update.xpt
bin\components\calendarService.js bin\components\calendarService.js
bin\components\calAlarmMonitor.js bin\components\calAlarmMonitor.js
bin\components\calAttendee.js
bin\components\calAlarmService.js
bin\components\calAttachment.js
bin\components\calCalendarManager.js
bin\components\calCompositeCalendar.js bin\components\calCompositeCalendar.js
bin\components\calDateTimeFormatter.js
bin\components\calDavCalendar.js bin\components\calDavCalendar.js
bin\components\calEvent.js
bin\components\calHtmlExport.js
bin\components\calICSCalendar.js bin\components\calICSCalendar.js
bin\components\calIcsImportExport.js
bin\components\calImportExportModule.js bin\components\calImportExportModule.js
bin\components\calItemBase.js
bin\components\calItemModule.js bin\components\calItemModule.js
bin\components\calListFormatter.js
bin\components\calMemoryCalendar.js bin\components\calMemoryCalendar.js
bin\components\calOutlookCSVImportExport.js
bin\components\calRecurrenceInfo.js
bin\components\calStorageCalendar.js bin\components\calStorageCalendar.js
bin\components\calTodo.js
bin\components\calUtils.js
bin\components\calWeekTitleService.js
bin\components\FeedProcessor.js bin\components\FeedProcessor.js
bin\components\pluginGlue.js bin\components\pluginGlue.js
bin\js\calAlarmService.js
bin\js\calAttachment.js
bin\js\calAttendee.js
bin\js\calCalendarManager.js
bin\js\calDateTimeFormatter.js
bin\js\calEvent.js
bin\js\calHtmlExport.js
bin\js\calIcsImportExport.js
bin\js\calItemBase.js
bin\js\calListFormatter.js
bin\js\calOutlookCSVImportExport.js
bin\js\calRecurrenceInfo.js
bin\js\calTodo.js
bin\js\calUtils.js
bin\js\calWeekTitleService.js
; [Calendar Chrome Files] ; [Calendar Chrome Files]
bin\chrome\calendar.jar bin\chrome\calendar.jar

Просмотреть файл

@ -739,24 +739,24 @@ calDavCalendar.prototype = {
{ {
this.observeBatchChange(false); this.observeBatchChange(false);
}, },
// nsIInterfaceRequestor impl // nsIInterfaceRequestor impl
getInterface: function(iid) { getInterface: function(iid) {
if (iid.equals(Components.interfaces.nsIAuthPrompt)) { if (iid.equals(Components.interfaces.nsIAuthPrompt)) {
// use the window watcher service to get a nsIAuthPrompt impl // use the window watcher service to get a nsIAuthPrompt impl
return Components.classes["@mozilla.org/embedcomp/window-watcher;1"] return Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher) .getService(Components.interfaces.nsIWindowWatcher)
.getNewAuthPrompter(null); .getNewAuthPrompter(null);
} }
else if (iid.equals(Components.interfaces.nsIPrompt)) { else if (iid.equals(Components.interfaces.nsIPrompt)) {
// use the window watcher service to get a nsIPrompt impl // use the window watcher service to get a nsIPrompt impl
return Components.classes["@mozilla.org/embedcomp/window-watcher;1"] return Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher) .getService(Components.interfaces.nsIWindowWatcher)
.getNewPrompter(null); .getNewPrompter(null);
} }
throw Components.results.NS_ERROR_NO_INTERFACE; throw Components.results.NS_ERROR_NO_INTERFACE;
}, },
// //
// Helper functions // Helper functions
// //
@ -888,13 +888,16 @@ var calDavCalendarModule = {
const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1"; const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1";
const jssslIID = Components.interfaces.mozIJSSubScriptLoader; const jssslIID = Components.interfaces.mozIJSSubScriptLoader;
const iosvcContractID = "@mozilla.org/network/io-service;1"; const iosvcIID = Components.interfaces.nsIIOService; const iosvcContractID = "@mozilla.org/network/io-service;1";
const iosvcIID = Components.interfaces.nsIIOService;
var loader = Components.classes[jssslContractID].getService(jssslIID); var loader = Components.classes[jssslContractID].getService(jssslIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// Utils lives in the same directory we're in // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find utils in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
var scriptName = "calUtils.js"; var scriptName = "calUtils.js";
var f = appdir.clone(); var f = appdir.clone();

Просмотреть файл

@ -469,13 +469,16 @@ var calCompositeCalendarModule = {
const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1"; const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1";
const jssslIID = Components.interfaces.mozIJSSubScriptLoader; const jssslIID = Components.interfaces.mozIJSSubScriptLoader;
const iosvcContractID = "@mozilla.org/network/io-service;1"; const iosvcIID = Components.interfaces.nsIIOService; const iosvcContractID = "@mozilla.org/network/io-service;1";
const iosvcIID = Components.interfaces.nsIIOService;
var loader = Components.classes[jssslContractID].getService(jssslIID); var loader = Components.classes[jssslContractID].getService(jssslIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// Utils lives in the same directory we're in // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find utils in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
var scriptName = "calUtils.js"; var scriptName = "calUtils.js";
var f = appdir.clone(); var f = appdir.clone();

Просмотреть файл

@ -1004,13 +1004,16 @@ var calICSCalendarModule = {
const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1"; const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1";
const jssslIID = Components.interfaces.mozIJSSubScriptLoader; const jssslIID = Components.interfaces.mozIJSSubScriptLoader;
const iosvcContractID = "@mozilla.org/network/io-service;1"; const iosvcIID = Components.interfaces.nsIIOService; const iosvcContractID = "@mozilla.org/network/io-service;1";
const iosvcIID = Components.interfaces.nsIIOService;
var loader = Components.classes[jssslContractID].getService(jssslIID); var loader = Components.classes[jssslContractID].getService(jssslIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// Utils lives in the same directory we're in // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find utils in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
var scriptName = "calUtils.js"; var scriptName = "calUtils.js";
var f = appdir.clone(); var f = appdir.clone();

Просмотреть файл

@ -515,13 +515,16 @@ var calMemoryCalendarModule = {
const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1"; const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1";
const jssslIID = Components.interfaces.mozIJSSubScriptLoader; const jssslIID = Components.interfaces.mozIJSSubScriptLoader;
const iosvcContractID = "@mozilla.org/network/io-service;1"; const iosvcIID = Components.interfaces.nsIIOService; const iosvcContractID = "@mozilla.org/network/io-service;1";
const iosvcIID = Components.interfaces.nsIIOService;
var loader = Components.classes[jssslContractID].getService(jssslIID); var loader = Components.classes[jssslContractID].getService(jssslIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// Utils lives in the same directory we're in // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find utils in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
var scriptName = "calUtils.js"; var scriptName = "calUtils.js";
var f = appdir.clone(); var f = appdir.clone();

Просмотреть файл

@ -1856,13 +1856,16 @@ var calStorageCalendarModule = {
const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1"; const jssslContractID = "@mozilla.org/moz/jssubscript-loader;1";
const jssslIID = Components.interfaces.mozIJSSubScriptLoader; const jssslIID = Components.interfaces.mozIJSSubScriptLoader;
const iosvcContractID = "@mozilla.org/network/io-service;1"; const iosvcIID = Components.interfaces.nsIIOService; const iosvcContractID = "@mozilla.org/network/io-service;1";
const iosvcIID = Components.interfaces.nsIIOService;
var loader = Components.classes[jssslContractID].getService(jssslIID); var loader = Components.classes[jssslContractID].getService(jssslIID);
var iosvc = Components.classes[iosvcContractID].getService(iosvcIID); var iosvc = Components.classes[iosvcContractID].getService(iosvcIID);
// Utils lives in the same directory we're in // Note that unintuitively, __LOCATION__.parent == .
var appdir = __LOCATION__.parent; // We expect to find utils in ./../js
var appdir = __LOCATION__.parent.parent;
appdir.append("js");
var scriptName = "calUtils.js"; var scriptName = "calUtils.js";
var f = appdir.clone(); var f = appdir.clone();