timewarrior-indicator
timewarrior-indicator copied to clipboard
Update for gnome shell 42
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 runninggnome-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 runninggtk4-builder-tool simplify --3to4 prefs.xml
- but the automatically converted xml did not show any dialog - just the empty window. Basicallymargin
andGtkVBox
has been removed as far as I understand.
Thanks to @petres for the help! :purple_heart:
This may fix #7.