isDipesh / gnome-shell-extension-sensors

Gnome shell extension: Shows CPU temperature, HDD temperature, voltage and fan RPM
https://motorscript.com/gnome-shell-extension-sensors/
161 stars 153 forks source link

Cannot open "Sensors Setting" #109

Closed UshakovVasilii closed 9 years ago

UshakovVasilii commented 10 years ago

I have the following error on 3.12:

(gnome-shell:3205): Gjs-WARNING **: JS ERROR: Exception in callback for signal: activate: Error: can't convert ["temperature@xtranophilist"] to an integer
SensorsMenuButton<._updateDisplay/<@/usr/share/gnome-shell/extensions/temperature@xtranophilist/extension.js:208
_emit@resource:///org/gnome/gjs/modules/signals.js:124
PopupBaseMenuItem<.activate@resource:///org/gnome/shell/ui/popupMenu.js:163
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
PopupBaseMenuItem<._onButtonReleaseEvent@resource:///org/gnome/shell/ui/popupMenu.js:136
wrapper@resource:///org/gnome/gjs/modules/lang.js:169

To fix this error you can use:

        item.connect('activate', function () {
            Util.spawn(["gnome-shell-extension-prefs", metadata.uuid]);
        });

instead of:

        item.connect('activate', function () {
            if (_gsmPrefs.get_state() == _gsmPrefs.SHELL_APP_STATE_RUNNING){
                _gsmPrefs.activate();
            } else {
                _gsmPrefs.launch(global.display.get_current_time_roundtrip(),
                                 [metadata.uuid],-1,null);
            }
        });

Should work on 3.10 and 3.12 Thanks!

UshakovVasilii commented 10 years ago

Also I have warning:

Gjs-Message: JS WARNING: [/usr/share/gnome-shell/extensions/temperature@xtranophilist/prefs.js 80]: assignment to undeclared variable boolSetting
adrianbroher commented 9 years ago

Both issues should be resolved with the commits:

a308a3d - Fixed 'Sensors Settings' shortcut not opening cafaadb - Removed warning in preferences