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 771876 - Default background appears twice
Default background appears twice
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Background
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-23 11:49 UTC by Bastien Nocera
Modified: 2021-06-09 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.44 KB, patch)
2017-05-09 20:18 UTC, slatchurie
none Details | Review
avoid duplicates (1.97 KB, patch)
2017-05-14 19:54 UTC, slatchurie
none Details | Review
background: avoid duplicates (2.53 KB, patch)
2017-06-08 02:05 UTC, slatchurie
none Details | Review
background: avoid duplicates (2.65 KB, patch)
2017-06-08 11:49 UTC, slatchurie
needs-work Details | Review

Description Bastien Nocera 2016-09-23 11:49:24 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
Comment 1 Joachim Frieben 2017-03-10 20:16:16 UTC
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.
Comment 2 slatchurie 2017-05-09 20:18:54 UTC
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.
Comment 3 slatchurie 2017-05-09 20:55:56 UTC
Even though I think it would be more efficient to only check if it's the default wallpaper.
Comment 4 slatchurie 2017-05-14 19:54:15 UTC
Created attachment 351841 [details] [review]
avoid duplicates
Comment 5 slatchurie 2017-06-08 02:05:02 UTC
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.
Comment 6 slatchurie 2017-06-08 11:49:47 UTC
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.
Comment 7 Georges Basile Stavracas Neto 2018-01-26 02:28:28 UTC
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.
Comment 8 Joachim Frieben 2018-01-26 07:52:09 UTC
(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".
Comment 9 Georges Basile Stavracas Neto 2018-01-26 12:53:28 UTC
(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.
Comment 10 André Klapper 2021-06-09 16:31:16 UTC
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.