diff --git a/System_Monitor@bghome.gmail.com/factory.js b/System_Monitor@bghome.gmail.com/factory.js index 02741d3..fb3fb9f 100644 --- a/System_Monitor@bghome.gmail.com/factory.js +++ b/System_Monitor@bghome.gmail.com/factory.js @@ -164,7 +164,7 @@ AbstractFactory.registerObject('meter-area-widget', MeterAreaWidgetFactory); const MeterWidgetFactory = function() {}; -MeterWidgetFactory.prototype.create = function(type, options, icon) { +MeterWidgetFactory.prototype.create = function(type, icon) { let title, meter_widget; if (type == PrefsKeys.CPU_METER) { title = 'CPU'; @@ -190,7 +190,7 @@ MeterWidgetFactory.prototype.create = function(type, options, icon) { meter_widget.addTitleItem(new Widget.ResourceTitleItem(title, icon, 'loading...')); for (var i = 0; i < 3; i++) { - meter_widget.addMenuItem(AbstractFactory.create('meter-widget-item', type, options)); + meter_widget.addMenuItem(AbstractFactory.create('meter-widget-item', type)); } return meter_widget; } @@ -200,7 +200,7 @@ AbstractFactory.registerObject('meter-widget', MeterWidgetFactory); const MeterWidgetItemFactory = function() {}; -MeterWidgetItemFactory.prototype.create = function(type, options) { +MeterWidgetItemFactory.prototype.create = function(type) { switch (type) { case PrefsKeys.CPU_METER: case PrefsKeys.MEMORY_METER: diff --git a/System_Monitor@bghome.gmail.com/view.js b/System_Monitor@bghome.gmail.com/view.js index e97c340..4e4ef88 100644 --- a/System_Monitor@bghome.gmail.com/view.js +++ b/System_Monitor@bghome.gmail.com/view.js @@ -113,7 +113,7 @@ var Menu = new Lang.Class({ meter.addObserver(icon); this._layout.insert_child_at_index(icon, this.available_meters.indexOf(type)); this._icons[type] = icon; - return icon; + return FactoryModule.AbstractFactory.create('icon', type, {}, can_show_activity); }, _destroyIcon: function(type) { let icon = this._icons[type];