/usr/share/cinnamon/js/ui/systray.js is in cinnamon-common 3.6.7-8ubuntu1.
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 | const Signals = imports.signals;
function SystrayManager() {
this._init();
}
SystrayManager.prototype = {
_init: function() {
this._roles = [];
},
registerRole: function(role, id) {
this._roles.push({role: role, id: id});
this.emit("changed");
},
unregisterRole: function(role, id) {
for (let i = this._roles.length - 1; i >= 0; i--) {
if (this._roles[i].id == id && this._roles[i].role == role) {
this._roles.splice(i, 1);
}
}
this.emit("changed");
},
unregisterId: function(id) {
for (let i = this._roles.length - 1; i >= 0; i--) {
if (this._roles[i].id == id) {
this._roles.splice(i, 1);
}
}
this.emit("changed");
},
getRoles: function(id) {
let roles = [];
for (let i = 0; i < this._roles.length; i++) {
roles.push(this._roles[i].role);
}
return roles;
}
}
Signals.addSignalMethods(SystrayManager.prototype);
|