зеркало из https://github.com/mozilla/pjs.git
- Convert to chrome.manifest, removing contents.rdf and outdated install.rdf
stanza. - Remove fake-account mess, replacing it with a sidebar model.
This commit is contained in:
Родитель
dfcd2f1722
Коммит
04396aeb57
|
@ -44,10 +44,9 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = lightning
|
MODULE = lightning
|
||||||
|
|
||||||
ifndef LIGHTNING_IN_TREE
|
|
||||||
export XPI_NAME = lightning
|
export XPI_NAME = lightning
|
||||||
|
XPI_INSTALL_EXTRAS = $(srcdir)/chrome.manifest
|
||||||
XPI_PKGNAME = lightning
|
XPI_PKGNAME = lightning
|
||||||
DIRS = ../../db/sqlite3/src ../../storage ../libical ../base
|
DIRS = ../../db/sqlite3/src ../../storage ../libical ../base
|
||||||
endif
|
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
content lightning jar:chrome/lightning.jar!/content/lightning/
|
||||||
|
locale lightning en-US jar:chrome/en-US.jar!/locale/en-US/lightning/
|
||||||
|
overlay chrome://messenger/content/messenger.xul chrome://lightning/content/messenger-overlay-sidebar.xul
|
|
@ -0,0 +1,44 @@
|
||||||
|
function getCalendarManager()
|
||||||
|
{
|
||||||
|
return Components.classes["@mozilla.org/calendar/manager;1"].getService(Components.interfaces.calICalendarManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCalendars()
|
||||||
|
{
|
||||||
|
return getCalendarManager().getCalendars({});
|
||||||
|
}
|
||||||
|
|
||||||
|
var ltnCalendarTreeView = {
|
||||||
|
get rowCount()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return getCalendars().length;
|
||||||
|
} catch (e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCellText: function (row, col)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return getCalendars()[row].name;
|
||||||
|
} catch (e) {
|
||||||
|
return "<Unknown " + row + ">";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setTree: function(treebox) { this.treebox = treebox; },
|
||||||
|
isContainer: function(row) { return false; },
|
||||||
|
isSeparator: function(row) { return false; },
|
||||||
|
isSorted: function(row) { return false; },
|
||||||
|
getLevel: function(row) { return 0; },
|
||||||
|
getImageSrc: function(row, col) { return null; },
|
||||||
|
getRowProperties: function(row, props) { },
|
||||||
|
getCellProperties: function(row, col, props) { },
|
||||||
|
getColumnProperties: function(colid, col, props) { }
|
||||||
|
};
|
||||||
|
|
||||||
|
function ltnSetTreeView()
|
||||||
|
{
|
||||||
|
document.getElementById("calendarTree").view = ltnCalendarTreeView;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("load", ltnSetTreeView, false);
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!-- DOCTYPE overlay SYSTEM "chrome://lightning/locale/lightning.dtd" -->
|
||||||
|
|
||||||
|
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
|
<script type="application/x-javascript" src="chrome://lightning/content/calendar-management.js"/>
|
||||||
|
|
||||||
|
<vbox id="folderPaneBox">
|
||||||
|
<splitter id="folderpaneCalendarSplitter" collapse="after" persist="state"/>
|
||||||
|
|
||||||
|
<popupset>
|
||||||
|
<popup id="ltnCalendarTreeContext" onpopupshowing="return true;">
|
||||||
|
<menuitem id="ltnCalendarTreeContext-newCalendar"
|
||||||
|
label="New Calendar"
|
||||||
|
oncommand="ltnNewCalendar();"/>
|
||||||
|
</popup>
|
||||||
|
</popupset>
|
||||||
|
|
||||||
|
<tree id="calendarTree" flex="1" context="ltnCalendarTreeContext">
|
||||||
|
<treecols>
|
||||||
|
<treecol label="Calendar" id="col-calendar-Calendar" flex="1"/>
|
||||||
|
</treecols>
|
||||||
|
<treechildren>
|
||||||
|
</treechildren>
|
||||||
|
</tree>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
</overlay>
|
|
@ -21,14 +21,5 @@
|
||||||
|
|
||||||
<em:description>An experimental calendar extension for Thunderbird</em:description>
|
<em:description>An experimental calendar extension for Thunderbird</em:description>
|
||||||
<em:creator>Mozilla Foundation Calendar Squad</em:creator>
|
<em:creator>Mozilla Foundation Calendar Squad</em:creator>
|
||||||
|
|
||||||
<em:file>
|
|
||||||
<Description about="urn:mozilla:extension:file:lightning.jar">
|
|
||||||
<em:package>content/lightning/</em:package>
|
|
||||||
</Description>
|
|
||||||
<Description about="urn:mozilla:extension:file:en-US.jar">
|
|
||||||
<em:locale>locale/en-US/lightning/</em:locale>
|
|
||||||
</Description>
|
|
||||||
</em:file>
|
|
||||||
</Description>
|
</Description>
|
||||||
</RDF>
|
</RDF>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
lightning.jar:
|
lightning.jar:
|
||||||
* content/lightning/contents.rdf (content/contents.rdf)
|
content/lightning/messenger-overlay-sidebar.xul (content/messenger-overlay-sidebar.xul)
|
||||||
content/lightning/messenger-overlay.xul (content/messenger-overlay.xul)
|
content/lightning/calendar-management.js (content/calendar-management.js)
|
||||||
content/lightning/fake-account.js (content/fake-account.js)
|
|
||||||
|
|
||||||
en-US.jar:
|
en-US.jar:
|
||||||
locale/en-US/lightning/lightning.dtd (locale/lightning.dtd)
|
locale/en-US/lightning/lightning.dtd (locale/lightning.dtd)
|
||||||
* locale/en-US/lightning/contents.rdf (locale/contents.rdf)
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче