mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
Clicking on menu item selects the sensor shown in panel.
This commit is contained in:
@@ -18,7 +18,11 @@ const SensorsItem = new Lang.Class({
|
||||
Extends: PopupMenu.PopupBaseMenuItem,
|
||||
|
||||
_init: function(label, value) {
|
||||
this.parent({reactive: false});
|
||||
this.parent();
|
||||
this.connect('activate', function () {
|
||||
settings.set_string('show-in-panel', 'sensor');
|
||||
settings.set_string('sensor', label);
|
||||
});
|
||||
|
||||
this.addActor(new St.Label({text: label}));
|
||||
this.addActor(new St.Label({text: value}), {align: St.Align.END});
|
||||
|
||||
Reference in New Issue
Block a user