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 680100 - should load default background if the user settings is invalid
should load default background if the user settings is invalid
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-17 14:20 UTC by Sebastien Bacher
Modified: 2012-07-18 09:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
load the default background if the configured one is invalid (1.93 KB, patch)
2012-07-17 14:23 UTC, Sebastien Bacher
none Details | Review
load the default background if the configured one is invalid (1.93 KB, patch)
2012-07-17 14:23 UTC, Sebastien Bacher
none Details | Review
load the default background if the configured one is invalid (1.93 KB, patch)
2012-07-17 14:32 UTC, Sebastien Bacher
committed Details | Review

Description Sebastien Bacher 2012-07-17 14:20:40 UTC
Not sure if that would count as a behaviour change of the API but it would be nice if gnome_bg_load_from_preferences() would fallback to load the default wallpaper if the currently configured one is not available.

It would be useful in case where the wallpaper in use by the user would get deleted for example.

Using g_settings_get_mapped() would make that fallback easy
Comment 1 Sebastien Bacher 2012-07-17 14:23:07 UTC
Created attachment 219023 [details] [review]
load the default background if the configured one is invalid
Comment 2 Sebastien Bacher 2012-07-17 14:23:54 UTC
Created attachment 219025 [details] [review]
load the default background if the configured one is invalid
Comment 3 Sebastien Bacher 2012-07-17 14:32:02 UTC
Created attachment 219026 [details] [review]
load the default background if the configured one is invalid

ups, I renamed the function in the previous diff and of course forgot one instance, that one should build and work fine
Comment 4 Colin Walters 2012-07-17 17:17:49 UTC
Review of attachment 219026 [details] [review]:

Hmm...but do we actually support non-local backgrounds?  If not, why is the config option a URI?

The code looks correct aside from that question.
Comment 5 Sebastien Bacher 2012-07-17 17:38:05 UTC
Good question, I'm not sure how you would set a remote background from GNOME since the background panel does copy user added images locally...

Note that I didn't add any new check there, the code I use in bg_gsettings_mapping() is basically the current trunk code from gnome_bg_load_from_preferences() moved
Comment 6 Colin Walters 2012-07-17 18:36:48 UTC
(In reply to comment #5)
> Good question, I'm not sure how you would set a remote background from GNOME
> since the background panel does copy user added images locally...

Right; probably making it a URI was someone trying to be forward-thinking or something.

> Note that I didn't add any new check there, the code I use in
> bg_gsettings_mapping() is basically the current trunk code from
> gnome_bg_load_from_preferences() moved

Ok; feel free to commit, thanks!
Comment 7 Sebastien Bacher 2012-07-18 09:17:23 UTC
thanks, commited to trunk:

http://git.gnome.org/browse/gnome-desktop/commit/?id=6deb007f102d8ae9eabb10808f34d7129932dad3