Code review from JustPerfection
This commit is contained in:
parent
66d79cc804
commit
d0e8f0cde5
12
extension.js
12
extension.js
|
@ -79,7 +79,7 @@ class SignalMgt {
|
|||
this.onScroll = hashGet(item, 'on-scroll', '');
|
||||
}
|
||||
|
||||
destructor() {
|
||||
destroy() {
|
||||
for(let widgetIdx in this.widgets)
|
||||
this.disconnectWidgetSignals(this.widgets[widgetIdx]);
|
||||
for(let timeoutIdx in this.timeouts)
|
||||
|
@ -394,6 +394,7 @@ class MonitorWidget extends PanelMenu.Button {
|
|||
|
||||
destroy() {
|
||||
this.menu.close();
|
||||
this.signalManager.destroy();
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
|
@ -570,7 +571,10 @@ function loadInterfaceXml(extension, filename) {
|
|||
// is no `XML` on very recent SpiderMonkey releases (or, if SpiderMonkey is old enough,
|
||||
// will spit out a TypeError soon).
|
||||
if (contents instanceof Uint8Array)
|
||||
contents = imports.byteArray.toString(contents);
|
||||
{
|
||||
const decoder = new TextDecoder();
|
||||
contents = decoder.decode(contents);
|
||||
}
|
||||
const res = `<node>${contents}</node>`;
|
||||
return res;
|
||||
} else {
|
||||
|
@ -786,7 +790,7 @@ class GenericMonitorDBUS {
|
|||
monitorWidget.togglePopup();
|
||||
}
|
||||
|
||||
destructor() {
|
||||
destroy() {
|
||||
this._dbusImpl.emit_signal('onDeactivate', null);
|
||||
for (let groupIndex in this.monitor_groups) {
|
||||
const group = this.monitor_groups[groupIndex];
|
||||
|
@ -810,7 +814,7 @@ export default class GenericMonitorExtension extends Extension.Extension {
|
|||
|
||||
disable() {
|
||||
if (this.textDBusService !== null) {
|
||||
this.textDBusService.destructor();
|
||||
this.textDBusService.destroy();
|
||||
delete this.textDBusService;
|
||||
this.textDBusService = null;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"46",
|
||||
"45"
|
||||
],
|
||||
"url": "http://indefero.soutade.fr/p/genericmonitor"
|
||||
"url": "https://forge.soutade.fr/soutade/GnomeShellGenericMonitor"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user