oae / gnome-shell-pano

Next-gen Clipboard Manager for Gnome Shell
https://extensions.gnome.org/extension/5278/pano/
GNU General Public License v2.0
978 stars 52 forks source link

Update gnome 46 types #265

Closed Totto16 closed 2 months ago

Totto16 commented 3 months ago

Update gnome 46 types

Description

Since Gnome 46 uses a new version of the Core Gnome dependencies (see here)

We need to update those to the new version, there should be no huge changes, but we should do it nevertheless, especially, since we have some type errors and mismatches already present, and we need to fix some of those, so also the @girs/gnome-shell should be updated to gnome 46 types. We use types from https://github.com/gjsify/types and https://github.com/gjsify/gnome-shell/ so we need to wait for these to be added there (or help there, what I also intend)

This adds:

The weird thing is, that it works on some Gnome 46 distros while it doesn't in others, that threw me off, since now I am testing with Ubuntu 24.04 (where add_child DOESN'T work), earlier I tested with GNOME OS Nightly (where add_child worked)

Resolution: add_actor is deprecated since version 1.10 of Clutter (13 and 14 are used in gnome 45 / 46) , and add_child does work on most things correctly, but gnome-shell itself did use the depreacted API in some places for a long time too. So add_child on St.ScrollView does not work as intendend until gnome > 45.2. But not every Gnome 45 distro uses the latest gnome 45 version, so e.g. on Ubuntu 23.10 it doesn't work. So until gnome 46 add_actor does the correct thing on St.ScrollView but on Gnome 46 add_child doesn't work always. So what works on every Gnome 46 is set_child (since St.ScrollView only can have one child). This was used instead of add_child for Gnome 46.

The CI fails, since the used types are not yet released

Type of change

Checklist

Totto16 commented 2 months ago

@oae I added a simple CI, since after this, the types should be checked automatically at each PR, but it seems, that you have actions disabled, could you enable them? Thanks in advance ❤️

Edit: never mind, my error, sorry for the ping, it works now (it took some time, for GitHub to notice, but on my fork it was faster xD)

Edit 2: but on that note, could you check the box, that certain status checks need to pass (in the branch protection settings), and then select this check, it would be great image

oae commented 2 months ago

I have changed the settings

Totto16 commented 2 months ago

This is now finished, I tested it on gnome 45 and gnome 46 with Ubuntu 24.04 beta, it wasn't tested on other gnome 46 environments, but it worked earlier, so it should work as of now too, since I only changed some things that work on all of gnome 46 (it was difficult enough, with some things, that didn't work earlier on all gnome 46 distros 😓)

Totto16 commented 2 months ago

@oae Regarding a review: If you don't want to do a full review, It would also be fine, to just look at some core changes, or just read my description above and test this locally yourself (if anyone else reads this, you are welcome to test this too and give feedback (even if it's just, yes it works))

I did check my work carefully and also tested it carefully, but since this is your project I feel better, if you look at it, if you're fine with all the changes (no hurry tough)

oae commented 2 months ago

It looks good to me. You can merge it. <3. Thank you for the great work.