GNOME Bugzilla – Bug 771876
Default background appears twice
Last modified: 2021-06-09 16:31:16 UTC
The code in: https://git.gnome.org/browse/gnome-control-center/tree/panels/background/bg-wallpapers-source.c is to blame, it doesn't filter out duplicates. From https://bugzilla.redhat.com/show_bug.cgi?id=1316522
This issue affects both of GNOME 3.22.2 and 3.23.91 and is likely to make its way into GNOME 3.24 final.
Created attachment 351480 [details] [review] patch I am a little rusty in C but here is a patch. It checks if a wallpaper is already in the gtkliststore before adding it.
Even though I think it would be more efficient to only check if it's the default wallpaper.
Created attachment 351841 [details] [review] avoid duplicates
Created attachment 353369 [details] [review] background: avoid duplicates The default background appears twice in the background panel chooser. Use a hash table to check if a file has already been added to the store.
Created attachment 353377 [details] [review] background: avoid duplicates The default background appears twice in the background panel chooser. Use a hash table to check if a file has already been added to the store. Updated Patch, if item's uri is NULL.
Review of attachment 353377 [details] [review]: Hi, thanks for your patch. Unfortunately, it does not apply on top of master anymore. Another inconvenient if that the Backgrounds panel is going through a major rewrite, and we'll have to revisit this bug later.
(In reply to Georges Basile Stavracas Neto from comment #7) This issue is fixed in GNOME 3.26 and later. Your comment is therefore outdated. I have not verified the current bug status for GNOME 3.24 though. Please set the version from "git master" to "3.24.x".
(In reply to Joachim Frieben from comment #8) > This issue is fixed in GNOME 3.26 and later. Your comment is therefore > outdated. I have not verified the current bug status for GNOME 3.24 though. > Please set the version from "git master" to "3.24.x". Thanks for checking this. It's targeted for 3.24 now.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.