-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 38 #144
Version 38 #144
Conversation
I gave this a try on GNOME 42 (to see if it fixes #153), but this doesn't seem to work yet
|
Thanks for testing Bjorn, but those errors seem to be generated by blur-my-shell? Is there a strange interaction occurring here that breaks wallpapers? |
Whoops, sorry, totally messed those up. I also tested with blur-my-shell disabled now, but the problem persists, the background image isn't set :/ |
All good, possibly related to the default image folder selection, GNOME 42 (or Glib) seems to do some things differently and I haven't properly tested the new code for handling it. If you haven't changed anything the defaults may have produced something that doesn't work. It should be '$HOME/Pictures/BingWallpaper' or equivalent for your locale, but this may get tripped up or may have carried over something from a previous install that has broken. |
Well, but it worked just fine with 41. So it must be something that changed from 41 to 42...
Yeah, didn't change anything there.
It is and the images get saved there just fine. But they don't get set as the background image. |
Alright, I think I know what's happening here now: The images are only set as the “Light” appearance wallpaper, but not as the “Dark” appearance one. That means, the extension currently works just fine if you have set the appearance style in gnome-control-center to “Light” but not when set to “Dark”. |
I gave it a shot now and this fixes it for me diff --git a/extension.js b/extension.js
index aa20f00..eb14a01 100644
--- a/extension.js
+++ b/extension.js
@@ -55,11 +55,13 @@ function notifyError(msg) {
Main.notifyError("BingWallpaper extension error", msg);
}
-function doSetBackground(uri, schema) {
+function doSetBackground(uri, schema, set_dark) {
let gsettings = new Gio.Settings({schema: schema});
let prev = gsettings.get_string('picture-uri');
uri = 'file://' + uri;
gsettings.set_string('picture-uri', uri);
+ if (set_dark)
+ gsettings.set_string('picture-uri-dark', uri);
Gio.Settings.sync();
gsettings.apply();
return (prev != uri); // return true if background uri has changed
@@ -257,11 +259,11 @@ class BingWallpaperIndicator extends PanelMenu.Button {
}
_setBackgroundDesktop() {
- doSetBackground(this.filename, Utils.DESKTOP_SCHEMA);
+ doSetBackground(this.filename, Utils.DESKTOP_SCHEMA, true);
}
_setBackgroundScreensaver() {
- doSetBackground(this.filename, Utils.LOCKSCREEN_SCHEMA);
+ doSetBackground(this.filename, Utils.LOCKSCREEN_SCHEMA, false);
}
_copyURLToClipboard() { |
Wasn't aware of this change, might not be exposed in Ubuntu 22.04 beta though (which I am using). |
That might very well be the case, and then the schema key also might not exist in Ubuntu 22.04. The above patch must then probably be guarded in some way... |
Ok, implemented a quick fix for this in this branch. Shouldn't break if the key doesn't exist. UPDATE: appears to correctly set wallpaper on GNOME OS nightly with both light and dark styles |
I can confirm, seems to works as expected. |
Changes in this version: