BlinkBP / walkpaper

Gnome-shell extension allowing user to set up different wallpapers for each workspace.
GNU General Public License v3.0
32 stars 21 forks source link

Gnome 40 Update #16

Closed LudovicoPiero closed 3 years ago

LudovicoPiero commented 3 years ago

is there an update for gnome 40? i've tried to make file but its not working in my gnome 40.

somemarco commented 3 years ago

Is the gnome 40 update something which is on the roadmap? respectively would you accept PRs?

mlmilliman commented 3 years ago

I was able to get the extension to function by allowing GNOME 40 to be supported plus changing a property in the settings window. The preferences pane still has errors. I don't know GTK so I don't think I can fix them on my own. Someone that knows GTK3 can probably fix them in a couple of minutes. It looks like the author has abandoned this extension though. Too bad because it is a nice workaround for a feature that should already be in GNOME.

geekysquirrel commented 3 years ago

@mlmilliman can you share your fix for the setting window please?

geekysquirrel commented 3 years ago

fwiw my workaround so far is to just update the version in metadata.json. I can't find decent documentation for updating from Gtk3 to Gtk4 so I just don't touch the broken settings GUI but update the values manually using dconf-editor. The settings are located in /org/gnome/shell/extensions/walkpaper/. Restarting gnome shell alone didn't do it for me but logging out/back in again worked.

mlmilliman commented 3 years ago

So far I made two changes to the extension. My first edit was in metadata.json to support GNOME 40: The line "40" was added after "3.32", Note I added the comma after the quote mark. The second edit was in the file prefs.js on line 115 where it now reads { shadow-type: GTK_SHADOW_IN }. I rebuilt the extension and reinstalled it before restarting GNOME. Those were enough changes to get the thing running again, but you cannot bring up the settings panel. The next error is somewhere in this _init function but I can't find it yet. Perhaps someone more familiar with GTK3 can figure it out and suggest a fix.

geekysquirrel commented 3 years ago

Thanks for sharing this - I even struggled to find documentation how to change the prefs.js file. Let's hope somebody else can pick it up from here 🤞

mcoyle1960 commented 3 years ago

Nice job @mlmilliman, your tweaks got it working. It's a little glitchy on the dissolve from one wallpaper to the next, but it works.

mlmilliman commented 3 years ago

I'm trying to learn enough GTK3+ to figure out what's going on with the preferences screen. My assumption is that there is deprecated code in prefs.js that must be corrected. I have a friend that I'll ask for assistance.

BlinkBP commented 3 years ago

I finally have some new hardware on which I plan to run mainly Gnome. So I'm going to work on fixing the extension for Gnome 40. Finding workarounds for GTK3 code not working on new GTK4 will be a hassle.

@puravida-marco I'm open to PRs.

If anyone wants to play around with getting the prefs.js working here are pretty good docs for js GTK4. And here for js GTK3 for comparison.

@mlmilliman the second error, after the GTK_SHADOW_IN, is connected with Grid not inheriting from the Gtk.Container in GTK4 so there is no simple "this.add(widget)" now. That's what I gathered so far.

BlinkBP commented 3 years ago

Hey. Pushed a commit adding support for GNOME 40 and Gtk 4. Let me know if there are any issues.

mlmilliman commented 3 years ago

The changes work perfectly including the preferences pane. I am not familiar with GTK at all so I was really hacking at the code to fix the issues. @BlinkBP is right that there is no simple replacement for this.add(widget). This is where I ran into the problem. Thanks for fixing something that should be built into GNOME 40. Seems like the GNOME developers don't pay attention to what the other OS window managers are doing.