diff --git a/.gitignore b/.gitignore index 42afabf..92910a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/build \ No newline at end of file +/build +/.idea/ diff --git a/System_Monitor@bghome.gmail.com/factory.js b/System_Monitor@bghome.gmail.com/factory.js index b134515..6e8b233 100644 --- a/System_Monitor@bghome.gmail.com/factory.js +++ b/System_Monitor@bghome.gmail.com/factory.js @@ -9,7 +9,7 @@ const Lang = imports.lang; const Gio = imports.gi.Gio; const PrefsKeys = Me.imports.prefs_keys; -const AbstractFactory = (function() { +var AbstractFactory = (function() { var types = {}; diff --git a/System_Monitor@bghome.gmail.com/indicator.js b/System_Monitor@bghome.gmail.com/indicator.js index 9ae31d3..1052cb2 100644 --- a/System_Monitor@bghome.gmail.com/indicator.js +++ b/System_Monitor@bghome.gmail.com/indicator.js @@ -8,7 +8,7 @@ let color_range = []; // CSS class name. let caution_class = ''; -const Icon = new Lang.Class({ +var Icon = new Lang.Class({ Name: 'Icon', Extends: St.Icon }); diff --git a/System_Monitor@bghome.gmail.com/meter.js b/System_Monitor@bghome.gmail.com/meter.js index 6d3dfaf..b47b2e1 100644 --- a/System_Monitor@bghome.gmail.com/meter.js +++ b/System_Monitor@bghome.gmail.com/meter.js @@ -147,7 +147,7 @@ MeterSubject.prototype.hasActivity = function() { MeterSubject.prototype.destroy = function() {}; -const CpuMeter = function() { +var CpuMeter = function() { this.observers = []; this._statistics = { cpu: { user:0, nice:0, guest:0, guest_nice:0, system:0, irq: 0, softirq: 0, idle: 0, iowait: 0, steal: 0 }, @@ -227,7 +227,7 @@ const CpuMeter = function() { CpuMeter.prototype = new MeterSubject(); -const MemoryMeter = function(calculation_method) { +var MemoryMeter = function(calculation_method) { this.observers = []; if (-1 == ['ram_only', 'all'].indexOf(calculation_method)) { throw new RangeError('Unknown memory calculation method given: ' + calculation_method); @@ -299,7 +299,7 @@ const MemoryMeter = function(calculation_method) { MemoryMeter.prototype = new MeterSubject(); -const StorageMeter = function() { +var StorageMeter = function() { this.observers = []; let mount_entry_pattern = new RegExp('^\\S+\\s+(\\S+)\\s+(\\S+)'); let fs_types_to_measure = [ @@ -356,7 +356,7 @@ const StorageMeter = function() { StorageMeter.prototype = new MeterSubject(); -const NetworkMeter = function(refresh_interval) { +var NetworkMeter = function(refresh_interval) { this.observers = []; this._statistics = {}; this._bandwidths = {}; @@ -487,7 +487,7 @@ const NetworkMeter = function(refresh_interval) { NetworkMeter.prototype = new MeterSubject(); -const SwapMeter = function() { +var SwapMeter = function() { this.observers = []; let swap_utility = new Util.Swap; let processes = new Util.Processes; @@ -541,7 +541,7 @@ const SwapMeter = function() { SwapMeter.prototype = new MeterSubject(); -const SystemLoadMeter = function() { +var SystemLoadMeter = function() { this.observers = []; this._number_of_cpu_cores = null; let load = new GTop.glibtop_loadavg(); diff --git a/System_Monitor@bghome.gmail.com/prefs_keys.js b/System_Monitor@bghome.gmail.com/prefs_keys.js index e5b4eb3..5c2c247 100644 --- a/System_Monitor@bghome.gmail.com/prefs_keys.js +++ b/System_Monitor@bghome.gmail.com/prefs_keys.js @@ -1,9 +1,9 @@ -const REFRESH_INTERVAL = 'refresh-interval'; -const CPU_METER = 'cpu-meter'; -const MEMORY_METER = 'memory-meter'; -const STORAGE_METER = 'storage-meter'; -const NETWORK_METER = 'network-meter'; -const SWAP_METER = 'swap-meter'; -const LOAD_METER = 'load-meter'; -const POSITION = 'position'; -const MEMORY_CALCULATION_METHOD = 'memory-calculation-method'; +var REFRESH_INTERVAL = 'refresh-interval'; +var CPU_METER = 'cpu-meter'; +var MEMORY_METER = 'memory-meter'; +var STORAGE_METER = 'storage-meter'; +var NETWORK_METER = 'network-meter'; +var SWAP_METER = 'swap-meter'; +var LOAD_METER = 'load-meter'; +var POSITION = 'position'; +var MEMORY_CALCULATION_METHOD = 'memory-calculation-method'; diff --git a/System_Monitor@bghome.gmail.com/util.js b/System_Monitor@bghome.gmail.com/util.js index 35e437d..1a5d6d2 100644 --- a/System_Monitor@bghome.gmail.com/util.js +++ b/System_Monitor@bghome.gmail.com/util.js @@ -7,7 +7,7 @@ const Me = imports.misc.extensionUtils.getCurrentExtension(); const FactoryModule = Me.imports.factory; const Promise = Me.imports.helpers.promise.Promise; -let Process = new Lang.Class({ +var Process = new Lang.Class({ Name: "Process", _init: function(id) { @@ -19,7 +19,7 @@ let Process = new Lang.Class({ } }); -let Processes = new Lang.Class({ +var Processes = new Lang.Class({ Name: "Processes", /** @@ -76,7 +76,7 @@ let Processes = new Lang.Class({ } }); -let Directories = new Lang.Class({ +var Directories = new Lang.Class({ Name: "Directories", /** @@ -116,7 +116,7 @@ let Directories = new Lang.Class({ } }); -let Network = new Lang.Class({ +var Network = new Lang.Class({ Name: "Network", /** @@ -138,7 +138,7 @@ let Network = new Lang.Class({ } }); -let Swap = new Lang.Class({ +var Swap = new Lang.Class({ Name: "Swap", _init: function(id) { diff --git a/System_Monitor@bghome.gmail.com/view.js b/System_Monitor@bghome.gmail.com/view.js index 63ec028..40cc620 100644 --- a/System_Monitor@bghome.gmail.com/view.js +++ b/System_Monitor@bghome.gmail.com/view.js @@ -8,7 +8,7 @@ const FactoryModule = Me.imports.factory; const Convenience = Me.imports.convenience; const PrefsKeys = Me.imports.prefs_keys; -const Menu = new Lang.Class({ +var Menu = new Lang.Class({ Name: 'Menu', Extends: PanelMenu.Button, _icons: {}, diff --git a/System_Monitor@bghome.gmail.com/widget.js b/System_Monitor@bghome.gmail.com/widget.js index a5f1d30..c4a3865 100644 --- a/System_Monitor@bghome.gmail.com/widget.js +++ b/System_Monitor@bghome.gmail.com/widget.js @@ -119,7 +119,7 @@ let BaseMenuItem = new Lang.Class({ } }); -const ResourceTitleItem = new Lang.Class({ +var ResourceTitleItem = new Lang.Class({ Name: "ResourceTitleItem", Extends: BaseMenuItem, @@ -128,7 +128,7 @@ const ResourceTitleItem = new Lang.Class({ } }); -const ProcessItem = new Lang.Class({ +var ProcessItem = new Lang.Class({ Name: "ProcessItem", Extends: BaseMenuItem, @@ -137,7 +137,7 @@ const ProcessItem = new Lang.Class({ } }); -const MountItem = new Lang.Class({ +var MountItem = new Lang.Class({ Name: "MountItem", Extends: BaseMenuItem, @@ -146,7 +146,7 @@ const MountItem = new Lang.Class({ } }); -const StateItem = new Lang.Class({ +var StateItem = new Lang.Class({ Name: "StateItem", Extends: BaseMenuItem, @@ -155,7 +155,7 @@ const StateItem = new Lang.Class({ } }); -const InterfaceItem = new Lang.Class({ +var InterfaceItem = new Lang.Class({ Name: "InterfaceItem", Extends: BaseMenuItem, @@ -251,7 +251,7 @@ const Separator = new Lang.Class({ Extends: PopupMenu.PopupSeparatorMenuItem }); -const MeterAreaContainer = new Lang.Class({ +var MeterAreaContainer = new Lang.Class({ Name: "MeterAreaContainer", Extends: St.BoxLayout, @@ -320,7 +320,7 @@ const MeterContainer = new Lang.Class({ } }); -const ProcessItemsContainer = new Lang.Class({ +var ProcessItemsContainer = new Lang.Class({ Name: "ProcessItemsContainer", Extends: MeterContainer, @@ -342,7 +342,7 @@ const ProcessItemsContainer = new Lang.Class({ } }); -const SystemLoadItemsContainer = new Lang.Class({ +var SystemLoadItemsContainer = new Lang.Class({ Name: "SystemLoadItemsContainer", Extends: MeterContainer, @@ -362,7 +362,7 @@ const SystemLoadItemsContainer = new Lang.Class({ } }); -const DirectoriesContainer = new Lang.Class({ +var DirectoriesContainer = new Lang.Class({ Name: "DirectoriesContainer", Extends: MeterContainer, @@ -389,7 +389,7 @@ const DirectoriesContainer = new Lang.Class({ } }); -const NetworkInterfaceItemsContainer = new Lang.Class({ +var NetworkInterfaceItemsContainer = new Lang.Class({ Name: "NetworkInterfaceItemsContainer", Extends: MeterContainer,