Codebase list gnome-shell-extension-appindicator / e84f4cd
appIndicator: Remove the callbackIdle if we destroy while waiting it Marco Trevisan (TreviƱo) 3 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
330330 this.connect('destroy', () => {
331331 this._iconCache.destroy();
332332 this._cancellable.cancel();
333
334 if (this._callbackIdle) {
335 GLib.source_remove(this._callbackIdle);
336 delete this._callbackIdle;
337 }
333338 });
334339 }
335340
404409
405410 _createIconByName(path, callback) {
406411 if (!path) {
407 GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
412 this._callbackIdle = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
413 delete this._callbackIdle;
408414 callback(null);
409415 return false;
410416 });