Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344335 - gnome-base/gnome-control-center: gnome-appearance-properties erases backgrounds.xml if Backgrounds tab never shown
Summary: gnome-base/gnome-control-center: gnome-appearance-properties erases backgroun...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-06 01:41 UTC by Matthew Turnbull
Modified: 2011-03-27 16:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Only write to ~/.gnome2/backgrounds.xml if it was loaded (gnome-control-center-2.32.0-smart-bg-xml-write.patch,1.85 KB, patch)
2010-11-06 01:46 UTC, Matthew Turnbull
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Turnbull 2010-11-06 01:41:26 UTC
If gnome-appearance-properties is opened and closed, without ever selecting the Backgrounds tab, ~/.gnome2/backgrounds.xml is overwritten with an empty XML structure, essentially erasing the file.

This happens because the file is only loaded when the tab is realized (shown), but it is always written on exit.

The backgrounds.xml should only be written if it was actually loaded.

Reproducible: Always

Steps to Reproduce:
1. Open gnome-appearance-properties
2. Add some custom wallpapers to the Backgrounds tab
3. Close gnome-appearance-properties
4. Check ~/.gnome2/backgrounds.xml
5. Open gnome-appearance-properties
6. Close gnome-appearance-properties

Actual Results:  
~/.gnome2/backgrounds.xml contains:

<?xml version="1.0"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers/>


Expected Results:  
~/.gnome2/backgrounds.xml should be unchanged from step 4


I see this behavior in GNOME 2.32, 2.30, and probably earlier versions too. I wrote a quick hack for 2.32 that seems to do the trick. This patch also applies to 2.30 without problem (1 line fuzz on the first hunk), but I haven't tried actually building and testing it.
Comment 1 Matthew Turnbull 2010-11-06 01:46:40 UTC
Created attachment 253361 [details, diff]
Only write to ~/.gnome2/backgrounds.xml if it was loaded
Comment 2 Pacho Ramos gentoo-dev 2010-11-06 10:59:44 UTC
Reproduced the problem, confirmed that your patch solves this and reported to upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=634156

Thanks a lot 
Comment 3 Matthew Turnbull 2010-11-20 22:12:52 UTC
Since there doesn't look to be a whole lot of activity upstream, will this get included in Gentoo's release? It'd be nice to have this fixed for stabilization.
Comment 4 Pacho Ramos gentoo-dev 2010-12-23 20:08:04 UTC
(In reply to comment #3)
> Since there doesn't look to be a whole lot of activity upstream, will this get
> included in Gentoo's release? It'd be nice to have this fixed for
> stabilization.
> 

Will wait for any more experienced gnome team member opinion before trying to use it :-|
Comment 5 Pacho Ramos gentoo-dev 2011-03-27 16:45:20 UTC
+*gnome-control-center-2.32.1-r1 (27 Mar 2011)
+
+  27 Mar 2011; Pacho Ramos <pacho@gentoo.org>
+  -files/gnome-control-center-2.28.1-gdm-default-bg.patch,
+  -gnome-control-center-2.30.1.ebuild, +gnome-control-center-2.32.1-r1.ebuild,
+  +files/gnome-control-center-2.32.1-duplicated-background.patch,
+  +files/gnome-control-center-2.32.1-erase-background.patch,
+  +files/gnome-control-center-2.32.1-mime-handler.patch,
+  +files/gnome-control-center-2.32.1-mime-handler2.patch,
+  +files/gnome-control-center-2.32.1-mime-handler3.patch:
+  Revision bump using URL handlers for browser and mailer applications to be
+  compatible with glib-2.28, not showing twice the configured background if it
+  is a symlink to a known background, not erasing backgrounds.xml under some
+  circumstances (bug #344335 by Matthew Turnbull). Remove old.
+