/usr/lib/thunderbird-addons/extensions/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}/chrome/gdata-provider/content/gdata-list-tree.xml is in xul-ext-gdata-provider 1:38.6.0+build1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | <?xml version="1.0" encoding="UTF-8"?>
<!-- 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/. -->
<!DOCTYPE overlay SYSTEM "chrome://calendar/locale/calendar.dtd">
<bindings id="gdata-list-tree-bindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="gdata-list-tree" extends="chrome://calendar/content/widgets/calendar-list-tree.xml#calendar-list-tree">
<content>
<xul:tree anonid="tree"
xbl:inherits="hidecolumnpicker"
hidecolumnpicker="true"
seltype="single"
flex="1">
<xul:treecols anonid="treecols"
xbl:inherits="hideheader"
hideheader="true">
<xul:treecol anonid="checkbox-treecol"
xbl:inherits="cycler,hideheader"
cycler="true"
hideheader="true"
width="17"/>
<xul:treecol anonid="color-treecol"
xbl:inherits="cycler,hideheader"
hideheader="true"
width="16"/>
<xul:treecol anonid="calendarname-treecol"
xbl:inherits="cycler,hideheader"
primary="true"
hideheader="true"
label="&calendar.unifinder.tree.calendarname.label;"
flex="1"/>
<xul:treecol anonid="status-treecol"
xbl:inherits="cycler,hideheader"
hideheader="true"
width="18"/>
<children includes="treecol"/>
<xul:treecol anonid="scrollbar-spacer"
xbl:inherits="cycler,hideheader"
fixed="true"
hideheader="true">
<!-- This is a very elegant workaround to make sure the last column
is not covered by the scrollbar in case of an overflow. This
treecol needs to be here last -->
<xul:slider anonid="scrollbar-slider" orient="vertical"/>
</xul:treecol>
</xul:treecols>
<xul:treechildren anonid="treechildren"
xbl:inherits="tooltip=childtooltip,context=childcontext"
tooltip="_child"
context="_child"
ondragstart="onDragStart(event);"
onoverflow="displayScrollbarSpacer(true)"
onunderflow="displayScrollbarSpacer(false)">
<children includes="tooltip|menupopup"/>
</xul:treechildren>
</xul:tree>
</content>
<implementation>
<constructor><![CDATA[
this.tree.view = this;
]]></constructor>
<property name="mockCalendarHeader" readonly="true">
<getter><![CDATA[
let calmgr = cal.getCalendarManager();
let uri = "dummy://calendar";
let mem = calmgr.createCalendar("memory", Services.io.newURI(uri, null, null));
mem.setProperty("disabled", true);
mem.name = "Calendars";
mem.id = cal.getUUID();
return mem;
]]></getter>
</property>
<property name="mockTaskHeader" readonly="true">
<getter><![CDATA[
let calmgr = cal.getCalendarManager();
let uri = "dummy://tasks";
let mem = calmgr.createCalendar("memory", Services.io.newURI(uri, null, null));
mem.setProperty("disabled", true);
mem.name = "Task Lists";
mem.id = cal.getUUID();
return mem;
]]></getter>
</property>
<field name="mCalendarHeaderIndex">0</field>
<field name="mTasksHeaderIndex">0</field>
<field name="QueryInterface">XPCOMUtils.generateQI([Components.interfaces.nsITreeView])</field>
<property name="calendars">
<getter><![CDATA[
return this.mCalendarList;
]]></getter>
<setter><![CDATA[
for (let i = 0; i < val.length; i++) {
let calendar = val[i];
let spec = calendar.uri.spec;
if (calendar.type == "memory") {
if (spec == "dummy://calendar") {
this.mCalendarHeaderIndex = i;
} else if (spec == "dummy://tasks") {
this.mTasksHeaderIndex = i;
}
}
this.addCalendar(calendar);
}
return this.mCalendarList;
]]></setter>
</property>
<method name="removeCalendar">
<parameter name="aCalendar"/>
<body><![CDATA[
let index = this.findIndexById(aCalendar.id);
if (index < this.mCalendarHeaderIndex) {
this.mCalendarHeaderIndex--;
}
if (index < this.mTasksHeaderIndex) {
this.mTasksHeaderIndex--;
}
return this.__proto__.__proto__.removeCalendar.call(this, aCalendar);
]]></body>
</method>
<method name="clear">
<body><![CDATA[
let calendars = this.mCalendarList.concat([]);
calendars.forEach(this.removeCalendar, this);
]]></body>
</method>
<method name="getRowProperties">
<parameter name="aRow"/>
<parameter name="aProps"/>
<body><![CDATA[
let props = this.__proto__.__proto__.getRowProperties.call(this, aRow, aProps);
let calendar = this.getCalendar(aRow);
if (calendar.readOnly) {
if (aProps) {
// Compatibility with old tree props code
aProps.AppendElement(cal.getAtomFromService("checked"));
} else {
props += " checked";
}
}
return props;
]]></body>
</method>
<method name="isContainerEmpty">
<parameter name="aRow"/>
<body><![CDATA[
return ((aRow == this.mCalendarHeaderIndex &&
aRow + 1 == this.mTasksHeaderIndex) ||
(aRow == this.mTasksHeaderIndex &&
aRow == this.mCalendarList.lengh));
]]></body>
</method>
<method name="isContainer">
<parameter name="aRow"/>
<body><![CDATA[
let calendar = this.getCalendar(aRow);
return (calendar.type == "memory" && calendar.uri.schemeIs("dummy"));
]]></body>
</method>
<method name="isContainerOpen">
<parameter name="aRow"/>
<body><![CDATA[
return true;
]]></body>
</method>
<method name="getParentIndex">
<parameter name="aRow"/>
<body><![CDATA[
let calendar = this.getCalendar(aRow);
if (calendar.uri.path.contains("?calendar")) {
return this.mCalendarHeaderIndex;
} else if (calendar.uri.path.contains("?tasks")) {
return this.mTasksHeaderIndex;
} else {
return -1;
}
]]></body>
</method>
<method name="hasNextSibling">
<parameter name="aRow"/>
<parameter name="aAfterIndex"/>
<body><![CDATA[
if (aRow == this.mCalendarHeaderIndex) {
return aAfterIndex < this.mTasksHeaderIndex;
} else if (aRow == this.mTasksHeaderIndex) {
return false;
} else {
return aAfterIndex != this.mCalendarHeaderIndex - 1 &&
aAfterIndex != this.mTasksHeaderIndex - 1;
}
]]></body>
</method>
<method name="cycleCell">
<parameter name="aRow"/>
<parameter name="aCol"/>
<body><![CDATA[
let calendar = this.getCalendar(aRow);
let composite = this.compositeCalendar;
if (composite.getCalendarById(calendar.id)) {
composite.removeCalendar(calendar);
} else {
composite.addCalendar(calendar);
}
this.treebox.invalidateRow(aRow);
]]></body>
</method>
<method name="getLevel">
<parameter name="aRow"/>
<body><![CDATA[
return this.isContainer(aRow) ? 0 : 1;
]]></body>
</method>
</implementation>
</binding>
</bindings>
|