projecthamster / hamster-shell-extension

Shell extension for hamster
http://projecthamster.org
GNU General Public License v3.0
215 stars 91 forks source link

Make code compatible with gnome-shell 3.32 #308

Closed ernestask closed 5 years ago

ernestask commented 5 years ago

This commit ports class declarations to those of ES6[0], drops the convenience module[1] and updates function context binding[2], adopting the arrow notation in places.

[0] - https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361 [1] - https://gitlab.gnome.org/GNOME/gnome-shell-extensions/commit/bab4be1a597226a5fe8a29dcf3848be47e16a5e5 [2] - https://gitlab.gnome.org/GNOME/gnome-shell-extensions/commit/ba27cc4a64daf7f62174653362741de30c2f5b86

Fixes https://github.com/projecthamster/hamster-shell-extension/issues/307

ernestask commented 5 years ago

Looks like https://github.com/projecthamster/hamster-shell-extension/pull/299 would also be good to merge.

aldomann commented 5 years ago

The autocomplete function is not working on my system. Everything else seems to work just fine.

ernestask commented 5 years ago

Entirely possible that I made a mistake somewhere, especially given that I don’t use this thing. Will try to see what’s up with that, thanks.

ldoktor commented 5 years ago

@ernestask thank you very much, it works for me as well even on wayland and reboot. I spot just one minor fix and that is:

diff --git a/Makefile b/Makefile
index b298126..7482f36 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,6 @@ collect:
        mkdir -p $(BUILDDIR)
        cp -R extension/* $(BUILDDIR)
        cp -R data/* $(BUILDDIR)
-       wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/master/lib/convenience.js -O $(BUILDDIR)/convenience.js

 compile: collect
        glib-compile-schemas $(BUILDDIR)/schemas

which I needed to run make dist because I haven't merged the #299....

Also the autocomplete doesn't work for me, but maybe it needs to fill the works again... Let's make it work for a while and see :smile:.

ernestask commented 5 years ago

Ah, good eye, thanks!

ernestask commented 5 years ago

@hedayat, I’ve incorporated your fixes from #299 into this PR. One of the commits fixes the autocompletion.

hedayat commented 5 years ago

@hedayat, I’ve incorporated your fixes from #299 into this PR. One of the commits fixes the autocompletion.

:) Glad to hear it

hedayat commented 5 years ago

Tried under gnome shell 3.32, and it works fine :) Thanks!

ldoktor commented 5 years ago

Hello @elbenfreund, would you please consider merging this? It brings the 3.32 gnomeshell integration along with some fixes...

Forage commented 5 years ago

I suppose with all these changes the extension is no longer compatible with Hamster legacy. Did anyone happen to test this?

ernestask commented 5 years ago

At least I haven’t, so someone else should, but, as this doesn’t have much chance of being merged, I don’t think it matters a whole lot.

mwilck commented 5 years ago

@ernestask, thanks a lot for your work on this. I have taken your work and split it into smaller patches that might be helpful to get this reviewed and merged. While during this, I also reviewed and tested your work, and changed a few minor things. The results is https://github.com/projecthamster/hamster-shell-extension/pull/312.

This is not meant as competition, rather to help this stuff getting merged one way or the other.

mwilck commented 5 years ago

I suppose with all these changes the extension is no longer compatible with Hamster legacy. Did anyone happen to test this?

Haven't tested it either (do you have a specific version in mind?), but if you look at #312, you can see that the use of the hamster DBus API hasn't changed (well, you can see it here, too, it's just not that obvious, maybe). All the changes in this PR are just to accomodate the GNOME API changes. So, chances are good that this will work with older hamster versions.

ernestask commented 5 years ago

Right.