(groupName, optionName, menuSuffix = '', position = -1)
| 436 | } |
| 437 | |
| 438 | _initializeMenuGroup(groupName, optionName, menuSuffix = '', position = -1) { |
| 439 | this._groups[groupName] = new PopupMenu.PopupSubMenuMenuItem(_(this._ucFirst(groupName) + menuSuffix), true); |
| 440 | this._groups[groupName].icon.gicon = Gio.icon_new_for_string(this._sensorIconPath(groupName)); |
| 441 | |
| 442 | // hide menu items that user has requested to not include |
| 443 | if (!this._settings.get_boolean('show-' + optionName)) |
| 444 | this._groups[groupName].actor.hide(); |
| 445 | |
| 446 | if (!this._groups[groupName].status) { |
| 447 | this._groups[groupName].status = this._defaultLabel(); |
| 448 | this._groups[groupName].actor.insert_child_at_index(this._groups[groupName].status, 4); |
| 449 | this._groups[groupName].status.text = _('No Data'); |
| 450 | } |
| 451 | |
| 452 | if(position == -1) this.menu.addMenuItem(this._groups[groupName]); |
| 453 | else this.menu.addMenuItem(this._groups[groupName], position); |
| 454 | } |
| 455 | |
| 456 | _createRoundButton(iconName) { |
| 457 | let button = new St.Button({ |
no test coverage detected