After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 106613 - nautilus doesn't notice the background image has changed.
nautilus doesn't notice the background image has changed.
Status: RESOLVED FIXED
Product: eel
Classification: Deprecated
Component: general
2.22.x
Other All
: Normal minor
: ---
Assigned To: Christian Neumair
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-20 16:35 UTC by aj
Modified: 2008-03-14 16:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Proposed patch against eel (2.91 KB, patch)
2008-03-12 17:20 UTC, Christian Neumair
committed Details | Review

Description aj 2003-02-20 16:35:29 UTC
Nautilus doesn't update the root window background image if it changes.

I have a background image changer on a timer. Every hour or so the background
image changes. Xplanet does this too.

Unless the path to the background image file changes, nautilus does not
update it.

I started running through the nautilus and gconf code to figure out how to
patch chbg and xplanet to force a root window update the background. Then I
decided that it really should be nautilus that checks, ala fam or something.

gthumb2 does this marvelously. If I change a picture's contents, the
thumbnail updates almost instantly.

In the meantime I've worked around this by scripting a symlink with a Unix
seconds suffix. The symlink name changes, so gconf updates the picture.
Comment 1 Christian Neumair 2003-12-25 14:05:19 UTC
Thanks for your bug report!
This is still valid for Nautilus 2.5.

regs,
 Chris
Comment 2 palfrey 2006-11-11 11:59:16 UTC
Nautilus uses the EelBackground class from libeel to handle background settings, and this needs to be fixed to emit settings_changed when the background changes in order to fix this. Ergo, an eel bug not a nautilus bug (but I don't have enough permissions to change it).
Comment 3 Christian Neumair 2008-03-12 17:20:24 UTC
Created attachment 107160 [details] [review]
Proposed patch against eel

Moved to eel.

The proposed patch will inform EelBackground and Nautilus about image changes to the image through gio file monitors.

IMO, we should have used the "appearance-changed" signal, but Nautilus doesn't connect to it as of writing and I don't want to break any existing code.

Note that if the image is set to a symlink, we don't monitor changes to the target.

best regards,
 Christian Neumair
Comment 4 Paolo Borelli 2008-03-12 17:31:23 UTC
Comment on attachment 107160 [details] [review]
Proposed patch against eel

>+	if (image_uri != background->details->image_uri) {

Shouldn't you strcmp instead of comparing pointers?


(Mind you, I just lazily looked at the patch without checking the surrounding code)
Comment 5 Christian Neumair 2008-03-12 18:11:03 UTC
> Shouldn't you strcmp instead of comparing pointers?

Not in this case.

It is just a protection against "ptr" being fed into a function (argument name "input") that does

free (ptr);
ptr = input;

Of course, I could also have used the NULL-safe eel_strcmp(), but it's really not string-related.

best regards,
 Christian Neumair
Comment 6 Alexander Larsson 2008-03-14 12:12:18 UTC
Looks good to commit.
Comment 7 Christian Neumair 2008-03-14 16:42:17 UTC
Committed, closing. It will be included in eel 2.22.1 and later.