ShutdownTimer icon indicating copy to clipboard operation
ShutdownTimer copied to clipboard

Gnome 42

Open keithy999 opened this issue 2 years ago • 7 comments

Can it be made to work somehow?

Thanks

keithy999 avatar Apr 07 '22 17:04 keithy999

Currently (version 34) it shows "Timer.Timer is not a constructor" error in the gnome extensions app

t00 avatar Apr 16 '22 10:04 t00

As I read so far, GNOME 42 uses Gtk4 instead of Gtk3. I will have a look for the necessary changes in the next time.

Everyone is welcome to submit a PR for GNOME 42 compatibility ;)

neumann-d avatar Apr 29 '22 18:04 neumann-d

Do you have any advice how to set up development environment for gnome extensions?

t00 avatar Apr 29 '22 18:04 t00

You can use GNOME Boxes for installing a new distro with GNOME 42 in a virtual machine.

neumann-d avatar Apr 29 '22 18:04 neumann-d

Once Gnome Boxes is set up, which editor (+extensions?) do you use? I am proficient in VS Code but setting up debugging etc is usually tricky - does gnome allow debugging (remotely, on vm?) extensions while running them?

t00 avatar Apr 29 '22 19:04 t00

I didn't find a way yet to really attach a debugger to the extension's code. For now, I only wrote some instructions how to see the logs and restart the extension: https://github.com/neumann-d/ShutdownTimer#development

neumann-d avatar Apr 29 '22 19:04 neumann-d

Class in external module must be declared with var instead of const, because class declared with let or const are not exported.

In timer.js line 19 must be chaged from

const Timer = GObject.registerClass({}, class Timer extends GObject.Object {

to

var Timer = GObject.registerClass({}, class Timer extends GObject.Object {

glerroo avatar Aug 05 '22 22:08 glerroo