From bd9e3722a27a9ebbaa4509d21a5b87c1bb3b7bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 5 Nov 2020 15:38:50 +0100 Subject: [PATCH] Remove useless old code --- extension.js | 79 ---------------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/extension.js b/extension.js index 1770570..8f46769 100644 --- a/extension.js +++ b/extension.js @@ -476,16 +476,6 @@ class GenericMonitorDBUS { log('No name defined for item'); return false; } - // if (!item.hasOwnProperty('text') && !item.hasOwnProperty('icon')) - // throw new Error('No text not icon defined for item'); - // if (item.hasOwnProperty('on-click')) { - // if (item['on-click'] !== 'signal' && item['on-click'] !== 'delete') - // throw new Error('Invalid on-click value'); - // } - // if (item.hasOwnProperty('box')) { - // if (item['box'] !== 'left' && item['box'] !== 'center' && item['box'] !== 'right') - // throw new Error('Invalid box value'); - // } } return true; @@ -501,34 +491,6 @@ class GenericMonitorDBUS { return null; } - _doClickCallback() { - for(let itemIndex in this.actor_clicked) { - let item = this.actor_clicked[itemIndex]; - let right = ''; - let nbClicks = ''; - if (item['button'] == 3) - right = 'Right'; - if (item['nbClicks'] > 1) - nbClicks = 'Dbl'; - let signalName = 'on' + right + nbClicks + 'Click'; - this._dbusImpl.emit_signal(signalName, GLib.Variant.new('(s)',[item['name']])); - } - this.actor_clicked = {} - } - - _actorToMonitorWidget(actor) { - for (let groupName in this.monitor_groups) { - let group = this.monitor_groups[groupName]; - for (let itemIndex in group) { - let item = group[itemIndex]; - if (item.widget === actor || - item.icon === actor) - return [groupName, item]; - } - } - return null; - } - _removeFromArray(array, value) { for(let i=0; i