timewarrior-indicator icon indicating copy to clipboard operation
timewarrior-indicator copied to clipboard

Update for gnome shell 42

Open lumbric opened this issue 7 months ago • 1 comments

This is a quick draft to make things compatible with gnome shell 42.9.

Note that this is my first time touching gnome extensions and I have very limited know how - please use this PR with caution.

I simply debugged the thing until it was working with my version of GNOME Shell. No idea which versions are actually compatible. But you can easily modify the metadata.json and add other GNOME Shell versions and test it there.

$ gnome-shell --version
GNOME Shell 42.9

What I had to do to get it working again:

  • use the GObject.registerClass() function and use ES 6 class instead of an object for the indicator. I'm not entirely sure why this is necessary, I basically guessed it from the error message and a comparison to a working extension which I created from a template using the gnome-extensions-tool by running gnome-extensions create --interactive and choosing "indicator" as template. There are also some hints regarding migrating shell classes here.
  • I had to declare all variables. No idea why. I just put a let wherever necessary.
  • I had to adapt the prefs.xml: I simply followed the error messages and got some inspiration by running gtk4-builder-tool simplify --3to4 prefs.xml - but the automatically converted xml did not show any dialog - just the empty window. Basically margin and GtkVBox has been removed as far as I understand.

Thanks to @petres for the help! :purple_heart:

This may fix #7.

lumbric avatar Jul 04 '24 10:07 lumbric